tcpdump captures network http traffic

tcpdump -i any -s 0 -A | egrep -i "POST /|GET /|Host:"
This command will use tcpdump to capture network traffic and filter out traffic containing POST, GET and Host fields.
The meanings of the specific options are as follows:
* `-i any`: Capture the traffic of any network interface.
* `-s 0`: Specifies that only the first 0 bytes of each data packet are captured when capturing packets, that is, only the header information of the data packet is captured, and the content of the data packet is not included.
* `-A`: Display the captured packet content in text form for easy viewing.
* `egrep -i "POST /|GET /|Host:"`: Use regular expressions to filter out traffic containing POST, GET and Host fields.
Therefore, this command will capture and display network packet headers containing POST, GET, and Host fields.

Guess you like

Origin blog.csdn.net/taoshihan/article/details/131428702