From d24157ba52de056ba8907f84f9bd19e1d8717c3a Mon Sep 17 00:00:00 2001 From: Yaro Kasear Date: Thu, 1 May 2025 10:06:08 -0500 Subject: [PATCH] Handle potential None value for addr2 in packet processing --- listener.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/listener.py b/listener.py index 90612df..b770f6b 100755 --- a/listener.py +++ b/listener.py @@ -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