From 9d56c97aa51b3a031623a184e659787fa7db5144 Mon Sep 17 00:00:00 2001 From: dadav <33197631+dadav@users.noreply.github.com> Date: Mon, 9 Dec 2019 20:12:34 +0100 Subject: [PATCH] Unknown variable; Logic error --- pwnagotchi/agent.py | 2 +- pwnagotchi/automata.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pwnagotchi/agent.py b/pwnagotchi/agent.py index 1cdf3bf0..7dbf41eb 100644 --- a/pwnagotchi/agent.py +++ b/pwnagotchi/agent.py @@ -212,7 +212,7 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer): ch = ap['channel'] # if we're sticking to a channel, skip anything # which is not on that channel - if not channels and ch not in channels: + if not channels or (channels and ch not in channels): continue if ch not in grouped: diff --git a/pwnagotchi/automata.py b/pwnagotchi/automata.py index 3b87243a..d087c471 100644 --- a/pwnagotchi/automata.py +++ b/pwnagotchi/automata.py @@ -20,7 +20,7 @@ class Automata(object): # when we're trying to associate or deauth something that is not in range anymore # (if we are moving), we get the following error from bettercap: # error 400: 50:c7:bf:2e:d3:37 is an unknown BSSID or it is in the association skip list. - if 'is an unknown BSSID' in str(error): + if 'is an unknown BSSID' in str(e): self._on_miss(who) else: logging.error(e)