Reputation: 379
I'm using Scapy 2.2.0 and Python 2.6 to sniff on Windows 7. I know that you can supply the iface
parameter to the sniff
function. for example:
sniff(count=5,iface = 'eth0', prn=lambda p:p.show())
If you don't supply this parameter, it sniffs in all interfaces. But is there a way to choose 2 out of 3 interfaces? something like this: (it doesn't work)
sniff(count=5, iface='eth0, eth14', prn=lambda p:p.show())
Upvotes: 6
Views: 4089
Reputation: 170
As of version 2.3.3, it's now possible to specify multiple interfaces using an array, like this example from scapy/usage.rst:
sniff(iface=["eth1","eth2"], prn=lambda x: x.sniffed_on+": "+x.summary())
Upvotes: 6
Reputation: 339
You could use threads in python and sniff each interface in a different thread:
https://docs.python.org/2/library/threading.html
Upvotes: 0