nopasaran.sniffers.sniffer.Sniffer¶
- class nopasaran.sniffers.sniffer.Sniffer(machine, filter='')¶
Bases:
AsyncSnifferCustom Sniffer class inheriting from the AsyncSniffer of Scapy.
- __init__(machine, filter='')¶
Initialize the Sniffer.
- Args:
machine (str): A string defining the machine to sniff. filter (str): A string defining the filter for packets.
Methods
__init__(machine[, filter])Initialize the Sniffer.
join(*args, **kwargs)set_filter(filter)Set a new filter.
start()Starts AsyncSniffer in async mode
stop([join])Stops AsyncSniffer if not in async mode
- set_filter(filter)¶
Set a new filter.
- Args:
filter (str): The new filter string.
- start() None¶
Starts AsyncSniffer in async mode
- stop(join: bool = True) PacketList | None¶
Stops AsyncSniffer if not in async mode