From 7b6566226a86f43f16d4c9c6ae68fbc7a28a006c Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 8 Sep 2023 01:46:45 +0200 Subject: [PATCH] Version 2.3.4 Signed-off-by: Jeroen Oudshoorn Signed-off-by: Jeroen Oudshoorn --- README.md | 18 +++++++++++------- pwnagotchi/__init__.py | 3 ++- pwnagotchi/ai/__init__.py | 1 - pwnagotchi/plugins/__init__.py | 3 ++- pwnagotchi/plugins/cmd.py | 20 ++++++++++---------- 5 files changed, 25 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 3027472f..97b62b96 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,10 @@ 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/), full and half WPA handshakes. @@ -23,13 +27,13 @@ https://www.pwnagotchi.ai ## Links -  | Official Links ----------|------- -Website | [pwnagotchi.ai](https://pwnagotchi.ai/) -Forum | [community.pwnagotchi.ai](https://community.pwnagotchi.ai/) -Slack | [pwnagotchi.slack.com](https://invite.pwnagotchi.ai/) -Subreddit | [r/pwnagotchi](https://www.reddit.com/r/pwnagotchi/) -Twitter | [@pwnagotchi](https://twitter.com/pwnagotchi) +|   | Official Links | +|-----------|-------------------------------------------------------------| +| Website | [pwnagotchi.ai](https://pwnagotchi.ai/) | +| Forum | [community.pwnagotchi.ai](https://community.pwnagotchi.ai/) | +| Slack | [pwnagotchi.slack.com](https://invite.pwnagotchi.ai/) | +| Subreddit | [r/pwnagotchi](https://www.reddit.com/r/pwnagotchi/) | +| Twitter | [@pwnagotchi](https://twitter.com/pwnagotchi) | ## License diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index 447e9833..d84d2713 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -11,6 +11,7 @@ _name = None config = None _cpu_stats = {} + def set_name(new_name): if new_name is None: return @@ -41,7 +42,7 @@ def set_name(new_name): fp.write(patched) os.system("hostname '%s'" % new_name) - pwnagotchi.reboot() + reboot() def name(): diff --git a/pwnagotchi/ai/__init__.py b/pwnagotchi/ai/__init__.py index bce147b2..a95caafd 100644 --- a/pwnagotchi/ai/__init__.py +++ b/pwnagotchi/ai/__init__.py @@ -49,7 +49,6 @@ def load(config, agent, epoch, from_disk=True): from stable_baselines.common.vec_env import DummyVecEnv logging.debug("[ai] DummyVecEnv imported in %.2fs" % (time.time() - start)) - start = time.time() import pwnagotchi.ai.gym as wrappers logging.debug("[ai] gym wrapper imported in %.2fs" % (time.time() - start)) diff --git a/pwnagotchi/plugins/__init__.py b/pwnagotchi/plugins/__init__.py index 2606b727..72d78290 100644 --- a/pwnagotchi/plugins/__init__.py +++ b/pwnagotchi/plugins/__init__.py @@ -42,7 +42,7 @@ def toggle_plugin(name, enable=True): global loaded, database if pwnagotchi.config: - if not name in pwnagotchi.config['main']['plugins']: + if name not in pwnagotchi.config['main']['plugins']: pwnagotchi.config['main']['plugins'][name] = dict() pwnagotchi.config['main']['plugins'][name]['enabled'] = enable save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml') @@ -100,6 +100,7 @@ def one(plugin_name, event_name, *args, **kwargs): logging.error(e, exc_info=True) + def load_from_file(filename): logging.debug("loading %s" % filename) plugin_name = os.path.basename(filename.replace(".py", "")) diff --git a/pwnagotchi/plugins/cmd.py b/pwnagotchi/plugins/cmd.py index 561191d5..cf76c0c7 100644 --- a/pwnagotchi/plugins/cmd.py +++ b/pwnagotchi/plugins/cmd.py @@ -19,42 +19,42 @@ def add_parsers(parser): Adds the plugins subcommand to a given argparse.ArgumentParser """ subparsers = parser.add_subparsers() - ## pwnagotchi plugins + # pwnagotchi plugins parser_plugins = subparsers.add_parser('plugins') 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.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.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') - ## pwnagotchi plugins upgrade + # pwnagotchi plugins upgrade 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)") - ## pwnagotchi plugins enable + # pwnagotchi plugins enable 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') - ## pwnagotchi plugins disable + # pwnagotchi plugins disable 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') - ## pwnagotchi plugins install + # pwnagotchi plugins install 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') - ## pwnagotchi plugins uninstall + # pwnagotchi plugins uninstall 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') - ## pwnagotchi plugins edit + # pwnagotchi plugins edit 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')