2

For example I have a server listening on port 8001, a client programe open a tcp socket connect to that port, send some binary data, I want to capture the actual data only without any TCP/IP header such as tcp handshake stuff..

Is that possible with tcpdump?

0

Nope, the tcpdump haven't features to exctract payload (cut off the headers). Also the aren't any built-in features about deep analysis of application layer data. But you can write the traffic into the file, and extract the actual data with wireshark features.

| improve this answer | |
0

You can obtain something similar using tcpdump -i any <your_filter> -A. From man tcpdump:

-A Print each packet (minus its link level header) in ASCII. Handy for capturing web pages.

To obtain a more focused dump (ie: remove some handshake packet) you can play with the filter rules, for example removing tcp-syn packet from filtering.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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