diff --git a/listener.py b/listener.py index 0ff3c9a..b525054 100755 --- a/listener.py +++ b/listener.py @@ -153,9 +153,9 @@ def reset_interface(interface): def get_connected_bssid(interface): try: out = subprocess.check_output(["iw", interface, "link"]).decode() - match = re.search(r"Connected to ([0-9a-f:]{17})", out.lower()) + match = re.search(r"Connected to ([0-9A-Fa-f:]{17})", out, re.MULTILINE) if match: - return match.group(1) + return match.group(1).lower() print("[!] No valid MAC address found in iw link output.") return None except Exception as e: