diff --git a/README-google.md b/README-google.md index 627dce72..e9b75b94 100644 --- a/README-google.md +++ b/README-google.md @@ -41,4 +41,4 @@ Set a backup folder in config file It will then upload a zip file there of all your backup files. -If you have a new device you only need to login with google and enable the plugin, it will then download the previously made backup and reboot. +If you have a new device you only need to log in with Google and enable the plugin, it will then download the previously made backup and reboot. diff --git a/README.md b/README.md index ecde5b60..7c24fde3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pwnagotchi-Torch-64 Release
-**This fork of [Pwnagotchi](https://www.pwnagotchi.ai) has been overhauled to work solely on 64-bit Raspberry Pi's, it uses PyTorch as it's AI.** +**This fork of [Pwnagotchi](https://www.pwnagotchi.ai) has been overhauled to work solely on 64-bit Raspberry Pi's, it uses PyTorch as its AI.** **Use RPi imager to flash, if you want you can set a custom user/pass to ssh in.** @@ -9,7 +9,7 @@ Default SSH credentials are pi/raspberry # FAQ: - Is the Raspberry Pi Zero W 2 working perfectly with this image? - No, sadly not. It will reboot and restart wifi as often as needed by fix_services plugin. So don't freak out by that. I hope it will be sorted in the future. + No, sadly not. It will reboot and restart Wi-Fi as often as needed by fix_services plugin. So don't freak out by that. I hope it will be sorted in the future. - Will it go blind often? Yes! But I have tried to make it automatically fix **most** errors that may occur. @@ -24,16 +24,16 @@ Default SSH credentials are pi/raspberry --- -[Pwnagotchi](https://pwnagotchi.ai/) is an [A2C](https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752)-based "AI" leveraging [bettercap](https://www.bettercap.org/) 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](https://hashcat.net/hashcat/), including [PMKIDs](https://www.evilsocket.net/2019/02/13/Pwning-WiFi-networks-with-bettercap-and-the-PMKID-client-less-attack/), +[Pwnagotchi](https://pwnagotchi.ai/) is an [A2C](https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752)-based "AI" leveraging [bettercap](https://www.bettercap.org/) that learns 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](https://hashcat.net/hashcat/), including [PMKIDs](https://www.evilsocket.net/2019/02/13/Pwning-WiFi-networks-with-bettercap-and-the-PMKID-client-less-attack/), full and half WPA handshakes. ![ui](https://i.imgur.com/X68GXrn.png) -Instead of merely playing [Super Mario or Atari games](https://becominghuman.ai/getting-mario-back-into-the-gym-setting-up-super-mario-bros-in-openais-gym-8e39a96c1e41?gi=c4b66c3d5ced) like most reinforcement learning-based "AI" *(yawn)*, Pwnagotchi tunes [its parameters](https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.toml) over time to **get better at pwning WiFi things to** in the environments you expose it to. +Instead of merely playing [Super Mario or Atari games](https://becominghuman.ai/getting-mario-back-into-the-gym-setting-up-super-mario-bros-in-openais-gym-8e39a96c1e41?gi=c4b66c3d5ced) like most reinforcement learning-based "AI" *(yawn)*, Pwnagotchi tunes [its parameters](https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/defaults.toml) over time to **get better at pwning Wi-Fi things to** in the environments you expose it to. More specifically, Pwnagotchi is using an [LSTM with MLP feature extractor](https://stable-baselines.readthedocs.io/en/master/modules/policies.html#stable_baselines.common.policies.MlpLstmPolicy) as its policy network for the [A2C agent](https://stable-baselines.readthedocs.io/en/master/modules/a2c.html). If you're unfamiliar with A2C, here is [a very good introductory explanation](https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752) (in comic form!) of the basic principles behind how Pwnagotchi learns. (You can read more about how Pwnagotchi learns in the [Usage](https://www.pwnagotchi.ai/usage/#training-the-ai) 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](https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752) several combinations of [key parameters](https://www.pwnagotchi.ai/usage/#training-the-ai) 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. :) +**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](https://hackernoon.com/intuitive-rl-intro-to-advantage-actor-critic-a2c-4ff545978752) several combinations of [key parameters](https://www.pwnagotchi.ai/usage/#training-the-ai) 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 Wi-Fi 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. @@ -53,4 +53,4 @@ https://www.pwnagotchi.ai ## License -`pwnagotchi` is made with ♥ by [@evilsocket](https://twitter.com/evilsocket) and the [amazing dev team](https://github.com/evilsocket/pwnagotchi/graphs/contributors). It is released under the GPL3 license. +`pwnagotchi` is made with ♥ by [@evilsocket](https://twitter.com/evilsocket) and the [amazing dev team](https://github.com/evilsocket/pwnagotchi/graphs/contributors). It is released under the GPL3 license. diff --git a/builder/data/etc/bash_completion.d/pwnagotchi_completion.sh b/builder/data/etc/bash_completion.d/pwnagotchi_completion.sh index 37c68642..767fa861 100644 --- a/builder/data/etc/bash_completion.d/pwnagotchi_completion.sh +++ b/builder/data/etc/bash_completion.d/pwnagotchi_completion.sh @@ -2,7 +2,7 @@ _show_complete() { local cur opts node_names all_options opt_line all_options=" -pwnagotchi -h --help -C --config -U --user-config --manual --skip-session --clear --debug --version --print-config {plugins} +pwnagotchi -h --help -C --config -U --user-config --manual --skip-session --clear --debug --version --print-config --check-update --donate {plugins} pwnagotchi plugins -h --help {list,install,enable,disable,uninstall,update,upgrade} pwnagotchi plugins list -i --installed -h --help pwnagotchi plugins install -h --help @@ -11,19 +11,26 @@ pwnagotchi plugins enable -h --help pwnagotchi plugins disable -h --help pwnagotchi plugins update -h --help pwnagotchi plugins upgrade -h --help +pwnagotchi google -h --help {login,refresh} +pwnagotchi google login -h --help +pwnagotchi google refresh -h --help " COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" + # shellcheck disable=SC2124 cmd="${COMP_WORDS[@]:0:${#COMP_WORDS[@]}-1}" - opt_line="$(grep -m1 "$cmd" <<<$all_options)" + opt_line="$(grep -m1 "$cmd" <<<"$all_options")" if [[ ${cur} == -* ]] ; then - opts="$(echo $opt_line | tr ' ' '\n' | awk '/^ *-/{gsub("[^a-zA-Z0-9-]","",$1);print $1}')" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + opts="$(echo "$opt_line" | tr ' ' '\n' | awk '/^ *-/{gsub("[^a-zA-Z0-9-]","",$1);print $1}')" + # shellcheck disable=SC2207 + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi + # shellcheck disable=SC2086 opts="$(echo $opt_line | grep -Po '{\K[^}]+' | tr ',' '\n')" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + # shellcheck disable=SC2207 + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) } complete -F _show_complete pwnagotchi diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index ded446b6..408fca6c 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -414,8 +414,6 @@ if ! /opt/vc/bin/tvservice -s | egrep 'HDMI|DVI'; then /opt/vc/bin/tvservice -o fi - - rfkill unblock all - name: create /etc/pwnagotchi folder file: diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index 730c7d93..b2dc167f 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -71,12 +71,10 @@ def mem_usage(): kb_mem_used = kb_mem_total - kb_mem_free - kb_main_cached - kb_main_buffers return round(kb_mem_used / kb_mem_total, 1) - return 0 - def _cpu_stat(): """ - Returns the splitted first line of the /proc/stat file + Returns the split first line of the /proc/stat file """ with open('/proc/stat', 'rt') as fp: return list(map(int, fp.readline().split()[1:]))