I\'ll try to demonstrate my problem with a simplified example.
Following is a very simple (single threaded) packet sniffer (ICMP):
from scapy.all imp
The main reason for this is most likely because of resource locks. Scapy's sniff()
function probably have to lock on to low-level network resources in order to be able to sniff packets.
Delaying the two threads (after starting the sniffer thread) you'll ensure that Scapy will get the time it needs to do so.
To see how we came to this conclusion see the discussion above in the comment section. Gl Asiri Rathnayake :)