Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use pcap module #33

Open
GoogleCodeExporter opened this issue Jun 14, 2015 · 0 comments
Open

how to use pcap module #33

GoogleCodeExporter opened this issue Jun 14, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant