Revert "Version 2.3.4"

This reverts commit ced919ca93.
This commit is contained in:
Jeroen Oudshoorn
2023-09-08 20:26:22 +02:00
parent 261b85eedd
commit d24cc0b82f
5 changed files with 20 additions and 26 deletions

View File

@ -4,10 +4,6 @@
Patreon: [Pwnagotchi-Torch](https://www.patreon.com/pwnagotchi_torch) Patreon: [Pwnagotchi-Torch](https://www.patreon.com/pwnagotchi_torch)
**Please do not install `display-password` plugin, for some reason it messes up things.**
---
[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 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/),
full and half WPA handshakes. full and half WPA handshakes.
@ -27,13 +23,13 @@ https://www.pwnagotchi.ai
## Links ## Links
|   | Official Links |   | Official Links
|-----------|-------------------------------------------------------------| ---------|-------
| Website | [pwnagotchi.ai](https://pwnagotchi.ai/) | Website | [pwnagotchi.ai](https://pwnagotchi.ai/)
| Forum | [community.pwnagotchi.ai](https://community.pwnagotchi.ai/) | Forum | [community.pwnagotchi.ai](https://community.pwnagotchi.ai/)
| Slack | [pwnagotchi.slack.com](https://invite.pwnagotchi.ai/) | Slack | [pwnagotchi.slack.com](https://invite.pwnagotchi.ai/)
| Subreddit | [r/pwnagotchi](https://www.reddit.com/r/pwnagotchi/) | Subreddit | [r/pwnagotchi](https://www.reddit.com/r/pwnagotchi/)
| Twitter | [@pwnagotchi](https://twitter.com/pwnagotchi) | Twitter | [@pwnagotchi](https://twitter.com/pwnagotchi)
## License ## License

View File

@ -11,7 +11,6 @@ _name = None
config = None config = None
_cpu_stats = {} _cpu_stats = {}
def set_name(new_name): def set_name(new_name):
if new_name is None: if new_name is None:
return return
@ -42,7 +41,7 @@ def set_name(new_name):
fp.write(patched) fp.write(patched)
os.system("hostname '%s'" % new_name) os.system("hostname '%s'" % new_name)
reboot() pwnagotchi.reboot()
def name(): def name():

View File

@ -49,6 +49,7 @@ def load(config, agent, epoch, from_disk=True):
from stable_baselines.common.vec_env import DummyVecEnv from stable_baselines.common.vec_env import DummyVecEnv
logging.debug("[ai] DummyVecEnv imported in %.2fs" % (time.time() - start)) logging.debug("[ai] DummyVecEnv imported in %.2fs" % (time.time() - start))
start = time.time() start = time.time()
import pwnagotchi.ai.gym as wrappers import pwnagotchi.ai.gym as wrappers
logging.debug("[ai] gym wrapper imported in %.2fs" % (time.time() - start)) logging.debug("[ai] gym wrapper imported in %.2fs" % (time.time() - start))

View File

@ -45,7 +45,7 @@ def toggle_plugin(name, enable=True):
global loaded, database global loaded, database
if pwnagotchi.config: if pwnagotchi.config:
if name not in pwnagotchi.config['main']['plugins']: if not name in pwnagotchi.config['main']['plugins']:
pwnagotchi.config['main']['plugins'][name] = dict() pwnagotchi.config['main']['plugins'][name] = dict()
pwnagotchi.config['main']['plugins'][name]['enabled'] = enable pwnagotchi.config['main']['plugins'][name]['enabled'] = enable
save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml') save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml')
@ -104,7 +104,6 @@ def one(plugin_name, event_name, *args, **kwargs):
else: else:
logging.warning("Executor is shut down. Cannot schedule new futures.") logging.warning("Executor is shut down. Cannot schedule new futures.")
def load_from_file(filename): def load_from_file(filename):
logging.debug("loading %s" % filename) logging.debug("loading %s" % filename)
plugin_name = os.path.basename(filename.replace(".py", "")) plugin_name = os.path.basename(filename.replace(".py", ""))
@ -113,7 +112,6 @@ def load_from_file(filename):
spec.loader.exec_module(instance) spec.loader.exec_module(instance)
return plugin_name, instance return plugin_name, instance
def load_from_path(path, enabled=()): def load_from_path(path, enabled=()):
global loaded, database global loaded, database
logging.debug("loading plugins from %s - enabled: %s" % (path, enabled)) logging.debug("loading plugins from %s - enabled: %s" % (path, enabled))

View File

@ -19,42 +19,42 @@ def add_parsers(parser):
Adds the plugins subcommand to a given argparse.ArgumentParser Adds the plugins subcommand to a given argparse.ArgumentParser
""" """
subparsers = parser.add_subparsers() subparsers = parser.add_subparsers()
# pwnagotchi plugins ## pwnagotchi plugins
parser_plugins = subparsers.add_parser('plugins') parser_plugins = subparsers.add_parser('plugins')
plugin_subparsers = parser_plugins.add_subparsers(dest='plugincmd') plugin_subparsers = parser_plugins.add_subparsers(dest='plugincmd')
# pwnagotchi plugins search ## pwnagotchi plugins search
parser_plugins_search = plugin_subparsers.add_parser('search', help='Search for pwnagotchi plugins') parser_plugins_search = plugin_subparsers.add_parser('search', help='Search for pwnagotchi plugins')
parser_plugins_search.add_argument('pattern', type=str, help="Search expression (wildcards allowed)") parser_plugins_search.add_argument('pattern', type=str, help="Search expression (wildcards allowed)")
# pwnagotchi plugins list ## pwnagotchi plugins list
parser_plugins_list = plugin_subparsers.add_parser('list', help='List available pwnagotchi plugins') parser_plugins_list = plugin_subparsers.add_parser('list', help='List available pwnagotchi plugins')
parser_plugins_list.add_argument('-i', '--installed', action='store_true', required=False, help='List also installed plugins') parser_plugins_list.add_argument('-i', '--installed', action='store_true', required=False, help='List also installed plugins')
# pwnagotchi plugins update ## pwnagotchi plugins update
parser_plugins_update = plugin_subparsers.add_parser('update', help='Updates the database') parser_plugins_update = plugin_subparsers.add_parser('update', help='Updates the database')
# pwnagotchi plugins upgrade ## pwnagotchi plugins upgrade
parser_plugins_upgrade = plugin_subparsers.add_parser('upgrade', help='Upgrades plugins') parser_plugins_upgrade = plugin_subparsers.add_parser('upgrade', help='Upgrades plugins')
parser_plugins_upgrade.add_argument('pattern', type=str, nargs='?', default='*', help="Filter expression (wildcards allowed)") parser_plugins_upgrade.add_argument('pattern', type=str, nargs='?', default='*', help="Filter expression (wildcards allowed)")
# pwnagotchi plugins enable ## pwnagotchi plugins enable
parser_plugins_enable = plugin_subparsers.add_parser('enable', help='Enables a plugin') parser_plugins_enable = plugin_subparsers.add_parser('enable', help='Enables a plugin')
parser_plugins_enable.add_argument('name', type=str, help='Name of the plugin') parser_plugins_enable.add_argument('name', type=str, help='Name of the plugin')
# pwnagotchi plugins disable ## pwnagotchi plugins disable
parser_plugins_disable = plugin_subparsers.add_parser('disable', help='Disables a plugin') parser_plugins_disable = plugin_subparsers.add_parser('disable', help='Disables a plugin')
parser_plugins_disable.add_argument('name', type=str, help='Name of the plugin') parser_plugins_disable.add_argument('name', type=str, help='Name of the plugin')
# pwnagotchi plugins install ## pwnagotchi plugins install
parser_plugins_install = plugin_subparsers.add_parser('install', help='Installs a plugin') parser_plugins_install = plugin_subparsers.add_parser('install', help='Installs a plugin')
parser_plugins_install.add_argument('name', type=str, help='Name of the plugin') parser_plugins_install.add_argument('name', type=str, help='Name of the plugin')
# pwnagotchi plugins uninstall ## pwnagotchi plugins uninstall
parser_plugins_uninstall = plugin_subparsers.add_parser('uninstall', help='Uninstalls a plugin') parser_plugins_uninstall = plugin_subparsers.add_parser('uninstall', help='Uninstalls a plugin')
parser_plugins_uninstall.add_argument('name', type=str, help='Name of the plugin') parser_plugins_uninstall.add_argument('name', type=str, help='Name of the plugin')
# pwnagotchi plugins edit ## pwnagotchi plugins edit
parser_plugins_edit = plugin_subparsers.add_parser('edit', help='Edit the options') parser_plugins_edit = plugin_subparsers.add_parser('edit', help='Edit the options')
parser_plugins_edit.add_argument('name', type=str, help='Name of the plugin') parser_plugins_edit.add_argument('name', type=str, help='Name of the plugin')