摘要: import dpktimport structimport sys,osf=file(sys.argv[1],"rb")pcap=dpkt.pcap.Reader(f)for ts, buf in pcap: eth=dpkt.ethernet.Ethernet(buf) ip=eth.data tcp=ip.data if eth.type == dpkt.ethernet.ETH_TYPE_IP: src_tuple = map(ord, ip.src) print "src ip addr: (%d.%d.%d.%d)" % ((sr... 阅读全文
posted @ 2014-03-17 17:38 Daniel King 阅读(1197) 评论(0) 推荐(0) 编辑