secdev / scapy

Scapy: the Python-based interactive packet manipulation program & library.
https://scapy.net
GNU General Public License v2.0
10.81k stars 2.03k forks source link

sniff does not terminate on timeout #4590

Open AndryAsh opened 1 week ago

AndryAsh commented 1 week ago

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