the filter of sniff function in scapy does not work properly

前端 未结 5 2858
渐次进展
渐次进展 2021-02-20 18:01

It seems that the filter of sniff function does not work properly.

I m executing the sniff with the following filter

a=sniff(co         


        
5条回答
  •  一生所求
    2021-02-20 18:25

    I had the same problem with Centos on VM. I used ip host for filter instead of host. That seem to have fixed the issue in my case.

    Wrong Filter#

    >>> packets = sniff (filter = "host 176.96.135.80", count =2, iface = "eth0", timeout =10)
    >>> packets.summary()
    Ether / IP / UDP 172.7.198.136:netbios_ns > 172.7.199.255:netbios_ns / NBNSQueryRequest
    Ether / IP / TCP 176.96.135.80:53527 > 172.7.19.58:ssh A / Padding
    

    Fix#

    >>> packets = sniff (filter = "ip host 176.96.135.80", count =2, iface = "eth0", timeout =10)
    

    Did not have any issues after this.

提交回复
热议问题