gpt4 book ai didi

Wireshark 过滤器每个 ip 地址 "different from"东西

转载 作者:行者123 更新时间:2023-12-02 01:09:51 25 4
gpt4 key购买 nike

我想获取所有捕获的数据包,其中原始或目标 IP 地址不同于 192.168.0.1。为此,我尝试了 ip.addr != 192.168.0.1,但过滤器变成了黄色,而不是绿色,所以一定是出了什么问题。

如何(正确)完成?

最佳答案

6.4.4. A common mistake

[Warning] Warning! Using the != operator on combined expressions like: eth.addr, ip.addr, tcp.port, udp.port and alike will probably not work as expected!

Often people use a filter string to display something like ip.addr == 1.2.3.4 which will display all packets containing the IP address 1.2.3.4.

Then they use ip.addr != 1.2.3.4 to see all packets not containing the IP address 1.2.3.4 in it. Unfortunately, this does not do the expected.

Instead, that expression will even be true for packets where either source or destination IP address equals 1.2.3.4. The reason for this, is that the expression ip.addr != 1.2.3.4 must be read as "the packet contains a field named ip.addr with a value different from 1.2.3.4". As an IP datagram contains both a source and a destination address, the expression will evaluate to true whenever at least one of the two addresses differs from 1.2.3.4.

If you want to filter out all packets containing IP datagrams to or from IP address 1.2.3.4, then the correct filter is !(ip.addr == 1.2.3.4) as it reads "show me all the packets for which it is not true that a field named ip.addr exists with a value of 1.2.3.4", or in other words, "filter out all packets for which there are no occurrences of a field named ip.addr with the value 1.2.3.4".

Source

关于Wireshark 过滤器每个 ip 地址 "different from"东西,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18600692/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com