You can find the current links to the script at this local address of this topic. The other posts, before that one, got me there, a step at a time...
I also removed [SOLVED] because this should be moved into Tips and Tricks, IMO.
---
title (previously): How to extract content from tshark-saved streams?
---
[[ The instructions are of course, only for people who, even if advanced, haven't delved into network traffic analysis ]]
Familiarize with how to follow streams
SSL Decode & My Hard-Earned Advice for SPDY/HTTP2 in Firefox
https://forums.gentoo.org/viewtopic-t-1029408.html
(beginners should study there or better the links from there; it is about SSL decrypt, but tcp and ssl streams are saved in similar fashion)
You will need to open in Wireshark a file... (don't know if Wireshark-2 still has issues:
net-analyzer/wireshark-2.0.0_rc3 saves different tcp streams (non-decryptable/non-gunzip'able)
https://bugs.gentoo.org/show_bug.cgi?id=565152
Wireshark-1.x is fine for this.)
To be able to open in Wireshark, the file:
dump_150927_1848_g0n.pcap
(find it at, and download it from:
http://www.CroatiaFidelis.hr/foss/cap/c ... LS-why-js/
Also I won't repeat the procedure how to extract the content from the stream below, I explained it somewhere in the "SSL Decode & My Hard-Earned Advice for SPDY/HTTP2 in Firefox" topic, linked above:
I'll (only!) partly repeat the procedure, for clarity.
Enter the filter: "tcp.stream eq 9" (without quotes). Select "raw" and save it as:
Code: Select all
dump_150927_1848_g0n_s00009-W.bin
Only that much of the procedure repeated, find how to extract the javascript file which is the content of that stream, at the above linked Gentoo Forums topic.
Download (empty dir where all the permissions you have...) the script that I wrote based on a fellow Unixer's script from:
http://www.CroatiaFidelis.hr/foss/cap/c ... dd-151119/
tshark-streams.sh
Look up what the issue is, which I figured out in part, but which I can not still solve the last few steps of, as I miss some understanding of something here, on:
[Wireshark-users] follow [tcp|ssl].stream with tshark
https://www.wireshark.org/lists/wiresha ... 00033.html
https://www.wireshark.org/lists/wiresha ... 00047.html
and finally today, when it dawned on me that the method was right:
https://www.wireshark.org/lists/wiresha ... 00048.html
And so run the script (running it without the second parameter will automatically list, and then follow and save all the streams from a PCAP for you!)...
And so run the script with the first parameter, the PCAP file, and the second, the same tcp stream filter expression we just worked with Wireshark (above):
Code: Select all
$ tshark-streams.sh dump_150927_1848_g0n.pcap "tcp.stream eq 9"
My question is pretty simple:
How do you extract the same javascript file content from that tshark-followed and -saved stream:
Code: Select all
dump_150927_1848_g0n_s00009.bin
( and it's without the infix "-W" as we earlier promised )
I really, at this time, don't have any inklings as to how to do it...
So if anybody helps out, thanks in advanced!
