`

Ethereal抓包过滤器表达式

 
阅读更多

下面是Ethereal帮助中给出的一些简单的例子:
1. Ethernet: capture all traffic to and from the Ethernet address 08:00:08:15:ca:fe
    ether host 08:00:08:15:ca:fe
2. IP: capture all traffic to and from the IP address 192.168.0.10
    host 192.168.0.10
3. TCP: capture all traffic to and from the TCP port 80 (http) of all machines
    tcp port 80
4. combined: capture all traffic to and from 192.168.0.10 except http
    host 192.168.0.10 and not tcp port 80
【注意】上面例子表达式中的IP地址对于IP中嵌套IP来讲,仅对外层IP有效,对嵌套在IP包中的IP是无效的。

 

R6口抓包的例子
表达式:ip[6:2] & 0x1fff = 0
表达式整体的含义为:从IP包中取出第6和第7(从0字节开始数)这2个字节,和0x1fff相与,如果结果为0,则抓取该包,否则丢掉。
表达式:ip[2:2] & 0xffff =0x005c
按此表达式抓包,可以抓到所有长度为92字节的IP包,其它包被过滤掉,抓包文件中只有这些长度为92字节的PING包。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics