Hi, I have successfully created a filter and captured the packets I need. I have looked at the various save and export options in Wireshark, and fail to find an option to save only the payload data in a binary file without any file headers or formatting. Is this possible in Wireshark, or do I need to create some sort of script to do this? Thanks in advance for any replies. asked 10 Aug '14, 01:36 yulquen |
One Answer:
Wireshark
Scripting:
tshark examples:
Lua Examples:
Regards answered 10 Aug '14, 06:24 Kurt Knochner ♦ edited 10 Aug '14, 06:25 showing 5 of 10 show 5 more comments |
Follow TCP stream seems to be the easiest solution, but there seems to be a limitation.
When I select the first packet and Follow TCP stream, only a small part of the data is available (about 204KB of 16MB's of data capture). Saving as raw gives me the payload data I wanted, but only a small fraction of the whole data set.
did you limit the frame size during the capture phase?
Please check if bytes on wire and bytes captured (Frame layer) are identical.
They are the same (1514 bytes).
My capture have 10881 packets. If I select a "Follow TCP stream" the dropdown says "Entire conversation (204400 bytes)" and when I do a raw save, thats how big my file gets.
TCP segment length is 1460 so it amounts to payload from exactly 140 packets instead of 10881.
hm.. could be a bug. What is your
can you please try version 1.10.9?
done, same result.
well, then it's probably related to your capture file. Is there any special protocol on top of TCP that Wireshark 'detetcs', like SMTP, HTTP, etc.?
The packet details only lists Ethernet II, IP V4 and TCP for all packets.
If I disable all other protocols, theres an additional listing for data (1460 bytes). But even so, selecting "Follow TCP stream", it still says 204400 bytes in total. Looking av the raw export file in a hex-viewer, it is clear that Wireshark just exports the payload from the 140 first frames, and leaves the rest of them out .
hm... sounds like a bug. Please file a bug report at https://bugs.wireshark.org and add a reference to this question. Please add as much information as possible, e.g. a smaller capture file that helps to reproduce the problem.