I need to see whole HTTP packets sent and recieved by an application for debugging purposes. How can this be done in command-line?

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted

You can use a tcpdump command like:

$ sudo tcpdump -i <interface> -s 1518 -XX -vv -n "tcp port 80"

You customize the command according to your needs. You can add -w filename.pcap to save the dump to a file. Then, you can read the dump file using -r filename.pcap.

link|improve this answer
2  
You can use -s0 for no limit to the snaplen. – Cakemox Mar 4 '11 at 11:58
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.