on_bcap_sys_log fires on every bettercap syslog event matching "wifi error while hopping to channel". When bettercap is in a bad state, it sends many such events per second. Each one triggers agent.run() to flip wifi.recon, which also fails because bettercap is unstable. This creates a cascade of TypeError errors filling the log — 61 errors in a few minutes in observed logs. Two fixes: 1. Safe Message access: use event.get() with isinstance check instead of direct dict access into re.search(). Prevents TypeError when Message is None or non-string, and KeyError if event structure is unexpected. 2. Add 30-second cooldown: check self.LASTTRY before attempting a recon flip, matching the debounce pattern already used in on_epoch and _tryTurningItOffAndOnAgain. Update LASTTRY on all outcomes (success, failure, exception) to prevent cascading retries. Signed-off-by: CoderFX <4704376+CoderFX@users.noreply.github.com>
Pwnagotchi
This is the main source for all forks:
- RPiZeroW (32bit)
- RPiZero2W, RPi3, RPi4, RPi5 (64bit)
For installation docs check out the wiki!
If you want to sponsor this project you can use GH Sponsor or cryptocurrency:
Or send some ethereum: 0x33ceC4Abe80fDE460a924d596d4dE31Bc0767bb6
Proudly partnering with PiSugar!!
Pwnagotchi is a Raspberry Pi leveraging bettercap that survives from its surrounding Wi-Fi environment to maximize the crackable WPA key material it captures (either passively, or by performing authentication and association attacks). This material is collected as PCAP files containing any form of handshake supported by hashcat, including PMKIDs, full and half WPA handshakes.
The "old" Pwnagotchi used to have AI to help it learn from its environment, but since then AI seemed to destabilize the Wi-Fi firmware. So I have chosen to remove the AI completely to give the Pwnagotchi more up-time and longer battery life when taking it on a walk.
Multiple units within close physical proximity can "talk" to each other, advertising their presence to each other by broadcasting custom information elements using a parasite protocol I've built on top of the existing dot11 standard.
Documentation
https://github.com/jayofelony/pwnagotchi/wiki https://pwnagotchi.org
Links
| Official Links | |
|---|---|
| Website | pwnagotchi.org |
| Chat | discord |
| Subreddit | r/pwnagotchi |
License
pwnagotchi created by @evilsocket and updated by us. It is released under the GPL3 license.
