Add clarification note on ClientsOnAP exceeding ClientsOnChannel

This commit is contained in:
Yaro Kasear 2025-05-02 11:45:45 -05:00
parent a5f8123c45
commit ce437ca43c

View file

@ -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"