Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to have a http POST request method CAPTURE filter.

I know it is easy to do it by display filter http.request.method==POST but I need tcpdump compatible.

I wrote tcp dst port 80 and (tcp[13] = 0x18)
But it is not perfect...

tcp dst port 80 and (tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354)
works better, but... packages are not treated as a http packages, so I can not do my further display filters...

And is there any way to not display frame, tcp, ip and http header information, only data-text-lines field value (content of POST)?

Or same thing in tcpdump, only dumping of POSTed html form content?

share|improve this question
    
I want to see only http POST packets in tcpdump –  user39051 Apr 8 '10 at 11:49

3 Answers 3

There's no guarantee that all of the posted data will be in the same packet as the POST command string itself. In fact, if the posted data is more than about 1500 bytes (probably a little less due to the presence of other HTTP headers), you're practically guaranteed it won't all be in the same packet. So for best results you'll need a filtering method that understands multi-packet HTTP transaction, and libpcap's filter language (which is what tcpdump uses and what wireshark uses for capture filters) ain't it.

share|improve this answer

What operating system?

If it's linux you can use tcpdump -s 0 -A -i <if> port 80 along with what ever other filters you need to capture and print the http packets you're interested in, and then pipe it to a perl/bash/awk/whatever script to filter that content from there.

share|improve this answer

Its hard to understand what your asking but my guess is that you just need to find the packet in your Wireshark capture, right click on it, and choose "Follow Stream" from the menu . Its just a guess... just trying to help?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.