大神们好
我需要在整个pcap file里面找出arp packet。 条件是不能读入library 的 pre-defined structure。
我目前是用 dpkt
import dpkt
f = open("xxx.pcap", "rb")
pcap = dpkt.pcap.reader(f)
for ts, but in pcap:
*
*
*
f.close()
对我什么都没有...
找到的资料都大概是
eth=dpkt.Ethernet.ethernet(buf)
ip= eth.data
然后就可以直接找protocol type了
但教授要求最多只能用library iterate thru the pcap file
剩下的要 parse in byte level programing
找完arp之后要print 所有arp header 里的资料,那个我会再努力想办法解决... 但我现在连起头都有障碍
感谢大神们帮忙
知道有点晚了,任何提示都感激不尽!