We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When we try to launch sniff() on Windows 11 with the monitor mode enabled, we only get a OSError: Generic Error
sniff()
OSError: Generic Error
https://github.com/secdev/scapy.git@3cbb62e04637f686867f9693275c14be938a229f
Python 3.12.8
Microsoft Windows 11 [Version 10.0.26100.2605]
Npcap was installed with only raw 802.11 support (and monitor mode).
from scapy.all import sniff if __name__ == "__main__": try: packets = sniff(iface="Ethernet", count=4, filter="arp", monitor=True) except OSError as e: print("OSError:", e) exit(1)
The unhandled code will print out this traceback:
Traceback (most recent call last): File "C:\Users\<user>\Documents\depots\sae-501\issues\scapy_win_oserror.py", line 5, in <module> packets = sniff(iface="Ethernet", count=4, filter="arp", monitor=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\<user>\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\sendrecv.py", line 1424, in sniff sniffer._run(*args, **kwargs) File "C:\Users\<user>\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\sendrecv.py", line 1273, in _run sniff_sockets[_RL2(iface)(type=ETH_P_ALL, iface=iface, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\<user>\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\arch\libpcap.py", line 530, in __init__ fd = open_pcap( ^^^^^^^^^^ File "C:\Users\<user>\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\arch\windows\__init__.py", line 784, in open_pcap return _orig_open_pcap(iface_network_name, *args, **kargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\<user>\AppData\Local\Programs\Python\Python312\Lib\site-packages\scapy\arch\libpcap.py", line 366, in __init__ raise OSError(errmsg) OSError: Generic error
N.B. The user name has been omitted.
No unhandled error + the packets from my network.
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Brief description
When we try to launch
sniff()
on Windows 11 with the monitor mode enabled, we only get aOSError: Generic Error
Scapy version
https://github.com/secdev/scapy.git@3cbb62e04637f686867f9693275c14be938a229f
Python version
Python 3.12.8
Operating system
Microsoft Windows 11 [Version 10.0.26100.2605]
Additional environment information
Npcap was installed with only raw 802.11 support (and monitor mode).
How to reproduce
Actual result
The unhandled code will print out this traceback:
N.B. The user name has been omitted.
Expected result
No unhandled error + the packets from my network.
Related resources
No response
The text was updated successfully, but these errors were encountered: