secdev / scapy

Scapy: the Python-based interactive packet manipulation program & library.
https://scapy.net
GNU General Public License v2.0
10.71k stars 2.02k forks source link

Fail to send CTS/RTS while other packet types are being sent no problem #3064

Closed LionOpeter closed 3 years ago

LionOpeter commented 3 years ago

Scapy Version 2.4.4 Python Version 3.5.2 Ubuntu 16.04.1 LTS

Python code:

from scapy.all import *
sender = 'ac:cb:12:ad:58:27'
conf.use_pcap = True
monitor = True
iface = 'wlan0'
duration = Dot11(raw(Dot11(ID=struct.unpack(">H", struct.pack("<H", 35595))[0]))).ID
dot11 = Dot11(type=1, subtype=11, addr1=sender, addr2='00:00:00:00:12:34', ID=duration)
frame = RadioTap()/dot11
frame.show()
print("\nHexdump of frame:")
hexdump(frame)
input("\nPress enter to start\n")
sendp(frame, iface=iface, inter=0.1, loop=1)

In my setup

Ubuntu1 - scapy is used from and sending packets Ubuntu2 - sniffer wireshark to detect packets AP - Turned off so it will be easier to see if scapy packets are seen in the sniffer

How to reproduce

Use the code I am using

Actual result

No packets are seen

Expected result

CTS or RTS packets should be seen

Additional info

Ubuntu1 and Ubuntu2 are both configured to detect packets on 5G 20MHz channel 36 When scapy sends beacons they are seen in the sniffer and when sending CTS/RTS - nothing is seen I don't fill FCS field in CTS/RTS

gpotter2 commented 3 years ago

Hi & sorry for the delay. There's nothing we can do when it comes to how finicky 802.11 drivers are. Scapy only uses your OS or libpcap to send the packets, and is not responsible for weird edge-cases like this one. Try out with conf.use_pcap = True (libpcap mode) to see if it helps.