Wireshark显示过滤器设置

来源:互联网 发布:软件之间的接口 编辑:程序博客网 时间:2024/05/16 10:31

Wireshark显示过滤器的语法跟Wireshark抓包过滤器的语法是不一样的,不过我们没必要去死记硬背这些语法,毕竟Wireshark只是一个软件而已,平常用得多了语法自然也就熟悉了,大不了查一下帮助文档。

一、语法说明

1、比较运算符
> 大于
> 小于
== 等于
>= 大于等于
<= 小于等于
!= 不等于

2、逻辑运算符
and 两个条件必须同时满足
or 两个条件中至少一个条件被满足
xor 有且仅有一个条件被满足
not 没有条件被满足

3、IP地址
ip.addr
ip.src
ip.dst

4、端口过滤
tcp.port
tcp.srcport
tcp.dstport
tcp.flag.syn
tcp.flag.ack

5、协议过滤
arp ARP可以把IP解析成MAC,也可以把MAC解析成IP
ip
icmp
udp
tcp
bootp
dns

二、实例演示

1、过滤IP案例
ip.addr == 192.168.1.1
ip.src == 192.168.1.1
ip.dst == 192.168.1.1
ip.src == 192.168.1.1 and ip.dst == 58.520.9.9

2、过滤端口案例
tcp.port == 80
tcp.srcport == 80
tcp.dstport == 80
tcp.flag.syn == 1
tcp.flag.ack == 1

3、过滤协议案例
arp
tcp
udp
not http
not arp

4、综合过滤案例
ip.src == 192.168.1.100 and tcp.dstport == 80
ip.addr == 192.168.1.100 and udp.port == 3000