Giter Site home page Giter Site logo

aluminum-ice / pwnagotchi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from evilsocket/pwnagotchi

650.0 42.0 51.0 8.74 MB

(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFi pwning.

Home Page: https://pwnagotchi.ai/

License: Other

Shell 0.47% JavaScript 58.75% Python 25.49% PowerShell 0.39% CSS 13.78% Makefile 0.09% HTML 1.02%

pwnagotchi's Introduction

Pwnagotchi

Release Software License Contributors follow on Twitter

This is a fork of the original pwnagotchi project. I have heavily updated my fork to enable pwnagotchi to run well on a Raspberry Pi Zero 2 W. Major changes include:

  1. Remove all dependency on Kali-Pi (causes more problems than it fixes) 💥 💥
  2. Update to Old Stable Buster Lite 2023-05-03
  3. Compile nexmon from source
    • Raspberry Pi Zero 2W (RPiZ2W) supported via firmware patch bcm43436b0/9_88_4_65 (43430/2) and bcm43430a1/7_45_41_46 (43430/1)
    • Raspberry Pi 3B+ (RPi3B+) and Pi 4 (RPi4) supported via firmware patch bcm43455c0/7_45_206/
  4. Update to Go v1.21.5
  5. Compile BetterCap from source
  6. Install screenrc and my preferred configuration for it
  7. Install aircrack-ng
  8. Install pwnagotchi plugin for the Waveshare UPS hat, Mastodon, and aircrack (to delete empty pcap files); need to manually add configuration to config.toml
  9. Turn off power saving mode for the wifi chip to prevent BRCM firmware crashes during packet injection (e.g., deauth attack)

If you'd like to support my work, contributions can be sent to my BTC wallet: 1CdEWNasdBbu4mB8QgfhFnWwKjHJVJaWZF

50653A40-45F3-4D92-A89E-5FCBD20F60CC_4_5005_c

I do not support the original RPiZW. The board is obsolete and underpowered. Spend $15 and get an RPiZ2W. Issues about the original RPiZW will be immediately closed.


Pwnagotchi is an A2C-based "AI" leveraging bettercap that learns from its surrounding WiFi 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.

ui

Instead of merely playing Super Mario or Atari games like most reinforcement learning-based "AI" (yawn), Pwnagotchi tunes its parameters over time to get better at pwning WiFi things to in the environments you expose it to.

More specifically, Pwnagotchi is using an LSTM with MLP feature extractor as its policy network for the A2C agent. If you're unfamiliar with A2C, here is a very good introductory explanation (in comic form!) of the basic principles behind how Pwnagotchi learns. (You can read more about how Pwnagotchi learns in the Usage doc.)

Keep in mind: Unlike the usual RL simulations, Pwnagotchi learns over time. Time for a Pwnagotchi is measured in epochs; a single epoch can last from a few seconds to minutes, depending on how many access points and client stations are visible. Do not expect your Pwnagotchi to perform amazingly well at the very beginning, as it will be exploring several combinations of key parameters to determine ideal adjustments for pwning the particular environment you are exposing it to during its beginning epochs ... but ** listen to your Pwnagotchi when it tells you it's boring!** Bring it into novel WiFi environments with you and have it observe new networks and capture new handshakes—and you'll see. :)

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. Over time, two or more units trained together will learn to cooperate upon detecting each other's presence by dividing the available channels among them for optimal pwnage.

Documentation

https://www.pwnagotchi.ai

Links

  Official Links
Website pwnagotchi.ai
Forum community.pwnagotchi.ai
Slack pwnagotchi.slack.com
Subreddit r/pwnagotchi
Twitter @pwnagotchi

License

pwnagotchi is made with ♥ by @evilsocket and the amazing dev team. It is released under the GPL3 license.

pwnagotchi's People

Contributors

aluminum-ice avatar benleb avatar caquino avatar cdiemel avatar crahan avatar dadav avatar daswisher avatar deveth0 avatar do-ki avatar evilsocket avatar fregkos avatar georgikoemdzhiev avatar hexwaxwing avatar hmax42 avatar jsoref avatar justin-p avatar llamasoft avatar massar avatar mbgroot avatar moheshmohan avatar neutralinsomniac avatar opteeks avatar python273 avatar ratmandu avatar retiolus avatar sp3nx0r avatar waterfallm avatar xende avatar xstoudi avatar zenzen666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pwnagotchi's Issues

Not booting into AUTO mode [BUG]

The pi does not boot to AUTO mode when usb is plugged into power only interface. It only boots to MANU mode.
I can ssh to the pi and restart into AUTO mode and it works just fine. But i have not set up BT connection, so on the go its not possible.

To Reproduce
Steps to reproduce the behavior:

  1. ... Plug usb to power USB port.

Expected behavior
Boot to AUTO mode not MANU.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version V1.7.4
  • OS version
  • Type of hardware Pi zero 2 W
  • Any additional hardware used: Inky screen

Additional context
Add any other context about the problem here.

[BUG] Sometimes after rebooting automatically, it boots back up in MANUAL mode

Describe the bug
Sometimes after it reboots automatically (50 epochs without visible access points), it starts up in MANUAL mode

To Reproduce
Steps to reproduce the behavior:

  1. ... Just let run and wait for it to automatically reboot, check localhost:8080 and it says it's in MANUAL, so I ssh in and manually reboot it and it's back in AUTO mode (which then goes to AI mode, etc.)

Expected behavior
Whenever it reboots automatically, to restart in AUTO and not MANUAL

Screenshots

Environment (please complete the following information):

  • Pwnagotchi version 1.7.5
  • OS version 5.10.103-v7+
  • Type of hardware Raspberry Pi 3B+
  • Any additional hardware used - external USB WiFi adaptor used (while I have disabled the onboard WiFi), I keep the 3B+ plugged into Ethernet.

Additional context
Add any other context about the problem here.

Support for Waveshare V4

Is your feature request related to a problem? Please describe.
The newest iteration of the Waveshare 2.13 e-ink display is not yet fully supported. The currently available driver for the waveshare213inb_v4 supports the display in part but only features full refresh mode which is impractical.

Describe the solution you'd like
Implement a new display based on the official Waveshare driver available here.

Describe alternatives you've considered
N/A

Additional context
I have already implemented the change. PR follows shortly.

[BUG] KeyError: `PWN_RELEASE'

Describe the bug
I downloaded and flashed the freshly released v1.8.2 onto a brand new SD card this morning and it wouldn't boot. SSH'ing into the zero 2w, I see the following error when trying to start the pwnagotchi service:

root@pwnagotchi:/var/log # pwnagotchi
Traceback (most recent call last):
  File "/usr/local/bin/pwnagotchi", line 9, in <module>
    import pwnagotchi
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/__init__.py", line 8, in <module>
    from pwnagotchi._version import __version__
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/_version.py", line 3, in <module>
    __version__ = os.environ["PWN_RELEASE"]
  File "/usr/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'PWN_RELEASE'

To Reproduce
Steps to reproduce the behavior:

  1. flash v1.8.2
  2. ssh into the device
  3. stop the service sudo systemctl stop pwnagotchi
  4. start the service sudo pwnagotchi

Expected behavior
Boots without an error

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version v1.8.2
  • OS version fresh flash
  • Type of hardware rpi zero 2
  • Any additional hardware used none

Additional context
none

[BUG]

Describe the bug
Pwnagotchi does not boot in MANU mode

To Reproduce
Steps to reproduce the behavior:

Plug the cable in the data port
Wait for the pwnagotchi to boot
pwnagotchi boots into AUTO mode
Expected behavior
pwnagotchi boots into MANU mode

Environment (please complete the following information):

Pwnagotchi version : v1.7.9
OS version : standard raspbian lite image
Type of hardware Raspberry pi 0 2W
Any additional hardware used waveshare v3 2.13 inch e-paper hat

[BUG] Bettercap

Describe the bug
Bettercap not running

Display: false (using webUI)

Expected behavior
Run pwnagotchi

Environment (please complete the following information):

  • Pwnagotchi: 1.7.9
  • OS version: Linux pwnagotchi 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
  • Raspberry pi 4

Additional context
Bettercap not running and stuck on "waiting for bettercap API to be available"

pi@pwnagotchi:~ $ tail -f /var/log/pwnagotchi.log
[2023-05-03 08:18:14,321] [INFO] waiting for bettercap API to be available ...
[2023-05-03 08:18:15,331] [INFO] waiting for bettercap API to be available ...
[2023-05-03 08:18:16,339] [INFO] waiting for bettercap API to be available ...
[2023-05-03 08:18:17,349] [INFO] waiting for bettercap API to be available ...
[2023-05-03 08:18:18,359] [INFO] waiting for bettercap API to be available ...
pi@pwnagotchi:~ $ journalctl -fu bettercap
-- Logs begin at Wed 2023-05-03 07:49:02 IST. --
May 03 08:18:47 pwnagotchi systemd[1]: bettercap.service: Scheduled restart job, restart counter is at 56.
May 03 08:18:47 pwnagotchi systemd[1]: Stopped bettercap api.rest service..
May 03 08:18:47 pwnagotchi systemd[1]: Started bettercap api.rest service..
May 03 08:18:47 pwnagotchi bettercap-launcher[3940]: grep: /sys/class/net/mon0/operstate: No such file or directory
May 03 08:18:47 pwnagotchi bettercap-launcher[3940]: command failed: Operation not supported (-95)
May 03 08:18:48 pwnagotchi bettercap-launcher[3940]: WARNING: Terminal colors have been disabled, view will be very limited.
May 03 08:18:48 pwnagotchi bettercap-launcher[3940]: bettercap v2.32.0 (built for linux arm with go1.20.6) [type 'help' for a list of commands]
May 03 08:18:48 pwnagotchi bettercap-launcher[3940]: no interface matching 'mon0' found.
May 03 08:18:48 pwnagotchi systemd[1]: bettercap.service: Main process exited, code=exited, status=1/FAILURE
May 03 08:18:48 pwnagotchi systemd[1]: bettercap.service: Failed with result 'exit-code'.
pi@pwnagotchi:~ $ sudo ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether e4:5f:01:0e:b7:79  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4093  bytes 261299 (255.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4093  bytes 261299 (255.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.2  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::6ce0:feff:fe54:8875  prefixlen 64  scopeid 0x20<link>
        ether 6e:e0:fe:54:88:75  txqueuelen 1000  (Ethernet)
        RX packets 6683  bytes 641701 (626.6 KiB)
        RX errors 0  dropped 10  overruns 0  frame 0
        TX packets 5793  bytes 1834576 (1.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether e4:5f:01:0e:b7:7a  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[BUG] Auto-Update from 1.7.9 > 1.8.0 breaks pwnagotchi.service

Same as #63

Steps to reproduce the behavior:

  1. Install 1.7.9
  2. Connect pwnagotchi to network/internet
  3. Allow to auto update.
  4. After update pwnagotchi reboots and fails to initialize pwnagotchi.service.

Expected behavior
Should update from 1.7.9 to 1.8.0 without breaking service.

Environment

  • Pwnagotchi version 1.8.0
  • Pi Zero W 2
  • Waveshare 3

Additional context
If flashing 1.8.0 directly without updating from 1.7.9, pwnagotchi.service functions and everything seems to be working.

"sudo pwnagotchi-launcher" output:

pwnagotchi
Traceback (most recent call last):
File "/usr/local/bin/pwnagotchi", line 152, in
plugins.load(config)
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 124, in load
enabled = [name for name, options in config['main']['plugins'].items() if
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 125, in
'enabled' in options and options['enabled']]
TypeError: argument of type 'int' is not iterable

BT tethering only in manual mode

Hi,
i setup the bluetooth tethering and it works fine but only while its in manual mode. Takes a moment and i get BT: C and can access the web and bettercap interface with my mobile. But that only works al long as i got the gotchi connected to pc over the data port (and it enters manual mode). When i power the gotchi over the power port and it goes into Auto mode i always get BT: NF ..not found. No changes happened. When i plug it back into pc via data port, the gotchi finds and connects to my phone again.
Any idea what causes this or what im doin wrong?

[feature] Full 64-bit os for Rpi Zero2W?

Is your feature request related to a problem? Please describe.
We just dropped the support of Rpi Zero W in 1.7.7, so I wondered that we could use a arm64 image of raspbian at build. According to Jeff's YouTube video, arm64 seems have a better performance, so maybe it helps pwnagotchi too.

Describe the solution you'd like
Make built OS fully arm64

Describe alternatives you've considered

Additional context
I think it could be possible because we build nexmon from source. Also, tensorflow could also build for arm64. Just wondered how much time we need to build this.

[BUG] Unable to setup Bluetooth tethering

Describe the bug
Pulling over this thread from parent repo.. i've now using 1.6.2 and i was hoping it would get me up and running on bluetooth but i'm affriad not.

evilsocket#1091

To Reproduce
Steps to reproduce the behavior:

  1. configure bluetooth tethering
  2. restart pwnagotchi
  3. accept popup on phone from PI with requerst to pair.
  4. pwnagotchi displays "BT NF"

Expected behavior
pwnagotchi displays "BT C"

Screenshots
If i query bluetooth bluetoothctl in the cli my phone pops up in the log connected yes/connected no

Environment (please complete the following information):

  • Pwnagotchi version: 1.6.2
  • Type of hardware: PI Zero 1.3 tried on 2 PI Zeros with different phones/tablets.

Additional context
Same phones and config used on original pwnagotchi saem results.

[BUG] bettercap.py dying

Describe the bug
Exception errors for bettercap.py

To Reproduce
Steps to reproduce the behavior:
Just let run

Expected behavior
Would of expected it to reboot automatically by now

Screenshots
image

Environment (please complete the following information):

  • Pwnagotchi version 1.7.9
  • OS version Linux pwnagotchix 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
  • Type of hardware Raspbery Pi Zero 2W
  • Any additional hardware used None

Additional context
Attached pwnagotchi.log
pwnagotchi.log

[BUG]Pi0 2 W / Waveshare V3 / Pi Sugar / Constant Reboot

Describe the bug
Using the current version 1.6.2 image burned to a samsung evo 128gb. Changing the config.toml for bt, passwords, name. Starting the pi zero with an hdmi monitor. The web interface loads, but bettercap does not ever. If the pi does boot it will be only a minute or two and then it will reboot. I am trying to dump the log but it reboots.
To Reproduce
Steps to reproduce the behavior:

  1. Image disk
  2. Copy toml/or not
  3. Boot

Expected behavior
The system will boot and remain on until purposely rebooted.
Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version 1.6.2
  • OS version (no change/current)
  • Type of hardware Pi 0 2 W (new), waveshare v3 2.13, pi sugar 2
  • Any additional hardware used hdmi monitor, small for a pi. Keyboard/mouse

Additional context
Add any other context about the problem here.
I tried a fan just in case heat was an issue, but i have been running kali, pi os.

[BUG] No USB Connectivity.

Describe the bug
No connectivity between device and computer (USB).

To Reproduce
Steps to reproduce the behavior:
0. Flash Micro SD, Assemble device incl. Pisugar module & Waveshare 2.13in V4, Create config.toml, place in boot directory over Micro SD while plugged into main machine;

  1. Plug in the RPi02W to a power source. Device powers on as normal, display activates and appears to work as normal.
  2. Plug in the RPi02W into the USB Port of an Ubuntu machine from the data port.
  3. Computer indicates it failed to form a connection. ngrep shows there is nothing coming from the device. Cannot ping device.
  4. Tried to mess a little with the ipv4 settings on the Ubuntu side.

Expected behavior
Device begins communicating with main Ubuntu machine.

Environment (please complete the following information):

  • Pwnagotchi version 1.8.3
  • OS version Ubuntu
  • Type of hardware RPi02W, WS 2.13in V4, PiSugar module
  • Any additional hardware used 2 Data USB Cable

I was wondering if maybe there's something I can do with the configuration files to enable a Bluetooth connection or something. Let me know of any solutions, also, I am afraid to power off my device simply by pulling the power cable out, haha..

pwnagotchi --clear returns errors.

I am not sure if this is not a supported command anymore or I am doing something wrong. This is what I get when I try to clear the display.

pi@pwnagotchi:~ $ sudo pwnagotchi --clear
[2023-09-30 10:24:32,148] [INFO] gps plugin loaded for /dev/ttyS0
[2023-09-30 10:24:32,148] [INFO] Session-stats plugin loaded.
[2023-09-30 10:24:32,153] [INFO] GPIO Button plugin loaded.
[2023-09-30 10:24:32,154] [INFO] Added command: touch /root/.pwnagotchi-auto && systemctl restart pwnagotchi to GPIO #20
[2023-09-30 10:24:32,156] [INFO] Added command: shutdown -h -r now to GPIO #16
[2023-09-30 10:24:32,158] [INFO] [led] plugin loaded for /sys/class/leds/led0/brightness
[2023-09-30 10:24:32,159] [INFO] Added command: shutdown -h now to GPIO #19
Error: Read failed
[2023-09-30 10:24:32,213] [INFO] initializing waveshare v3 display
[2023-09-30 10:24:32,221] [INFO] BT-TETHER: Successfully loaded ...
[2023-09-30 10:24:33,735] [INFO] clearing the display ...
[2023-09-30 10:24:34,378] [ERROR] error while running gps.on_ui_update : cannot schedule new futures after shutdown
[2023-09-30 10:24:34,379] [ERROR] cannot schedule new futures after shutdown
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 95, in one
executor.submit(locked_cb, *locked_cb_args)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 151, in submit
raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
[2023-09-30 10:24:34,384] [ERROR] error while running ups_lite.on_ui_update : cannot schedule new futures after shutdown
[2023-09-30 10:24:34,385] [ERROR] cannot schedule new futures after shutdown
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 95, in one
executor.submit(locked_cb, *locked_cb_args)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 151, in submit
raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
[2023-09-30 10:24:34,387] [ERROR] error while running bt-tether.on_ui_update : cannot schedule new futures after shutdown
[2023-09-30 10:24:34,387] [ERROR] cannot schedule new futures after shutdown
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 95, in one
executor.submit(locked_cb, *locked_cb_args)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 151, in submit
raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
[2023-09-30 10:24:35,408] [ERROR] error while running gps.on_ui_update : cannot schedule new futures after shutdown
[2023-09-30 10:24:35,409] [ERROR] cannot schedule new futures after shutdown
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 95, in one
executor.submit(locked_cb, *locked_cb_args)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 151, in submit
raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
[2023-09-30 10:24:35,412] [ERROR] error while running ups_lite.on_ui_update : cannot schedule new futures after shutdown
[2023-09-30 10:24:35,413] [ERROR] cannot schedule new futures after shutdown
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 95, in one
executor.submit(locked_cb, *locked_cb_args)
File "/usr/lib/python3.7/concurrent/futures/thread.py", line 151, in submit
raise RuntimeError('cannot schedule new futures after shutdown')
RuntimeError: cannot schedule new futures after shutdown
[2023-09-30 10:24:35,416] [ERROR] error while running bt-tether.on_ui_update : cannot schedule new futures after shutdown

[BUG] waiting for bettercap API to be available ... in 1.8.4

Describe the bug
Weblog get spammed with waiting for bettercap API to be available ...

To Reproduce
Steps to reproduce the behavior:

  1. New install on 1.8.4 didnt change passwords,

Expected behavior
Bot/script doeing its job and not waiting.

Environment (please complete the following information):

  • Pwnagotchi version 1.8.4
  • Pi 2 W

Additional context
Ai is just waiting for it now.

Tried switching mon0 to wlan0 no change.
Everything else seems to run fine.

Im not very linux tech heavy, just a beginner but if you need more info please tell me.

[BUG] Hitting `shutdown`, `reboot` or `restart in auto mode` gives me an error

Describe the bug
Hitting shutdown, reboot or restart in auto mode gives me an error on the device:8080 UI.

To Reproduce
Steps to reproduce the behavior:

  1. Go to device:8080
  2. Hit any of Shutdown, Reboot, or Restart in AUTO mode, and hit "okay" on the popup
  3. Error pops up, saying: *Bad Request* The CSRF session token is missing.

Expected behavior
The device should shutdown or restart

Environment (please complete the following information):

  • Pwnagotchi version: pwnver: 1.8.3
  • OS version: uname -a: Raspbian GNU/Linux 10 (buster)
  • Type of hardware: Raspberry Pi 3B
  • Any additional hardware used

[BUG] Will not run on a Pi 4

Describe the bug
It never captures any handshakes

To Reproduce

  1. Flash the latest release image to a microsd card
  2. Plug in an external wifi dongle; a Alfa AWUS036NHA, This is recognized by lsusb.
  3. sudo service pwnagotchi start
  4. No handshakes ever captured, activity light on wifi dongle blinking

Expected behavior
Capturing handshakes

Environment (please complete the following information):
Pi4 8GB
4.3inch DSI LCD Display with Case for Raspberry Pi 4B, 800×480 Capacitive Touchscreen MIPI DSI

Additional context
Something isn't starting; the web-ui never becomes available.

Logfile paste:

[2023-03-21 20:23:46,236] [INFO] [led] plugin loaded for /sys/class/leds/led0/brightness
[2023-03-21 20:23:46,237] [INFO] Session-stats plugin loaded.
[2023-03-21 20:23:46,246] [WARNING] ui.fps is 0, the display will only update for major changes
[2023-03-21 20:23:46,246] [INFO] initializing waveshare v2 display
[2023-03-21 20:26:14,110] [INFO] grid plugin loaded.
[2023-03-21 20:26:14,110] [INFO] [update] plugin loaded.
[2023-03-21 20:26:14,110] [INFO] [led] plugin loaded for /sys/class/leds/led0/brightness
[2023-03-21 20:26:14,118] [INFO] Session-stats plugin loaded.
[2023-03-21 20:26:14,121] [WARNING] ui.fps is 0, the display will only update for major changes
[2023-03-21 20:26:14,122] [INFO] initializing waveshare v2 display

[BUG] bettercap web UI is not reachable

Describe the bug
The bettercap web UI is not reachable at the IP port 80

To Reproduce
Steps to reproduce the behavior:

  1. enter http://10.0.0.99:80 or http://10.0.0.99 (i have changed my IP for the pwnagotchi to 10.0.0.99 because 10.0.0.2 is already used in my network)

Expected behavior
Web Site loads in any browser

Environment (please complete the following information):

  • Pwnagotchi version 1.7.6
  • RPI zero 2 W

Additional context
Whatever i tried, the webUI for bettercap does not show up. I can access the normal pwnagotchi web ui at http://10.0.0.99:8080 however just fine.

This happens in MANU, AUTO and AI mode. I was never able to reach the Port 80 bettercap WebUI. In config.toml it is configured correctly.

netstat -tulpn also shows that it runs just fine. So i have no idea why it is not accessible.

RTC module solder points

Hi..on the pwnagotchi website are a few pictures about soldering a small RTC module to the rpi
https://pwnagotchi.ai/installation/#hardware-clock
The pictures dont really show what connection goes where. Vcc and Gnd are obvious..i guess the D and C pin are data and clock, the NC=NotConnected. So i guess D and C go to gpio 20/21 ?
rtc

Just want to make sure, before solder and wonder why its not working.

Asking here, as this fork seems the most "alive". Sorry to bother. I'll close the topic in 1-2 days. Thanks

[BUG] Empty environment variable PWN_RELEASE

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Allow auto-update to run.
  2. Try to connect to web-ui

Expected behavior
web-ui should be available.

Screenshots
N/A

Environment (please complete the following information):

  • Pwnagotchi version — v1.8.2
  • OS version — Debian 12
  • Type of hardware — Raspberry Zero 2 w

Additional context
After having my Pwnagotchi automatically updated to v.1.8.2 I noticed I could no longer access my bt-tether/web ui, so I checked the output of systemctl status pwnagotchi , which gives me this:

ExecStart=/usr/bin/pwnagotchi-launcher (code=exited, status=1/FAILURE)

I then launched the launcher manually with sudo /usr/bin/pwnagotchi-launcher, where I got this error:

Traceback (most recent call last):
  File "/usr/local/bin/pwnagotchi", line 9, in <module>
    import pwnagotchi
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/__init__.py", line 8, in <module>
    from pwnagotchi._version import __version__
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/_version.py", line 3, in <module>
    __version__ = os.environ["PWN_RELEASE"]
  File "/usr/lib/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'PWN_RELEASE'

Not sure where PWN_RELEASE environment variable should be defined, but echo $PWN_RELEASE was empty.
As a quick workaround, I've hardcoded the version number on the _version.py file, and all is good.

PI Zero 2 W - load for brcm/brcmfmac43430 Failed error -2

During the boot process, WiFi firmware not loaded properly

I see its using sdio firmware but mon0 not able to see any APs

Environment (please complete the following information):

  • Pwnagotchi V1.7.4
  • PI Zero 2 W

dmesg | grep brcmfmac
[ 6.249994] brcmfmac: loading out-of-tree module taints kernel.
[ 6.278710] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[ 6.292902] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 6.293226] usbcore: registered new interface driver brcmfmac
[ 6.322918] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.raspberrypi,model-zero-2-w.txt failed with error -2
[ 6.667093] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[ 6.667272] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[ 6.668251] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Aug 7 2017 00:46:29 version 7.45.41.46 (r666254 CY) FWID 01-f8a78378
[ 8.574321] brcmfmac: brcmf_cfg80211_set_power_mgmt: Forcing power management
[ 8.574354] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
[ 9.709728] brcmfmac: brcmf_cfg80211_set_power_mgmt: Forcing power management
[ 9.709753] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save disabled
[ 9.801349] brcmfmac: brcmf_vif_add_validate: Attempt to add a MONITOR interface...
[ 9.801394] brcmfmac: brcmf_mon_add_vif: brcmf_mon_add_vif called
[ 9.801414] brcmfmac: brcmf_mon_add_vif: Adding vif "mon0"

[BUG] Bettercap never seen as "available"

Flashed most recent image with balenaEtcher to a brand new card going into a brand new Pi0W.

Added config.toml just to set the whitelist and Waveshare display options. Defaults remain in place everywhere else.

Everything boots and runs just fine but nothing meaningful ever happens because this goes on forever (no clock so the dates are all completely wrong):

[2023-05-03 03:18:50,137] [INFO] Session-stats plugin loaded.
[2023-05-03 03:18:50,144] [INFO] [update] plugin loaded.
[2023-05-03 03:18:50,150] [INFO] grid plugin loaded.
[2023-05-03 03:18:50,154] [INFO] [led] plugin loaded for /sys/class/leds/led0/brightness
[2023-05-03 03:18:50,226] [WARNING] ui.fps is 0, the display will only update for major changes
[2023-05-03 03:18:50,228] [INFO] initializing waveshare v3 display
[2023-05-03 03:19:02,651] [INFO] pwnagotchi@82fc514938787eb557982bd1ba1a509900a1b5b9114d7729fae6e77389b315c2 (v1.7.9)
[2023-05-03 03:19:02,663] [INFO] entering auto mode ...
[2023-05-03 03:19:02,704] [INFO] [ai] bootstrapping dependencies ...
[2023-05-03 03:19:02,788] [INFO] waiting for bettercap API to be available ...
[2023-05-03 03:19:03,347] [INFO] web ui available at http://0.0.0.0:8080/
[2023-05-03 03:19:03,864] [INFO] waiting for bettercap API to be available ...
[2023-05-03 03:19:07,451] [INFO] waiting for bettercap API to be available ...
[2023-05-03 03:19:12,589] [INFO] waiting for bettercap API to be available ...
[2023-05-03 03:19:13,675] [INFO] waiting for bettercap API to be available ...
[2023-05-03 03:19:14,721] [INFO] waiting for bettercap API to be available ...

The only errors I can see preceding this output in the logs pertain to a lack of internet connectivity when urllib3 calls are made. None of the bridging scripts I've found actually accomplish anything in any current version of MacOS so I have no idea if things would succeed if urllib3 was able to connect to something. They do not seem to be directly related to bettercap so my guess is nothing would change:

[2023-05-03 03:54:38,656] [ERROR] error while reading pwngrid data
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/urllib3/connection.py", line 175, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 95, in create_connection
    raise err
  File "/usr/local/lib/python3.7/dist-packages/urllib3/util/connection.py", line 85, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

I have verified that the default passwords are still in use in all the various config files everywhere and that I do have a wlan0 interface. I cannot load any kind of web interface for bettercap but I also have no idea how I'm meant to go about doing this. My best guess based on what's in the default config is to try to load port 8081 on the device's IP but this is refused as nothing is listening there. 8080 works fine.

Ports and processes:

$ sudo netstat -tunlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      443/python3         
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      466/sshd            
tcp6       0      0 :::22                   :::*                    LISTEN      466/sshd            
udp        0      0 0.0.0.0:33130           0.0.0.0:*                           450/avahi-daemon: r 
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           450/avahi-daemon: r 
udp6       0      0 :::34155                :::*                                450/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                450/avahi-daemon: r 
$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.9  1.6  32472  7876 ?        Ss   09:18   0:12 /sbin/init
root         2  0.0  0.0      0     0 ?        S    09:18   0:00 [kthreadd]
root         6  0.0  0.0      0     0 ?        I<   09:18   0:00 [mm_percpu_wq]
root         7  0.0  0.0      0     0 ?        S    09:18   0:00 [rcu_tasks_rude_]
root         8  0.0  0.0      0     0 ?        S    09:18   0:00 [rcu_tasks_trace]
root         9  0.1  0.0      0     0 ?        S    09:18   0:01 [ksoftirqd/0]
root        10  0.0  0.0      0     0 ?        S    09:18   0:00 [kdevtmpfs]
root        11  0.0  0.0      0     0 ?        I<   09:18   0:00 [netns]
root        13  0.0  0.0      0     0 ?        S    09:18   0:00 [kauditd]
root        14  0.0  0.0      0     0 ?        I    09:18   0:00 [kworker/0:2-cgroup_destroy]
root        15  0.0  0.0      0     0 ?        S    09:18   0:00 [khungtaskd]
root        16  0.0  0.0      0     0 ?        S    09:18   0:00 [oom_reaper]
root        17  0.0  0.0      0     0 ?        I<   09:18   0:00 [writeback]
root        18  0.0  0.0      0     0 ?        S    09:18   0:00 [kcompactd0]
root        33  0.0  0.0      0     0 ?        I<   09:18   0:00 [kblockd]
root        34  0.0  0.0      0     0 ?        I<   09:18   0:00 [blkcg_punt_bio]
root        35  0.0  0.0      0     0 ?        S    09:18   0:00 [watchdogd]
root        36  0.0  0.0      0     0 ?        I<   09:18   0:00 [rpciod]
root        37  0.0  0.0      0     0 ?        I<   09:18   0:00 [kworker/u3:0-hci0]
root        38  0.0  0.0      0     0 ?        I<   09:18   0:00 [xprtiod]
root        39  0.0  0.0      0     0 ?        S    09:18   0:00 [kswapd0]
root        40  0.0  0.0      0     0 ?        I<   09:18   0:00 [nfsiod]
root        41  0.0  0.0      0     0 ?        I<   09:18   0:00 [iscsi_eh]
root        42  0.0  0.0      0     0 ?        I<   09:18   0:00 [iscsi_destroy]
root        43  0.0  0.0      0     0 ?        I<   09:18   0:00 [DWC Notificatio]
root        44  0.0  0.0      0     0 ?        S<   09:18   0:00 [vchiq-slot/0]
root        45  0.0  0.0      0     0 ?        S<   09:18   0:00 [vchiq-recy/0]
root        46  0.0  0.0      0     0 ?        S<   09:18   0:00 [vchiq-sync/0]
root        47  0.0  0.0      0     0 ?        I<   09:18   0:00 [zswap-shrink]
root        52  0.0  0.0      0     0 ?        I<   09:18   0:00 [mmc_complete]
root        53  0.0  0.0      0     0 ?        I<   09:18   0:01 [kworker/0:1H-mmc_complete]
root        54  0.0  0.0      0     0 ?        I<   09:18   0:00 [kworker/0:2H]
root        55  0.0  0.0      0     0 ?        S    09:18   0:00 [jbd2/mmcblk0p2-]
root        56  0.0  0.0      0     0 ?        I<   09:18   0:00 [ext4-rsv-conver]
root        57  0.0  0.0      0     0 ?        I<   09:18   0:00 [ipv6_addrconf]
root        88  0.2  1.4  35500  6852 ?        Ss   09:18   0:03 /lib/systemd/systemd-journald
root       113  0.1  0.7  18084  3900 ?        Ss   09:18   0:01 /lib/systemd/systemd-udevd
root       140  0.0  0.0      0     0 ?        S    09:18   0:00 [vchiq-keep/0]
root       152  0.0  0.0      0     0 ?        S    09:18   0:00 [spi0]
root       157  0.0  0.0      0     0 ?        S    09:18   0:00 [spi1]
root       195  0.0  0.0      0     0 ?        I<   09:18   0:00 [cfg80211]
root       215  0.0  0.0      0     0 ?        I<   09:18   0:00 [brcmf_wq/mmc1:0]
root       217  0.0  0.0      0     0 ?        S    09:18   0:00 [brcmf_wdog/mmc1]
root       227  0.0  0.0      0     0 ?        I    09:18   0:00 [kworker/u2:3-events_unbound]
systemd+   276  0.0  1.1  22368  5512 ?        Ssl  09:18   0:01 /lib/systemd/systemd-timesyncd
root       352  0.0  1.1  12996  5472 ?        Ss   09:18   0:01 /lib/systemd/systemd-logind
root       375  0.0  0.4   7928  2200 ?        Ss   09:18   0:00 /usr/sbin/cron -f
root       403  0.0  0.5   7780  2844 ?        Ss   09:18   0:00 bash /usr/bin/pwnagotchi-launcher
message+   425  0.1  0.6   6528  3368 ?        Ss   09:18   0:02 /usr/bin/dbus-daemon --system --address=systemd:
root       428  0.0  0.2  27636  1352 ?        SLsl 09:18   0:00 /usr/sbin/rngd -r /dev/hwrng
root       443  5.6  8.4 175228 41112 ?        Sl   09:18   1:13 /usr/bin/python3 /usr/local/bin/pwnagotchi --man
root       444  0.0  0.7  24592  3632 ?        Ssl  09:18   0:00 /usr/sbin/rsyslogd -n -iNONE
avahi      450  0.0  0.5   5748  2888 ?        Ss   09:18   0:00 avahi-daemon: running [pwnagotchi.local]
avahi      457  0.0  0.3   5748  1536 ?        S    09:18   0:00 avahi-daemon: chroot helper
root       466  0.0  1.1  10672  5572 ?        Ss   09:18   0:00 /usr/sbin/sshd -D
root       472  0.0  0.3  20496  1480 ?        Ssl  09:18   0:00 /usr/sbin/epd_fuse --panel=2.0 -o allow_other -o
root       486  0.0  0.3   4288  1700 tty1     Ss+  09:18   0:00 /sbin/agetty -o -p -- \u --noclear tty1 linux
root       512  0.0  0.1   2120   608 ?        S    09:18   0:00 /usr/bin/hciattach /dev/serial1 bcm43xx 3000000 
root       513  0.0  0.0      0     0 ?        I<   09:18   0:00 [kworker/u3:2-hci0]
root       522  0.0  1.2  12184  6144 ?        Ss   09:18   0:00 sshd: pi [priv]
root       532  0.0  0.9   9504  4404 ?        Ss   09:18   0:00 /usr/lib/bluetooth/bluetoothd --noplugin=sap
pi         595  0.0  1.4  14680  7248 ?        Ss   09:18   0:00 /lib/systemd/systemd --user
pi         596  0.0  0.6  16596  3328 ?        S    09:18   0:00 (sd-pam)
pi         610  0.0  0.8  12184  4100 ?        S    09:18   0:00 sshd: pi@pts/0
pi         611  0.0  0.7   8464  3704 pts/0    Ss   09:18   0:00 -bash
root      1795  0.0  0.0      0     0 ?        I    09:28   0:00 [kworker/u2:0]
root      2093  0.1  0.0      0     0 ?        I    09:30   0:00 [kworker/0:0-events_power_efficient]
root      2448  0.0  0.0      0     0 ?        I    09:32   0:00 [kworker/0:3-cgroup_destroy]
root      2887  0.0  0.0      0     0 ?        I<   09:36   0:00 [kworker/0:0H]
root      2950  0.0  0.0      0     0 ?        I    09:36   0:00 [kworker/u2:1-events_unbound]
root      3221  0.1  0.0      0     0 ?        I    09:38   0:00 [kworker/0:1-events]
pi        3431  0.0  0.5   9768  2480 pts/0    R+   09:40   0:00 ps aux

Sure seems like bettercap isn't running but I have no idea why.

[BUG][ERROR] error 400: wifi.interface not set or not found

it see this error when it has been running for long periods of time.
mostly seen when it has been left on overnight and then it gets caught in a sleep state

it could look as if the NIC is in an sleep state or something

[2023-12-03 16:02:56,935] [INFO] sleeping 60 seconds then advancing to next epoch to allow for cleanup code to trigger                                                                                                                                                                                                                                                                                                                       
[2023-12-03 16:02:57,291] [INFO] [ai] saving /root/brain.json                                                                                                                                                                                                                                                                                                                                                                                
[2023-12-03 16:02:57,435] [INFO] [ai] setting new policy:                                                                                                                                                                                                                                                                                                                                                                                    
[2023-12-03 16:03:57,109] [INFO] [epoch 633] duration=00:01:00 slept_for=00:00:00 blind=4 sad=246 bored=0 inactive=250 active=0 peers=0 tot_bond=0.00 avg_bond=0.00 hops=0 missed=0 deauths=0 assocs=0 handshakes=0 cpu=0% mem=60% temperature=40C reward=-0.1583596214511041                                                                                                                                                                
[2023-12-03 16:03:57,112] [INFO] [ai] --- training epoch 46/50 ---                                                                                                                                                                                                                                                                                                                                                                           
[2023-12-03 16:03:57,112] [WARNING] 250 epochs with no activity -> angry                                                                                                                                                                                                                                                                                                                                                                     
[2023-12-03 16:03:57,113] [INFO] [ai] REWARD: -0.158360                                                                                                                                                                                                                                                                                                                                                                                      
[2023-12-03 16:03:57,118] [INFO] [ai] observation:                                                                                                                                                                                                                                                                                                                                                                                           
[2023-12-03 16:03:57,124] [INFO]     aps                                                                                                                                                                                                                                                                                                                                                                                                     
[2023-12-03 16:03:57,125] [INFO]     sta                                                                                                                                                                                                                                                                                                                                                                                                     
[2023-12-03 16:03:57,126] [INFO]     peers                                                                                                                                                                                                                                                                                                                                                                                                   
[2023-12-03 16:03:57,132] [INFO] [ai] saving model to /root/brain.nn ...                                                                                                                                                                                                                                                                                                                                                                     
[2023-12-03 16:03:57,347] [INFO] error 400: wifi.interface not set or not found                                                                                                                                                                                                                                                                                                                                                              
[2023-12-03 16:03:57,353] [ERROR] main loop exception due to unavailable wifi device, likely programmatically disabled (error 400: wifi.interface not set or not found)                                                                                                                                                                                                                                                                      
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                                                                                           
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 971, in json                                                                                                                                                                                                                                                                                                                                                        
    return complexjson.loads(self.text, **kwargs)                                                                                                                                                                                                                                                                                                                                                                                            
  File "/usr/lib/python3.7/json/__init__.py", line 348, in loads                                                                                                                                                                                                                                                                                                                                                                             
    return _default_decoder.decode(s)                                                                                                                                                                                                                                                                                                                                                                                                        
  File "/usr/lib/python3.7/json/decoder.py", line 337, in decode                                                                                                                                                                                                                                                                                                                                                                             
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())                                                                                                                                                                                                                                                                                                                                                                                        
  File "/usr/lib/python3.7/json/decoder.py", line 355, in raw_decode                                                                                                                                                                                                                                                                                                                                                                         
    raise JSONDecodeError("Expecting value", s, err.value) from None                                                                                                                                                                                                                                                                                                                                                                         
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)                                                                                                                                                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                                                                                                                                                                             
During handling of the above exception, another exception occurred:                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                                                                                           
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/bettercap.py", line 22, in decode                                                                                                                                                                                                                                                                                                                                                  
    return r.json()                                                                                                                                                                                                                                                                                                                                                                                                                          
  File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 975, in json                                                                                                                                                                                                                                                                                                                                                        
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)                                                                                                                                                                                                                                                                                                                                                                                       
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)                                                                                                                                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                                                                                                                                                                             
During handling of the above exception, another exception occurred:                                                                                                                                                                                                                                                                                                                                                                          
                                                                                                                                                                                                                                                                                                                                                                                                                                             
Traceback (most recent call last):                                                                                                                                                                                                                                                                                                                                                                                                           
  File "/usr/local/bin/pwnagotchi", line 55, in do_auto_mode                                                                                                                                                                                                                                                                                                                                                                                 
    agent.recon()                                                                                                                                                                                                                                                                                                                                                                                                                            
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/agent.py", line 157, in recon                                                                                                                                                                                                                                                                                                                                                      
    self.run('wifi.recon.channel clear')                                                                                                                                                                                                                                                                                                                                                                                                     
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/bettercap.py", line 117, in run                                                                                                                                                                                                                                                                                                                                                    
    return decode(r, verbose_errors=verbose_errors)                                                                                                                                                                                                                                                                                                                                                                                          
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/bettercap.py", line 30, in decode                                                                                                                                                                                                                                                                                                                                                  
    raise Exception(err)                                                                                                                                                                                                                                                                                                                                                                                                                     
Exception: error 400: wifi.interface not set or not found                                                                                                                                                                                                                                                                                                                                                                                    
[2023-12-03 16:03:57,479] [INFO] sleeping 60 seconds then advancing to next epoch to allow for cleanup code to trigger                                                                                                                                                                                                                                                                                                                       
[2023-12-03 16:03:57,649] [INFO] [ai] saving /root/brain.json  
  • Pwnagotchi version: v1.8.1
  • OS version: 5.10.103-v7+ - Raspbian GNU/Linux 10 (buster)
  • Type of hardware: RPiZ2W
  • Any additional hardware used: Waveshare V3

Not scanning APs v 1.7.0

Tried the latest yesterday released 1.7.0 build on my RPI zero 2 W , still not scanning/finding APs :( (same problem was with 1.6.2)
Do you have any idea what the problem could be ? I have seen similar problems with others, but i can't find a solution anywhere

There are No errors in log.
image

This is my interface list
`lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 750 bytes 1275079 (1.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 750 bytes 1275079 (1.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

mon0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
unspec E4-5F-01-7E-90-EE-30-30-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

usb0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::fc51:11ff:fecf:5623 prefixlen 64 scopeid 0x20
ether fe:51:11:cf:56:23 txqueuelen 1000 (Ethernet)
RX packets 1129 bytes 128936 (125.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1164 bytes 1002786 (979.2 KiB)
TX errors 0 dropped 3 overruns 0 carrier 0 collisions 0`

[BUG] SHA256 in release doesn't match

Describe the bug
$ 7z e -scrcSHA256 pwnagotchi-v1.8.3.7z

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
(snip)
SHA256 for data: A53DE3B2BA0E98E5B3734B8812B38DA5DCFE58F43CA03A349E0A6E588EF8415E

does not match:

$ cat pwnagotchi-v1.8.3.sha256
4b9b73ba687c7e699e2183e9479913029420d0641b0cd9518fd962d6680d5037 pwnagotchi-raspios-lite-1.8.3.img

To Reproduce
compare sha256 sum provided with sha256 sum provided by 7z utility, commands above

Expected behavior
SHA256 checksums should match
Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version: 1.8.3 release
  • OS version: Ubuntu 22.04
  • Type of hardware: N/A
  • Any additional hardware used: N/A

Additional context

[BUG] Following update to 1.8.0 pwnagochi.service fails to start

Describe the bug
It appears following the 1.8.0 update, pwnagochi does not start. The log shows an update available, downloaded, then applied. I wouldn't rule out that I'm doing something wrong.

[INFO] [update] checking for updates ...
[2023-11-05 08:17:36,815] [WARNING] update for aluminum-ice/pwnagotchi available (local version is '1.7.9'): https://github.com/aluminum-ice/pwnagotchi/archive/1.8.0.zip
[2023-11-05 08:17:36,817] [INFO] [update] downloading https://github.com/aluminum-ice/pwnagotchi/archive/1.8.0.zip to /tmp/updates/pwnagotchi/pwnagotchi_1.8.0.zip ...
[2023-11-05 08:17:39,600] [INFO] [update] extracting /tmp/updates/pwnagotchi/pwnagotchi_1.8.0.zip to /tmp/updates/pwnagotchi ...
[2023-11-05 08:17:40,937] [INFO] [update] installing pwnagotchi ...
[2023-11-05 08:18:13,779] [INFO] [update] done
[2023-11-05 08:18:13,809] [WARNING] rebooting ...
[2023-11-05 08:18:23,850] [WARNING] syncing...

To Reproduce
Steps to reproduce the behavior:

  1. Flash 1.7.9
  2. Restart will force the udpate
  3. Pwnagotchi will fail to start

Expected behavior
Service should start and run

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version 1.8.0
  • Raspbian GNU/Linux 10 (buster)
  • Linux pwnagotchi 5.10.103-v7+ #1529 SMP Tue Mar 8 12:21:37 GMT 2022 armv7l GNU/Linux
  • pi 2 W
  • Waveshare 3
  • piSugar 2

Additional context
Output of trying to start service:

 pwnagotchi
Traceback (most recent call last):
  File "/usr/local/bin/pwnagotchi", line 152, in <module>
    plugins.load(config)
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/__init__.py", line 124, in load
    enabled = [name for name, options in config['main']['plugins'].items() if
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/__init__.py", line 125, in <listcomp>
    'enabled' in options and options['enabled']]
TypeError: argument of type 'int' is not iterable

[BUG] Sometimes when I go into :8080 of it, text is overwritten when there's a peer detected

Describe the bug
I web into localhost:8080 to see the status of pwnagotchi, and I found that sometimes part of the screen is overwritten

To Reproduce
Steps to reproduce the behavior:

  1. Web into localhost:8080
  2. Have multiple pwnagotchi's
  3. After the peer is detected, text overlaps each other (see image)

image

Expected behavior
Expect the peer to be on the "next line" (see picture).

image

Screenshots
image
image
image
image
image
image

Environment (please complete the following information):

  • Pwnagotchi version 1.7.5
  • OS version 5.10.103-v7+
  • Type of hardware (three pwnagotchi's) Raspberry Pi 3B+ and 2 Raspberry Pi Zero 2W's
  • Any additional hardware used, all three are plugged into Ethernet at all times, Raspberry Pi 3B+ has onboard WiFi disabled and external USB WiFi Adaptor plugged in

Additional context
Add any other context about the problem here.

Option to add bool to config with webcfg

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

v1.8.3 no FAT32 Partition [BUG]

Describe the bug
Flashing v1.8.3 to SD card does not create the FAT32 partition for dropping config.toml pre-boot.

To Reproduce
Steps to reproduce the behavior:

  1. Download v1.8.3
  2. Flash with Balena Etcher
  3. Drive shows as single RAW Partition (Windows Disk Manager)

Expected behavior
A FAT32 partition is expected on a clean flashed card.

Screenshots
image

[BUG]

Describe the bug
Onlinehashcrack not available
Also automatic uploading fails.
Accessing online hashcrack via pluginscreen results in an interal error: website not available.
Accessing wpa-sec via plugin page does work, to prove working internet connection
I already have a working token and configured it in my config.toml.

To Reproduce
Steps to reproduce the behavior:

  1. Access pwnagotchi page by windows ndis connection
  2. Access plugin page
  3. Click on onlinehashcrack link

Expected behavior
Browser shows interal error: website not available

*Screenshots
clicking yellow marked link
image
results in
image

Environment (please complete the following information):

  • v.1.7.9
  • "Raspbian GNU/Linux 10 (buster)"
  • raspberry pi zero 2w
  • pisugar 2, waveshare v3

Additional context
n.a.

[BUG] Extra bloat in builds

These directories can be removed at the end of building images:
350 MB in /root/go
460 MB in /root/.cache

[BUG] mon0 never starts up on a Raspberry Pi 4B built in WiFi adaptor.

Describe the bug
I installed 1.7.7 on a Raspberry Pi 4B and mon0 never starts

To Reproduce
Steps to reproduce the behavior:
Put 1.7.7 image on MicroSD card, put MicroSD card in Raspberry Pi 4B, power up

Expected behavior
I expect it just to start up automatically after powering it on.

Screenshots
image

Environment (please complete the following information):

  • Pwnagotchi version 1.7.7
  • OS version Linux pwnagotchi4b 5.10.103-v7l+ #1529 SMP Tue Mar 8 12:24:00 GMT 2022 armv7l GNU/Linux
  • Type of hardware Raspberry Pi 4 Model B Rev 1.1
  • Any additional hardware used None

Additional context
I successfully installed 1.7.7 on a Raspberry Pi 400 (disabled onboard Wi-Fi and used an external USB Wi-Fi Adapter), and on a Raspberry Pi Zero 2W, so I think I have my configurations correct, etc.

The only odd thing I noticed, is once I powered it on, I ssh'ed in and did ifconfig -a and saw that not even wlan0 was showing up, but waited a few seconds, I could see wlan0 being there, but still not mon0

[BUG] Suddenly blind

Describe the bug
Pwnagotchi suddenly becomes blind.

Raspberry Pi 400 with external USB WiFi adapter, everything is working great and suddenly it's blind, here's the /var/log/pwnagotchi.log (scroll from bottom up to see).
pwnagotchi.log

[BUG] No pwnagotchi peering

Describe the bug
No pwnagotchi peering since upgrading to 1.6..2

To Reproduce
Steps to reproduce the behavior:

  1. start 2nd pownagotchi device up

Expected behavior
Peer information displayed

Environment (please complete the following information):

  • 1.6.2 x 2
  • PI Zero W 2 off

Additional context
Had previously seen peering information running 1.5.5 tried with and without grid enabled.

Note: I also suspect the Wifi card has different setting under this version as the Wifi seems to find less devices.

[BUG] error while running "plugin".on_ui_update : can't start new thread

Describe the bug
3-4 minutes after Pwnagotchi starts, I get the following error messages for each activated plugin:
"error while running aircrackonly.on_ui_update : can't start new thread
can't start new thread
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/plugins/init.py", line 99, in one
_thread.start_new_thread(locked_cb, locked_cb_args)
RuntimeError: can't start new thread"
To Reproduce
Steps to reproduce the behavior:

  1. boot
  2. wait
  3. error message will appear in pwnagotchi.log

Expected behavior
no errors should be seen
Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version => 1.7.5
  • OS version => Linux 5.10.103-v7+
  • Type of hardware => Raspberry Pi Zero 2 W Rev 1.0
  • Any additional hardware used => waveshare v3 e-ink display

Attached is my config and the pwnaghotchi log
config.toml.txt
pwnagotchi_log.txt

[BUG]Handshakes-m Plugin isnt functioning properly

Describe the bug
The Handshakes-m plugin not working.

To Reproduce
Steps to reproduce the behavior:

  1. Enable Handshakes-m Plugin
  2. Try to dowmload the handshakes.

Expected behavior
The handshakes to download

Environment (please complete the following information):

  • 1.8.4
  • Raspberry pi zero 2
  • Any additional hardware used: No

Additional context
You can still use the plugin but have to replace the handshakes-dl with handshakes-m in the url everytime you have to do anything.
Unsure but this part in the handhakes-m.py file seems to be the problem. (edit: fixed it and made a pull request for it,unneccesary.)

            <tr>
                <td><span class="arrow" id="arrow-{{ ssid }}" onclick="toggleFiles('{{ ssid }}')">&#9658;</span> {{ ssid }}</td>
                <td>
                    <a href="/plugins/handshakes-dl/download-all/{{ ssid }}">Download All</a> | 
                    <a href="/plugins/handshakes-dl/delete/{{ ssid }}" onclick="return confirm('Are you sure you want to delete all files for this SSID?');">Delete All</a>
                </td>
            </tr>
        </tbody>
        <tbody class="files" id="{{ ssid }}">
            {% for file in files %}
            <tr>
                <td>- {{ file }}</td>
                <td>
                    <a href="/plugins/handshakes-dl/download/{{ file }}">Download</a> |
                    <a href="/plugins/handshakes-dl/delete/{{ file }}" onclick="return confirm('Are you sure you want to delete this file?');">Delete</a>
                </td>
            </tr>

[BUG] RPiZeroW no device mon0

Describe the bug
When installed on the RPi Zero W (2017 aka 1), no wireless device is found. The output of ip a only shows loopback and usb.

To Reproduce
Steps to reproduce the behavior:

  1. Flash 1.7.4 (most recent at this time)
  2. Run on a RPiZeroW
  3. bettercap will fail to launch, the rest of the process operates as normal. pwnagotchi waits infinitely while bettercap attempts to launch

Expected behavior
mon0 to be present, allowing bettercap to launch

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version
    • 1.7.4
  • OS version
    • ?
  • Type of hardware
    • RPi Zero W, 1st edition
  • Any additional hardware used

Additional context
Add any other context about the problem here.

[feature] support for the V2 waveshare 2.7 inch display

Is your feature request related to a problem? Please describe.
I wasn't able to source a V1 version from amazon and instead was able to get a V1 working.

Describe the solution you'd like
V2 hardware should work just like V1

Describe alternatives you've considered
N/A

Additional context
I created a PR that addresses this feature request.

installation instructions (I could be blind)

Hello!

I can't seem to get this little guy to come alive. I've looked at a few different install instructions and there are quite a few variations out there. Is there instruction specific to this branch any where? My google-fu has failed me or like I said in the title, "I could be blind."

Thanks a million and thank you for making this branch for the rpi zero 2!
Mike

[BUG] bettercap https-webui credentials amnesia

Describe the bug
bettercap occasionally "forgets" login credentials even though they are correctly set in the caplet file https-ui. ssl certs were generated.

To Reproduce
Steps to reproduce the behavior:

  1. install 1.6.2
  2. configure bettercap caplet https-ui and be sure to change the credentials to something memorable
  3. run https-ui caplet in bettercap http ui
  4. attempt to login with the credentials via the bettercap https web ui
  5. login will fail; I have tried different ports.

Expected behavior
Be able to log into the https version of bettercap webui

Screenshots
If applicable, add screenshots to help explain your problem.: n/a, view the web ui and you will see the red message at the top of the interface. I'm trying to address that. Followed all bettercap instructions so I believe the issue may be an existing bug with pwnagotchi code and how it interfaces with bettercap somehow.

Environment (please complete the following information):

  • Pwnagotchi version 1.6.2
  • OS version
  • Type of hardware: Pi zero 2w
  • Any additional hardware used: ds3231 rtc, waveshare v2 display

Additional context
I apologize in advance if my bug report is underwhelming; I'd like to get more involved in the project and have lots of time to test things out currently.

[BUG] Not saving Brain

Describe the bug
Pwnagotchi went to AI in just few minutes but upon checking it does not save the brain in /root directory

To Reproduce
Steps to reproduce the behavior:

  1. reboot and start pwnagotchi in Auto mode
  2. wait until AI Mode
  3. check /root directory if brain is already there

Expected behavior
brain.nn and brain,json should be in /root directory

Screenshots
image
image
image

also found this error in logs

[2023-05-03 03:23:26,000] [INFO] [ai] learning for 50 epochs ...
[2023-05-03 03:23:26,032] [ERROR] [ai] error while training (could not broadcast input array from shape (428,) into shape (1,503))
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pwnagotchi/ai/train.py", line 177, in _ai_worker
    self._model.learn(total_timesteps=epochs_per_episode, callback=self.on_ai_training_step)
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/a2c/a2c.py", line 263, in learn
    rollout = self.runner.run(callback)
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/base_class.py", line 794, in runner
    self._runner = self._make_runner()
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/a2c/a2c.py", line 110, in _make_runner
    return A2CRunner(self.env, self, n_steps=self.n_steps, gamma=self.gamma)
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/a2c/a2c.py", line 338, in __init__
    super(A2CRunner, self).__init__(env=env, model=model, n_steps=n_steps)
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/runners.py", line 31, in __init__
    self.obs[:] = env.reset()
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/dummy_vec_env.py", line 62, in reset
    self._save_obs(env_idx, obs)
  File "/usr/local/lib/python3.7/dist-packages/stable_baselines/common/vec_env/dummy_vec_env.py", line 92, in _save_obs
    self.buf_obs[key][env_idx] = obs
ValueError: could not broadcast input array from shape (428,) into shape (1,503)

Environment:

  • Pwnagotchi version: 1.7.51
  • Type of hardware: Raspberry Pi 3A+
  • Any additional hardware used: none

Inky Display Doesn't Fit Screen[BUG]

Inky display not fitting screen tried display.color as both 'black' and 'auto'.

ui.display.enabled = true
ui.display.type = "inky"
ui.display.color = "auto"

doesnt boot on rpi zero 2 w [BUG]

Describe the bug
doesnt boot.... like at all ....

To Reproduce
Steps to reproduce the behavior:

  1. ...flash disc image
  2. ...create config.toml file in boot directory
  3. ...installed headers and waveshare ink v3 hat
  4. added rtc 3231 (doesnt boot withou this either)
  5. connect rpi zero 2 w with flashed sd to computer via usb data port
  6. wait.....
  7. get frustrated open bug report

Expected behavior
after expected delay i expected it to boot and then create network ethernet adapter option on pc to ssh into device nothing visible on eink display either

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Pwnagotchi version 1.6.7
  • OS version windows 11
  • Type of hardware zero 2 w waveshare eink v3
  • Any additional hardware used rtc 3231

Additional context
evilsocket github shows v1.5.xx how is this 1.6.xx ....not official release?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.