the filter of sniff function in scapy does not work properly

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

    the sniff function need tcpdump to apply "filter". If there is no tcpdump, scapy reports a warning but doesn't throw. You can enable logging to check it.

    import logging
    import sys
    logging.getLogger("scapy").setLevel(1)
    logging.basicConfig(stream=sys.stdout, level=logging.INFO)
    
    from scapy.all import *
    

提交回复
热议问题