Created
October 12, 2012 04:59
-
-
Save dzderic/3877408 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dpkt, pcap | |
pc = pcap.pcap('lo') | |
pc.setfilter('tcp and dst host 127.0.0.1 and port 8080 and tcp[tcpflags] & (tcp-push) != 0') | |
for timestamp, packet in pc: | |
print repr(dpkt.ethernet.Ethernet(packet)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment