0
votes

I've an issue with scapy trying to run the following code:

if __name__ == '__main__':
    sniff(filter="ip",prn=packet_received, count=10)

(assume that packet_received is the callback method) I expect to get some packets but I got this error:

Unknown pypcap network interface '\Device\NPF_Loopback'

I've seen this thread: Unknown pypcap network interface 'eth0' error with python2 scapy on windows 10 machine and tried what the guy there said but it didn't worked, anyone know what is the issue?

I dont know if it matter (guess it is according to the forums) I am connected to the internet via external network adapter

Thanks for the help guys.

1
Have you installed Npcap ? Try to update itCukic0d
Sorry for the question, but what Npcap will help me? thanksDBS
If you're on Windows, you need to have Npcap installed to use Scapy, as stated in the documentation: scapy.readthedocs.io/en/latest/installation.html#windowsCukic0d
That worked, thank you very much!DBS

1 Answers

2
votes

Run this command in cmd if you are using windows:

net start npcap

That worked for me