I am attempting to use PyPy and Scapy to sniff on a wireless adapter. I'm on Ubuntu Linux, so I put my card into monitor mode using airmon-ng, open up a REPL, and type the following (after importing scapy):
sniff(prn=lambda pkt: pkt.summary(), iface='mon0')
This works fine in the CPython REPL. However, in the PyPy REPL, I get the following error:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "scapy/sendrecv.py", line 550, in sniff
s = L2socket(type=ETH_P_ALL, *arg, **karg)
File "scapy/arch/linux.py", line 452, in __init__
self.ins.bind((iface, type))
File "<string>", line 1, in bind
error: unknown address family
This also occurs if I turn off monitor mode and attempt to sniff the standard adapter (wlan0). However, it does appear to work with a non-wireless interface (eth1).
The PyPy Compatibility index list Scapy as working with PyPy. After some googling, I came across this post which looks like it could be an answer, but both links are no longer working. Any input on the subject would be much appreciated.
Thank you in advance,
Ryan