scapy icon indicating copy to clipboard operation
scapy copied to clipboard

sniff does not terminate on timeout

Open AndryAsh opened this issue 1 year ago • 1 comments

Brief description

OS Debian 12, scapy v.2.6.1 The timeout parameter does not work when capturing packets: sniff(iface = interface, filter=“port 9999”, count = 1, timeout = 10) If there are no packets to capture, sniff should terminate after 10 seconds, but it does not - the program hangs.

Scapy version

2.6.1

Python version

3.11.2

Operating system

Linux 6.1.0-26-amd64 x86_64

Additional environment information

No response

How to reproduce

data = sniff(iface = interface, filter="port 9999", count = 1, timeout = 10) print(data)

Actual result

No response

Expected result

No response

Related resources

No response

AndryAsh avatar Nov 15 '24 11:11 AndryAsh

Timeout seems to be working fine for me. I was not able to reproduce it with Version Scapy 2.6.1 and OS Debian 12. Can you share more details on this.

satveerbrar avatar Dec 16 '24 22:12 satveerbrar