2014-02-26 28 views
12

我想按他们的域过滤我的pcap文件。我的意思是,我希望看到网站上的数据包以“.com”,“.org”或“.net”结尾。按域过滤

我想: DNS包含 “COM”, ip.src_host == COM, ip.src_host == COM, HTTP包含 “COM”。他们都没有正常工作。

+0

是你试图过滤或运行捕获文件所保存的这些捕获文件?从http://www.wireshark.org/docs/wsug_html_chunked/ChAdvNameResolutionSection.html解析的名称不存储在捕获文件或其他地方。已解决的DNS名称由Wireshark缓存。 –

+0

他们已经被捕获文件。谢谢你回答Thaddeus。 –

回答

12

假设它的HTTP网络流量,尽量http.host contains ".com"

更重要的是,尽量http.host matches "\.com$"

两者都不需要DNS解析,因为他们在网络主机上进行搜索。

http://wiki.wireshark.org/DisplayFilters

The matches operator makes it possible to search for text in string fields 
and byte sequences using a regular expression, using Perl regular expression 
syntax. Note: Wireshark needs to be built with libpcre in order to be able to 
use the matches operator. 
+0

请问,当我写“http”作为过滤器时,我看不到任何数据包。但是,当我写“tcp.port == 80”时,我可以看到很多数据包。你认为为什么会发生这种情况? –