I'm trying to open a .pcap file in python. can anyone help with this? each time I try this, it gives an error message that "IOError: [Errno 2] No such file or directory: 'test.pcap'"
import dpkt
f = open('test.pcap')
pcap = dpkt.pcap.Reader(f)
Try giving open() the correct path to test.pcap:
f = open(r'C:\Users\hollandspur\Documents\test.pcap')
or some such...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With