Scapy sniff the packet multiple times?

后端 未结 1 1437
心在旅途
心在旅途 2021-01-23 21:37

I am using Scapy to capture packets by using the following code

from scapy.all import *

def verify(p):
     p.display()

sniff(prn=verify, iface=\"lo\")


        
相关标签:
1条回答
  • 2021-01-23 21:58

    This is expected behavior. Scapy sees the packets on the loopback interface both when they "leave" and when they "arrive." So everything is duplicated with no distinction, because loopback is a special interface. Perhaps you should yourself just skip every second packet.

    It was reported as a bug once, but rejected: https://bitbucket.org/secdev/scapy/issues/887/sniff-sends-packets-twice

    0 讨论(0)
提交回复
热议问题