You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "Packet_Sniffer.py", line 27, in
sniff("wifi0")
File "Packet_Sniffer.py", line 8, in sniff
scapy.sniff(iface=interface, store=False, prn=process_sniffed_packet)
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 972, in sniff
sniffer._run(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 841, in _run
sniff_sockets[L2socket(type=ETH_P_ALL, iface=iface,
File "/usr/local/lib/python3.8/dist-packages/scapy/arch/linux.py", line 467, in init
self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type)) # noqa: E501
File "/usr/lib/python3.8/socket.py", line 231, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
The text was updated successfully, but these errors were encountered:
Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.
If you are using kali Linux and installing it on a virtual machine then you need to buy a wifi adapter. Or you should install the kali linux on your real machine. Also remove the iface argument from sniff function.
I'm using Scapy, on WSL. I checked for my network interface which is "wifi0". Using scapy I am trying to implement a packet sniffer.
import scapy.all as scapy
from scapy.layers import http
def sniff(interface):
8. scapy.sniff(iface=interface, store=False, prn=process_sniffed_packet)
def process_sniffed_packet(packet):
if packet.haslayer(http.HTTPRequest):
.
.
.
.
.
.
.
Executing this throws an error, as under.
Traceback (most recent call last):
File "Packet_Sniffer.py", line 27, in
sniff("wifi0")
File "Packet_Sniffer.py", line 8, in sniff
scapy.sniff(iface=interface, store=False, prn=process_sniffed_packet)
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 972, in sniff
sniffer._run(*args, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/scapy/sendrecv.py", line 841, in _run
sniff_sockets[L2socket(type=ETH_P_ALL, iface=iface,
File "/usr/local/lib/python3.8/dist-packages/scapy/arch/linux.py", line 467, in init
self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type)) # noqa: E501
File "/usr/lib/python3.8/socket.py", line 231, in init
_socket.socket.init(self, family, type, proto, fileno)
OSError: [Errno 97] Address family not supported by protocol
The text was updated successfully, but these errors were encountered: