首页 > Web开发 > 详细

tcpdump抓取http的数据

时间:2021-01-18 14:38:37      阅读:38      评论:0      收藏:0      [点我收藏+]

1. To monitor HTTP traffic including request and response headers and message body:

tcpdump -A -s 0 ‘tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)‘

2. To monitor HTTP traffic including request and response headers and message body from a particular source:

tcpdump -A -s 0 ‘src example.com and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)‘

3. To monitor HTTP traffic including request and response headers and message body from local host to local host:

tcpdump -A -s 0 ‘tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)‘ -i lo

4. To only include HTTP requests, modify “tcp port 80” to “tcp dst port 80” in above commands

5. Capture TCP packets from local host to local host

tcpdump -i lo

tcpdump抓取http的数据

原文:https://www.cnblogs.com/sanshuiqing/p/14292277.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!