我想从PCAP文件中提取时间戳(unix时间)和窗口值,并保存为以逗号分隔的文本文件:
timestamp,window
我尝试使用pypcapfile:
from pcapfile import savefile
testcap = open('/home/krsna/Desktop/1.pcap', 'rb')
capfile = savefile.load_savefile(testcap, verbose=True)
print (capfile.packets[0].__dir__())
print (capfile.packets[0].timestamp)
我该怎么做?