nmap / npcap

Nmap Project's Windows packet capture and transmission library
https://npcap.com
Other
3.02k stars 519 forks source link

SetInterface error, error code 50 #142

Closed ABVitali closed 3 years ago

ABVitali commented 5 years ago

DiagReport-20190804-160810.txt I installed wireshark and Npcap but I couldn't select monitor mode in Wireshark. Looking around for a solution I saw about the tool WlanHelper and when I try to use it from PowerShell I see "SetInterface error, error code = 50". I couldn't find my WiFi card listed in the page https://secwiki.org/w/Npcap/WiFi_adapter so I decided to open this issue.

OS = Windows 10 Npcap version = 0.9982 Network interface name = Qualcomm Atheros Communications QCA9377 Network interface driver version = 12.0.0.720

Normal packets capturing with Wireshark works.

Let me know if you need other information. Thank you for your support.

dmiller-nmap commented 3 years ago

Error code 50 is ERROR_NOT_SUPPORTED. The adapter may not support monitor mode. Since raw WiFi capture was broken around the time this bug was reported, we suggest upgrading to Npcap 1.30 and trying again. Thanks!

guyharris commented 3 years ago

Presumably pcap_can_set_rfmon() will return 0 (as in "no, you can't set rfmon mode"), and pcap_set_rfmon() will return PCAP_ERROR_RFMON_NOTSUP, for adapters that don't support monitor mode.

guyharris commented 3 years ago

WlanHelper should perhaps check for ERROR_NOT_SUPPORTED and, rather than just printing "SetInterface error, error code = 50", report an error indicating that the problem may be that the driver (or adapter) may not support monitor mode.