I know I can do this with scapy:
sniff(count=10)
to sniff 10 packets.
How would I go about sniffing for 10 seconds instead in python? Can scapy do this itself or do I need to wrap it some other method to handle that?
You can simply pass a timeout to the sniff
function. For more details, refer to the official API documentation:
timeout: stop sniffing after a given time (default: None).