-
Notifications
You must be signed in to change notification settings - Fork 270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
windows : memory error reading pcap file #368
Comments
@massimosala you can email me the pcap at [email protected] |
@massimosala also which OS+arch are you on? I suspect the caplen for the pcap is corrupted (or wrong endian), leading python to read beyond file, leading to a MemoryError. We'll find out once we have a look at the pcap. |
I sent now the file to Brian. The file is written be me, from C#, after reading the docs. |
About caplen : do you mean a field in the file header or in the 5th packet header ? |
Now I am trying with other packets, captured by tcpdump on a linux box : same "memory error". |
Python 2.7.10 |
Here's the pcap in question |
@massimosala I tested your pcap on windows 10 and it works just fine. |
Solution: In windows, you open binary files in 'rb' mode. That should fix this.
|
I am ashamed to not think of that. Can I suggest you to add this to the docs ? Many thanks for your help. |
@massimosala no worries; I created a quick PR to raise an Exception when his happens on Windows. |
with the attached file, the first 4 packets are read and on the 5th
pcap.py first line
NOTE : wireshark opens and parses the file without warnings.
!!! I tried to attach the pcap file, zipped, but it fails. the raw file is 19 Kb, please fix the upload or give me an email to send it.
The text was updated successfully, but these errors were encountered: