Handle potential None value for addr2 in packet processing

This commit is contained in:
Yaro Kasear 2025-05-01 10:06:08 -05:00
parent 4517f0cc95
commit d24157ba52

View file

@ -73,7 +73,10 @@ def handle_packet(pkt):
dot11 = pkt[Dot11]
a1 = dot11.addr1.lower()
a2 = dot11.addr2.lower()
try:
a2 = dot11.addr2.lower()
except:
a2 = None
# === Detect APs via beacons/probe responses ===
if dot11.type == 0 and dot11.subtype in (5, 8): # Probe Response or Beacon