按域名过滤

20
我想通过域名筛选我的pcap文件。也就是说,我想查看以“.com”、“ .org”或“ .net” 结尾的网站收到的数据包。
我尝试过以下方式:dns contains "com"、ip.src_host == com、ip.src_host == com、http contains "com"。但它们都没有正常工作。

这些保存的捕获文件是您正在尝试过滤的吗?还是运行中的捕获文件?从http://www.wireshark.org/docs/wsug_html_chunked/ChAdvNameResolutionSection.html 解析后的名称未存储在捕获文件或其他任何地方。解析的DNS名称由Wireshark缓存。 - Thaddeus Albers
它们已经是被捕获的文件了。非常感谢您的回答,Thaddeus。 - Eray Balkanli
1个回答

24

假设是 http 网络流量,请尝试使用 http.host contains ".com"

更好的选择是,尝试 http.host matches "\.com$"

这两种方式都不需要进行 DNS 解析,因为它们在 Web 主机上进行搜索。

来自 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.

2
我可以问一下,当我将“http”作为过滤器时,我看不到任何数据包。但是,当我写“tcp.port == 80”时,我可以看到很多数据包。您认为这是为什么? - Eray Balkanli

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接