首页 > 其他 > 详细

tshark 抓包分析

时间:2016-11-11 19:26:43      阅读:210      评论:0      收藏:0      [点我收藏+]

一,安装
#yum install -y wireshark

二.具体使用案例

1.抓取500个包,提取访问的网址打印出来
tshark -s 0 -i eth0 -n -f ‘tcp dst port 80‘ -R ‘http.host and http.request.uri‘ -T fields -e http.host -e http.request.uri -l -c 50

2.抓取500个包,提取访问者访问地址及提交方式和访问者ip
tshark -s 0 -i eth0 -n -f ‘tcp dst port 80‘ -R ‘http.host and http.request.uri‘ -T fields -e frame.time -e ip.src -e http.request.method -e http.host -e http.request.uri -e ip.src -e ip.dst -l -c 500


3.抓取mysql的查询
tshark -i eth1 -d tcp.port==3306,mysql -T fields -e mysql.query ‘port 3306‘
tshark -i lo -d tcp.port==3306,mysql -T fields -e mysql.query ‘port 3306‘

指定类型
tshark -i lo -d tcp.port==3306,mysql -T fields -e mysql.query ‘port 3306‘ -R ‘mysql matches "SELECT|INSERT|DELETE|UPDATE"‘


4.统计http状态
tshark -n -q -z http,stat, -z http,tree

tshark 抓包分析

原文:http://www.cnblogs.com/itfenqing/p/6055077.html

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