Wireshark 常用过滤规则
一、过滤规则
基于IP地址的过滤
根据IP地址过滤(不限源目)
ip.addr == 192.168.0.1过滤源IP地址
ip.src == 192.168.0.1过滤目的IP地址
ip.dst == 192.168.0.1排除特定IP
!(ip.addr == 192.168.0.1)基于mac地址过滤
源mac地址
eth.src == 00:11:22:33:44:55目的mac地址
eth.dst == 00:11:22:33:44:55过滤TTL
ip.ttl <= 32过滤域名
源地址域名
src host www.baidu.com目标地址域名
dst host www.baidu.com过滤协议
多个
http or tcp or udp单个
http排除协议
not arp基于端口的过滤
特定端口
tcp.port == 80端口范围
tcp.port >= 60000 and tcp.port <= 80000基于http请求
根据方法过滤
http.request.method == "GET"根据url过滤
http.request.uri contains "user"显示所有http请求
http.request显示所有http响应
http.response基于数据包过滤
数据包的长度
udp.length < 20HTTP内容长度
http.content_length <=30显示特定关键字
data contains "password"三、运算符
| 比较/逻辑 | 符号运算符 | 文字运算符 |
|---|---|---|
| 等于 | == | eq |
| 不等于 | != | ne |
| 小于 | > | gt |
| 与 | && | and |
| 或 | ∥ | or |
| 非 | ! | not |