C7 wrote:
I'm working with tethereal and the command that i've made is this:
tethereal.exe -i 2 -f "tcp port 3128" -R http.request.method=="GET" -w
capture.txt -c 20
But when i open the file, i can't read the first line:
It's not a text file. It's a binary file, in libpcap format. Don't try
to read it with a text editor (and don't call it a ".txt" file, as that
means that the OS would try to open it as a text file; call it ".pcap"
or something such as that).
What i want is to get the Hosts, but i need that the first line must be
in normal characters.
If i open the capture in Ethereal and export it to Plain Text, the
capture text becomes "normal".
That's what "export as plain text" means - it reads the binary capture
file (which is *intended* to be binary) and saves the dissected packets
to a text file.
If you want Tethereal to write out the dissected packets, *don't* use
the "-w" flag - just redirect the output to a file:
tethereal -i 2 -f "tcp port 3128" -R http.request.method=="GET" -c 20
>capture.txt
although if you want the detailed dissection of the packets, you also
use the "-W" flag.