Handle potential None value for addr2 in packet processing
This commit is contained in:
parent
4517f0cc95
commit
d24157ba52
1 changed files with 4 additions and 1 deletions
|
@ -73,7 +73,10 @@ def handle_packet(pkt):
|
||||||
|
|
||||||
dot11 = pkt[Dot11]
|
dot11 = pkt[Dot11]
|
||||||
a1 = dot11.addr1.lower()
|
a1 = dot11.addr1.lower()
|
||||||
|
try:
|
||||||
a2 = dot11.addr2.lower()
|
a2 = dot11.addr2.lower()
|
||||||
|
except:
|
||||||
|
a2 = None
|
||||||
|
|
||||||
# === Detect APs via beacons/probe responses ===
|
# === Detect APs via beacons/probe responses ===
|
||||||
if dot11.type == 0 and dot11.subtype in (5, 8): # Probe Response or Beacon
|
if dot11.type == 0 and dot11.subtype in (5, 8): # Probe Response or Beacon
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue