I am having issues running this code on my machine, but it works fine on my schools linux machines.
The error i am getting is:
Traceback (most recent call last):
File "wireshark_02.py", line 74, in <module>
main()
File "wireshark_02.py", line 43, in main
input_data = dpkt.pcap.Reader(open(file_name,'r'))
File "C:\Users\Slava\AppData\Local\Programs\Python\Python36-32\lib\site-packages\dpkt\pcap.py", line 244, in __init__
buf = self.__f.read(FileHdr.__hdr_len__)
File "C:\Users\Slava\AppData\Local\Programs\Python\Python36-
32\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position
125: character maps to <undefined>
I've installed dpkt running pip install dpkt.
Is there anything i can do to make this work on my machine or do i need to use my schools computers?
open(file_name, 'rb')
worked for me!
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