Add clarification note on ClientsOnAP exceeding ClientsOnChannel
This commit is contained in:
parent
a5f8123c45
commit
ce437ca43c
1 changed files with 10 additions and 4 deletions
14
listener.py
14
listener.py
|
@ -1,4 +1,8 @@
|
||||||
#!/usr/bin/env python3
|
#!/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 csv
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
@ -329,10 +333,12 @@ def get_mac_vendor(mac):
|
||||||
urllib.request.urlretrieve(url, "oui.txt")
|
urllib.request.urlretrieve(url, "oui.txt")
|
||||||
with open("oui.txt", "r", encoding="utf-8", errors="ignore") as f:
|
with open("oui.txt", "r", encoding="utf-8", errors="ignore") as f:
|
||||||
for line in f:
|
for line in f:
|
||||||
if prefix in line:
|
if line.strip().endswith("(hex)"):
|
||||||
vendor = line.strip().split("\t")[-1]
|
parts = line.split()
|
||||||
vendor_cache[prefix] = vendor
|
if len(parts) >= 3 and parts[0] == prefix:
|
||||||
return vendor
|
vendor = " ".join(parts[2:]).replace("(hex)", "").strip()
|
||||||
|
vendor_cache[prefix] = vendor
|
||||||
|
return vendor
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pass
|
pass
|
||||||
vendor_cache[prefix] = "Unknown"
|
vendor_cache[prefix] = "Unknown"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue