ethereal的抓包过滤器

 
  抓包过滤器用来抓取感兴趣的包,用在抓包过程中。抓包过滤器使用的是libcap过滤器语言,在tcpdump的手册中有详细的解释,基本结构是:[not] primitive [and|or [not] primitive ...]
  个人观点:如果你想抓取某些特定的数据包时,可以有以下两种方法,你可以任选一种,个人比较偏好第二种方式:
  (1)在抓包的时候,就先定义好抓包过滤器,这样结果就是只抓到你设定好的那些类型的数据包;
  (2)先不管三七二十一,把本机收到或者发出的包一股脑的抓下来,然后使用下节介绍的显示过滤器,只让Ethereal 显示那些你想要的那些类型的数据包;
  3、etheral的显示过滤器(重点内容)
  在抓包完成以后,显示过滤器可以用来找到你感兴趣的包,可以根据协议、是否存在某个域、域值、域值之间的比较来查找你感兴趣的包。
  举个例子,如果你只想查看使用tcp协议的包,在ethereal窗口的左下角的Filter中输入tcp, 然后回车,ethereal就会只显示tcp 协议的包。
值比较表达式可以使用下面的操作符来构造显示过滤器自然语言类c 表示举例
eq ==
ip.addr==10.1.10.20
ne !=
ip.addr!=10.1.10.20
gt >
frame.pkt_len>10
lt <
lt < frame.pkt_len<10
ge >=
frame.pkt_len>=10
le <=
frame.pkt_len<=10

  表达式组合可以使用下面的逻辑操作符将表达式组合起来自然语言类c 表示举例
and &&:逻辑与
ip.addr=10.1.10.20&&tcp.flag.fin
or ||:逻辑或
ip.addr=10.1.10.20||ip.addr=10.1.10.21
xor ^^:异或
tr.dst[0:3] == 0.6.29 xor tr.src[0:3] == not
!:逻辑非
!llc

Ethereal is a GUI network protocol analyzer. It lets you interactively browse packet data from a live network or from a previously saved capture file. See: http://www.ethereal.com for new versions, documentation, ... Ethereal's native capture file format is libpcap format, which is also the format used by tcpdump and various other tools. So Ethereal can read capture files from: -libpcap/WinPcap, tcpdump and various other tools using tcpdump's capture format -snoop and atmsnoop -Shomiti/Finisar Surveyor captures -Novell LANalyzer captures -Microsoft Network Monitor captures -AIX's iptrace captures -Cinco Networks NetXRay captures -Network Associates Windows-based Sniffer captures -Network General/Network Associates DOS-based Sniffer (compressed or uncompressed) captures -AG Group/WildPackets EtherPeek/TokenPeek/AiroPeek/EtherHelp/PacketGrabber captures -RADCOM's WAN/LAN analyzer captures -Network Instruments Observer version 9 captures -Lucent/Ascend router debug output -files from HP-UX's nettl -Toshiba's ISDN routers dump output -the output from i4btrace from the ISDN4BSD project -traces from the EyeSDN USB S0. -the output in IPLog format from the Cisco Secure Intrusion Detection System -pppd logs (pppdump format) -the output from VMS's TCPIPtrace/TCPtrace/UCX$TRACE utilities -the text output from the DBS Etherwatch VMS utility -Visual Networks' Visual UpTime traffic capture -the output from CoSine L2 debug -the output from Accellent's 5Views LAN agents -Endace Measurement Systems' ERF format captures -Linux Bluez Bluetooth stack hcidump -w traces There is no need to tell Ethereal what type of file you are reading; it will determine the file type by itself. Ethereal is also capable of reading any of these file formats if they are compressed using gzip. Ethereal recognizes this directly from the file; the '.gz' extension is not required for this purpose.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值