Refactor client tracking in handle_packet to improve clarity and add debug logging for counted clients.
This commit is contained in:
parent
021ea90d9a
commit
7be1b48831
1 changed files with 7 additions and 6 deletions
|
@ -86,14 +86,15 @@ def handle_packet(pkt):
|
|||
ssid_map[a2] = ssid
|
||||
|
||||
# === Track all seen clients ===
|
||||
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:
|
||||
if a1 and a2:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue