Wireshare的抓包过滤器和显示过滤器的基本语法及举例,一目了然不作详细解释。tcp
抓包过滤器:ide
语法:spa
类型:host、net、portdns
方向:src、dstip
协议:ether、ip、tcp、udp、http、ftpit
逻辑运算符:ast
&&与class
||或ftp
!非udp
举例:
src host 192.168.188.6 && dst port 80 #源地址是192.168.188.6,目的为80的流量
host 192.168.188.6 || host 192.168.180.100 #两个地址的流量
!broadcast #不抓广播包
host 192.168.188.6 && host 192.168.180.210 && icmp
src host 192.168.188.6 && dst host 192.168.180.210 && icmp
icmp
显示过滤器:
语法:
比较操做符:
==
!=
>
<
>=
<=
逻辑操做符:
and
or
xor
not
IP地址:ip.addr、ip.src、ip.dst
端口过滤:tcp.port、tcp.srcport、tcp.dstport、tcp.flag.syn、tcp.flag.ack
协议过滤:arp、ip、icmp、udp、tcp、bootp、dns
举例:
ip.addr==192.168.188.6 and icmp
ip.addr==192.168.188.6 and tcp.port==80