diff --git a/listener.py b/listener.py index 551691b..dd9183f 100755 --- a/listener.py +++ b/listener.py @@ -86,13 +86,14 @@ def handle_packet(pkt): ssid_map[a2] = ssid # === Track all seen clients === - sa = dot11.addr2.lower() if dot11.addr2 else None - da = dot11.addr1.lower() if dot11.addr1 else None - - for mac in (sa, da): - if is_unicast(mac) and mac != target_ap_bssid: - clients[mac] += 1 + if dot11.type == 2: + sa = dot11.addr2.lower() if dot11.addr2 else None + da = dot11.addr1.lower() if dot11.addr1 else None + for mac in (sa, da): + if is_unicast(mac) and mac != target_ap_bssid: + print(f"[D] Counting client: {mac} (frame type: {dot11.type}, subtype: {dot11.subtype})") + clients[mac] += 1 # Track clients talking to the same AP we're connected to if target_ap_bssid: