标签: python scapy sniffing
我知道我可以用scapy做到这一点:
sniff(count=10)
嗅探10包。
我如何在python中嗅探10秒钟? scapy本身可以做到这一点,还是我需要用其他方法来处理它?</ p>
答案 0 :(得分:2)
您可以简单地将超时传递给sniff函数。有关更多详细信息,请参阅the official API documentation:
sniff
超时:在给定时间后停止嗅探(默认值:无)。