From e0c53b96b5ecffd90cf5bbb44b24b69c6d3fd922 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 24 Sep 2023 15:52:18 +0200 Subject: [PATCH 1/2] v2.4.3 Signed-off-by: Jeroen Oudshoorn --- bin/pwnagotchi | 8 ++++---- builder/pwnagotchi.yml | 34 +++++++++++++++++----------------- pwnagotchi/__init__.py | 4 ++-- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/bin/pwnagotchi b/bin/pwnagotchi index 7c8cd457..4efc9def 100755 --- a/bin/pwnagotchi +++ b/bin/pwnagotchi @@ -129,10 +129,10 @@ if __name__ == '__main__': args = parser.parse_args() if plugins_cmd.used_plugin_cmd(args): - config = utils.load_config(args) - log.setup_logging(args, config) - rc = plugins_cmd.handle_cmd(args, config) - sys.exit(rc) + config = utils.load_config(args) + log.setup_logging(args, config) + rc = plugins_cmd.handle_cmd(args, config) + sys.exit(rc) if args.version: print(pwnagotchi.__version__) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 3ede7de2..f2c3dcf0 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -537,31 +537,31 @@ echo echo "(◕‿‿◕) $_hostname" echo - echo "Hi! I'm a pwnagotchi $_version, please take good care of me!" - echo "Here are some basic things you need to know to raise me properly!" + echo " Hi! I'm a pwnagotchi $_version, please take good care of me!" + echo " Here are some basic things you need to know to raise me properly!" echo - echo "If you want to change my configuration, use /etc/pwnagotchi/config.toml" + echo " If you want to change my configuration, use /etc/pwnagotchi/config.toml" echo - echo "All the configuration options can be found on /etc/pwnagotchi/default.toml," - echo "but don't change this file because I will recreate it every time I'm restarted!" + echo " All the configuration options can be found on /etc/pwnagotchi/default.toml," + echo " but don't change this file because I will recreate it every time I'm restarted!" echo - echo "I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" + echo " I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz" echo - echo "I'm managed by systemd. Here are some basic commands." + echo " I'm managed by systemd. Here are some basic commands." echo - echo "If you want to know what I'm doing, you can check my logs with the command" - echo "- pwnlog" - echo "- pwnver, to check the current version" - echo "- sudo pwnagotchi --donate, to see how you can donate to this project" - echo "- sudo pwnagotchi --check-update, to see if there is a new version available" + echo " If you want to know what I'm doing, you can check my logs with the command" + echo " - pwnlog" + echo " - sudo pwnagotchi --version, to check the current version" + echo " - sudo pwnagotchi --donate, to see how you can donate to this project" + echo " - sudo pwnagotchi --check-update, to see if there is a new version available" echo - echo "If you want to know if I'm running, you can use" - echo "sudo systemctl status pwnagotchi" + echo " If you want to know if I'm running, you can use" + echo " systemctl status pwnagotchi" echo - echo "You can restart me using" - echo "sudo systemctl restart pwnagotchi" + echo " You can restart me using" + echo " systemctl restart pwnagotchi" echo - echo "You learn more about me at https://pwnagotchi.ai/" + echo " You learn more about me at https://pwnagotchi.ai/" when: hostname.changed - name: Add pwnlog alias diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index d0b1ed41..a7f549dd 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -79,7 +79,7 @@ def _cpu_stat(): Returns the splitted first line of the /proc/stat file """ with open('/proc/stat', 'rt') as fp: - return list(map(int,fp.readline().split()[1:])) + return list(map(int, fp.readline().split()[1:])) def cpu_load(tag=None): @@ -130,7 +130,7 @@ def shutdown(): def restart(mode): logging.warning("restarting in %s mode ...", mode) - + mode = mode.upper() if mode == 'AUTO': os.system("touch /root/.pwnagotchi-auto") else: From 0995d29005aa7d872d91b4d956e03b1c4ac1f66d Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 24 Sep 2023 16:05:41 +0200 Subject: [PATCH 2/2] v2.4.3 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index f2c3dcf0..e0e320e7 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -585,8 +585,10 @@ - name: install old libpcap packages become_user: root apt: - deb: /usr/local/src/libpcap* - args: allow-downgrades + force: True + state: present + deb: "/usr/local/src/{{ item }}" + with_items: "{{ packages.apt.downgrade }}" register: libpcap - name: add firmware packages to hold