diff --git a/src/sniffer.py b/src/sniffer.py index 2ec9865..5012596 100644 --- a/src/sniffer.py +++ b/src/sniffer.py @@ -15,8 +15,6 @@ def run_cmd(cmd, out=subprocess.PIPE, timeout=None): - - class Sniffer: def __init__(self, interface_name): self.ifname = interface_name @@ -45,7 +43,7 @@ class Sniffer: dump_file = f"{self.base_dir}/cap-{ int(time.time()) }" stdout, stderr, code = run_cmd(f"airodump-ng --write {dump_file} --write-interval 1 --output-format csv walfa0", timeout=timeout) - if code != 0: + if code != 0 and code != -1: return code full_filepath = f"{dump_file}-01.csv"