From 57e0898e99dd5338128817424cd81ba558a1990d Mon Sep 17 00:00:00 2001 From: Paul-Emmanuel Raoul Date: Sun, 18 Feb 2018 18:00:57 +0000 Subject: [PATCH] improve the debug mode --- sniff-probe-req | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sniff-probe-req b/sniff-probe-req index b5f7a56..270151f 100755 --- a/sniff-probe-req +++ b/sniff-probe-req @@ -125,7 +125,9 @@ class ProbeRequestSniffer: self.frame_filters = "type mgt subtype probe-req" self.socket = None self.stop_sniffer = Event() + self.exception = None + self.debug = debug if mac_exclusions is not None: self.frame_filters += " and not (" @@ -149,7 +151,7 @@ class ProbeRequestSniffer: self.frame_filters += ")" - if debug: + if self.debug: print("[!] Frame filters: " + self.frame_filters) def run(self): @@ -169,6 +171,9 @@ class ProbeRequestSniffer: except Exception as e: self.exception = e + if self.debug: + print("[!] Exception: " + str(e)) + def join(self, timeout=None): """ Stops the packet sniffer.