From c3cebbd6c9a6e5516338f7d2bf37ac6769e929b6 Mon Sep 17 00:00:00 2001 From: Michael Scalzetti Date: Wed, 26 Oct 2022 03:10:37 -0400 Subject: [PATCH] renamed time parameter to timeout to avoid collision with time package --- src/sniffer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sniffer.py b/src/sniffer.py index 09dd93d..8a09687 100644 --- a/src/sniffer.py +++ b/src/sniffer.py @@ -38,15 +38,15 @@ class Sniffer: return code == 0 - def sniff(self, time): - time = int(time+0.5) + def sniff(self, timeout): + timeout = int(timeout+0.5) dump_file = f"{self.base_dir}/cap-{ int(time.time()) }" stdout, code = run_cmd(f"airodump-ng --write {dump_file} --write-interval 1 --output-format csv walfa0") if code != 0: return code - time.sleep(time+.1) # Give a bit of time for airodump to write + time.sleep(timeout+.1) # Give a bit of time for airodump to write stdout, code = run_cmd(f"killall -i airodump-ng")