From fa7e87b974f5f894c226e64d7e64ce46faf25b78 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 4 Feb 2024 17:41:41 +0100 Subject: [PATCH] remove blind bug, as its not a blind bug anymore. delayed hopping channels by .2 seconds to give firmware time to get ready for hopping. --- bin/pwnagotchi | 2 ++ builder/data/usr/bin/pwnlib | 8 -------- pwnagotchi/agent.py | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/bin/pwnagotchi b/bin/pwnagotchi index e09024e1..c0540374 100755 --- a/bin/pwnagotchi +++ b/bin/pwnagotchi @@ -51,6 +51,7 @@ def pwnagotchi_cli(): agent.mode = 'auto' agent.start() config = agent.config() + session = agent.session() while True: try: @@ -60,6 +61,7 @@ def pwnagotchi_cli(): channels = agent.get_access_points_by_channel() # for each channel for ch, aps in channels: + time.sleep(0.2) # This is to make sure it doesn't error (https://github.com/seemoo-lab/nexmon/issues/596) agent.set_channel(ch) if not agent.is_stale() and agent.any_activity(): diff --git a/builder/data/usr/bin/pwnlib b/builder/data/usr/bin/pwnlib index 6447624e..fa25d682 100755 --- a/builder/data/usr/bin/pwnlib +++ b/builder/data/usr/bin/pwnlib @@ -13,14 +13,6 @@ blink_led() { sleep 0.3 } -# check if brcm is stuck -check_brcm() { - if [[ "$(journalctl -n10 -k --since -5m | grep -c 'brcmf_cfg80211_nexmon_set_channel.*Set Channel failed')" -ge 5 ]]; then - return 1 - fi - return 0 -} - # reload mod reload_brcm() { if ! modprobe -r brcmfmac; then diff --git a/pwnagotchi/agent.py b/pwnagotchi/agent.py index 5916ce05..c7199ca7 100644 --- a/pwnagotchi/agent.py +++ b/pwnagotchi/agent.py @@ -179,8 +179,7 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer): for ap in s['wifi']['aps']: if ap['encryption'] == '' or ap['encryption'] == 'OPEN': continue - elif ap['hostname'] in whitelist or ap['mac'][:13].lower() in whitelist or ap[ - 'mac'].lower() in whitelist: + elif ap['hostname'] in whitelist or ap['mac'][:13].lower() in whitelist or ap['mac'].lower() in whitelist: continue else: aps.append(ap)