From ce437ca43c6e9f6674a3a431fbc6694d9800771a Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 2 May 2025 11:45:45 -0500 Subject: [PATCH] Add clarification note on ClientsOnAP exceeding ClientsOnChannel --- listener.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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"