i use pcap and dpkt module to capture http packets and analysis it,but i don't
known how to use the pcap module.
1. what is setfilter() return
2. how to set a BPF argument
3. what is pcap.pcap() return,is it iterateble
4.is there document about how to use pypcap module
code:
>>> import dpkt, pcap
>>> pc = pcap.pcap()
>>> pc.setfilter(‘icmp’)
>>> for ts, pkt in pc:
… print `dpkt.ethernet.Ethernet(pkt)`
…
Original issue reported on code.google.com by hmyb...@gmail.com on 18 Mar 2011 at 12:58
Original issue reported on code.google.com by
hmyb...@gmail.com
on 18 Mar 2011 at 12:58