wireshark 过滤规则

wireshark 过滤规则

工作上用的最多的是抓http的包,但http是应用层协议,不是传输层协议,所以抓下来的.pcap文件中大量掺和着tcp的包,这严重影响阅读,所以了解如何写过滤规则极其重要!

过滤规则的拼接很简单,就和写sql语句一样:and,or。

过滤项 语法
协议 直接写即可
IP ip.src_host == xxx.xxx.xxx.xxx 以源ip过滤
ip.dst_host == xxx.xxx.xxx.xxx 以目的ip过滤
端口 tcp.srcport == xxxx 以源端口过滤
tcp.dstport == xxxx 以目的端口过滤
tcp.port == xxxx 过滤所有使用tcp xxxx端口的包

举个例子,我希望过滤访问本机8000端口的所有http包

http and ip.dst_host==192.168.31.17 and tcp.dstport==8000
posted @ 2024-06-28 23:53  勤匠  阅读(4)  评论(0编辑  收藏  举报