diff --git a/listener.py b/listener.py index 7234c6e..4505079 100755 --- a/listener.py +++ b/listener.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 + +# Note: ClientsOnAP may exceed ClientsOnChannel due to silent/low-activity clients +# receiving traffic from AP but not sending enough to cross channel activity threshold. + import csv import os import re @@ -329,10 +333,12 @@ def get_mac_vendor(mac): urllib.request.urlretrieve(url, "oui.txt") with open("oui.txt", "r", encoding="utf-8", errors="ignore") as f: for line in f: - if prefix in line: - vendor = line.strip().split("\t")[-1] - vendor_cache[prefix] = vendor - return vendor + if line.strip().endswith("(hex)"): + parts = line.split() + if len(parts) >= 3 and parts[0] == prefix: + vendor = " ".join(parts[2:]).replace("(hex)", "").strip() + vendor_cache[prefix] = vendor + return vendor except Exception as e: pass vendor_cache[prefix] = "Unknown"