Python - Scapy Choosing an interface to sniff

oridamari picture oridamari · Feb 28, 2015 · Viewed 15.2k times · Source

Im building a sniffer with Scapy, python 2.6.6 and windows 7 and I want to know if I can choose the interface to sniff before sniffing, kind of like Wireshark.

Answer

zsnafu picture zsnafu · Apr 25, 2018

I realize this is a dated post. One of the solutions mentions:

But if no interface is given, sniffing will happen on every interfaces. You can look in the Sniffing section in the Scapy webpage

Unfortunately the documentation is wrong. When no interface is given then the scapy sniffs on conf.iface

Please see the conversation on their github repo:

https://github.com/secdev/scapy/issues/1356