Hello everyone, I've just started using the pypcap and dpkt modules and tried the code on google code for pypcap and I get nothing.
Heres the code I used:
import dpkt, pcap pc = pcap.pcap() pc.setfilter('icmp') for ts, pkt in pc: print `dpkt.ethernet.Ethernet(pkt)`
I think this is suposed to print all the ICMP packets that are caught on the wire, but I get nothing, even when I ping something.
Theres almost no documentation(that I can find) so I'm unsure what I'm doing wrong. Hopefully someone here can shed some light on this.
Also if someone knows of a tutorial that explains the pypcap module, I would be very happy. I've seen this one and am not getting much from it.
EDIT: Also, I'm using python 2.5