Python - Scapy Choosing an interface to sniff

python, scapy, sniffer

Solution

You can use the iface parameter.

sniff(iface="wlan0", prn=exampleFunction) 

But if no interface is given, sniffing will happen on every interfaces.

You can look in the Sniffing section in the Scapy webpage

Problem

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.

Original source