From be2c674a2c56d0082ab90cc28e430824cf6cebc9 Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Fri, 2 May 2025 11:23:28 -0500 Subject: [PATCH] =?UTF-8?q?Ensure=20ClientsOnChannel=20respects=20main=20i?= =?UTF-8?q?nterface=E2=80=99s=20channel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- listener.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/listener.py b/listener.py index 99ab8a4..d5f8a30 100755 --- a/listener.py +++ b/listener.py @@ -162,7 +162,10 @@ def write_csv(outfile): row = { "Timestamp": timestamp, "ClientsOnAP": len([mac for mac, count in ap_clients[target_ap_bssid].items() if count > 3]), - "ClientsOnChannel": len([mac for mac, count in clients.items() if count > 3]), + "ClientsOnChannel": len([ + mac for mac, count in clients.items() + if count > 3 and mac in ap_clients and current_channel == bssid_channels.get(mac) + ]), "APsOnChannel": len(aps), "AvgAPSignal": round(sum([sum(v)/len(v) for v in ap_signals.values() if v]) / len(ap_signals) if ap_signals else 0, 2), "StrongestAPSignal": max([max(v) for v in ap_signals.values() if v], default=0),