安装
yum install tcpflow
抓包
tcpflow -i enp4s0 port 80
-i 指定网络接口 ifconfig 可以查到
port 指定端口
http访问80端口,服务器tcpflow当前目录下会生成文 件
-rw-r--r--. 1 root root 499 1月 20 15:50 192.168.102.034.65236-192.168.102.100.00080
请求:192.168.102.034--访问-->192.168.102.100 80端口的数据
-rw-r--r--. 1 root root 1661 1月 20 15:50 192.168.102.100.00080-192.168.102.034.65236
返回:192.168.102.100--返回-->192.168.102.034的数据
查看请求数据:
more 192.168.102.034.65236-192.168.102.100.00080
POST /bdba/api/ezrpt/sys/user/verificationCode?randomCode=68235391 HTTP/1.1
Host: 100.iming.com
Connection: keep-alive
Content-Length: 0
Pragma: no-cache
Cache-Control: no-cache
Accept: application/json, text/plain, */*
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36
Origin: http://100.iming.com
Referer: http://100.iming.com/bdba/web/ezrpt/
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
查看返回数据:
more 192.168.102.100.00080-192.168.102.034.65236
HTTP/1.1 200 OK
Server: nginx/1.16.1
Date: Thu, 20 Jan 2022 07:50:45 GMT
Transfer-Encoding: chunked
Connection: keep-alive