the filter of sniff function in scapy does not work properly

前端 未结 5 2901
渐次进展
渐次进展 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:45

    There are known bugs with the filter function (especially when using the local loopback network!). It is advised to use lfilter (and depending on your needs also a stop_filter):

    Example usage: lfilter=lambda p: any(proto in [14010]) for proto in [TCP]), stop_filter =lambda x: x.haslayer(TCP)

    For more details on the lfilter see also: https://home.regit.org/2012/06/using-scapy-lfilter/

提交回复
热议问题