From 461f0efc55717fec0b947080b870e8f236041e4c Mon Sep 17 00:00:00 2001 From: Rony Munitz Date: Mon, 10 Jul 2023 10:46:01 +0800 Subject: [PATCH 1/2] Fixed return value of the srloop and srploop functions --- scapy/sendrecv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scapy/sendrecv.py b/scapy/sendrecv.py index 8628a000e96..de77850faf3 100644 --- a/scapy/sendrecv.py +++ b/scapy/sendrecv.py @@ -790,7 +790,7 @@ def srloop(pkts, # type: _PacketIterable # type: (...) -> Tuple[SndRcvList, PacketList] """ Send a packet at layer 3 in loop and print the answer each time - srloop(pkts, [prn], [inter], [count], ...) --> None + srloop(pkts, [prn], [inter], [count], ...) -> Tuple[SndRcvList, PacketList] """ return __sr_loop(sr, pkts, *args, **kargs) @@ -803,7 +803,7 @@ def srploop(pkts, # type: _PacketIterable # type: (...) -> Tuple[SndRcvList, PacketList] """ Send a packet at layer 2 in loop and print the answer each time - srloop(pkts, [prn], [inter], [count], ...) --> None + srloop(pkts, [prn], [inter], [count], ...) --> Tuple[SndRcvList, PacketList] """ return __sr_loop(srp, pkts, *args, **kargs) From 32ec515d18ed3b6efe75ad2d81cd7c85f97980dd Mon Sep 17 00:00:00 2001 From: Rony Munitz Date: Fri, 14 Jul 2023 14:01:52 +0800 Subject: [PATCH 2/2] Fixed AsyncSniffer/sniff documentation, if iface=None it will sniff only on conf.iface --- scapy/sendrecv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scapy/sendrecv.py b/scapy/sendrecv.py index de77850faf3..931615a26b6 100644 --- a/scapy/sendrecv.py +++ b/scapy/sendrecv.py @@ -1007,7 +1007,7 @@ class AsyncSniffer(object): we have to stop the capture after this packet. --Ex: stop_filter = lambda x: x.haslayer(TCP) iface: interface or list of interfaces (default: None for sniffing - on all interfaces). + on conf.iface). monitor: use monitor mode. May not be available on all OS started_callback: called as soon as the sniffer starts sniffing (default: None).