From 7ac0bdb6f76e54635cc47772d44af415442cfb16 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 7 Oct 2023 11:19:08 +0200 Subject: [PATCH 01/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 70 +++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index d2773369..7a28ab1e 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -237,16 +237,16 @@ # replace: "KERNEL_RELEASE" - name: make firmware patch (bcm43455c0) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make && make install-firmware" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ - #- name: install new firmware (bcm43455c0) - # copy: - # src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin - # dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin - # follow: true + - name: install new firmware (bcm43455c0) + copy: + src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin + follow: true #- name: choose the right kernel version (bcm43436b0) # replace: @@ -282,16 +282,16 @@ # replace: "KERNEL_RELEASE" - name: make firmware patch (bcm43436b0) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make && make install-firmware" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ - #- name: install new firmware (bcm43436b0) - # copy: - # src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin - # dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin - # follow: true + - name: install new firmware (bcm43436b0) + copy: + src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin + follow: true #- name: choose the right kernel version (bcm43430a1) # replace: @@ -327,37 +327,37 @@ # replace: "KERNEL_RELEASE" - name: make firmware patch (bcm43430a1) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make && make install-firmware" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ - #- name: install new firmware (bcm43430a1) - # copy: - # src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin - # dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin - # follow: true + - name: install new firmware (bcm43430a1) + copy: + src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin + follow: true - #- name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2 - # copy: - # src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin - # dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin - # follow: true + - name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2 + copy: + src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin + follow: true - #- name: Delete the firmware blob to avoid it crashing - # file: - # state: absent - # path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob + - name: Delete the firmware blob to avoid it crashing + file: + state: absent + path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob - #- name: Delete the RPiZW firmware blob to avoid it crashing - # file: - # state: absent - # path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob + - name: Delete the RPiZW firmware blob to avoid it crashing + file: + state: absent + path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob - #- name: Delete the RPi3 firmware blob to avoid it crashing - # file: - # state: absent - # path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob + - name: Delete the RPi3 firmware blob to avoid it crashing + file: + state: absent + path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob - name: backup original driver command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" From 2bbab9cb6740c9f4ff841b44c1a34aeaa450ffd5 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 7 Oct 2023 13:06:47 +0200 Subject: [PATCH 02/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 3 ++- requirements.txt | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index e667d8cc..a7c21f8d 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -9,7 +9,8 @@ "qemu_binary": "qemu-aarch64-static", "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", "qemu_args": [ - "-r", "6.1.21-v8+" + "-r", "6.1.21-v8+", + "-m", "4G" ] } ], diff --git a/requirements.txt b/requirements.txt index decdc195..b60348d4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -gym +gymnasium shimmy pycryptodome requests @@ -18,7 +18,6 @@ dbus-python toml python-dateutil websockets -torch -torchvision +tensorflow stable_baselines3 RPi.GPIO From d2e295c2e700de56c80e9360da0275157031973b Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 7 Oct 2023 13:11:52 +0200 Subject: [PATCH 03/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index a7c21f8d..fdb6269e 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -8,7 +8,7 @@ "target_image_size": 8568709120, "qemu_binary": "qemu-aarch64-static", "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", - "qemu_args": [ + "qemuargs": [ "-r", "6.1.21-v8+", "-m", "4G" ] From da8b9467656a4d0baf79ad5fcbe14d872ef51a4c Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sat, 7 Oct 2023 14:05:07 +0200 Subject: [PATCH 04/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index fdb6269e..e667d8cc 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -8,9 +8,8 @@ "target_image_size": 8568709120, "qemu_binary": "qemu-aarch64-static", "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", - "qemuargs": [ - "-r", "6.1.21-v8+", - "-m", "4G" + "qemu_args": [ + "-r", "6.1.21-v8+" ] } ], From 0c6efb9dd6e7e8b35a62dffd2007d8c44793f4e4 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Sun, 15 Oct 2023 22:38:38 +0200 Subject: [PATCH 05/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index b60348d4..89d8c85f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,3 +21,4 @@ websockets tensorflow stable_baselines3 RPi.GPIO +pydrive2 \ No newline at end of file From 31423e3152b654fe4a954ea81cd7157cb4082b89 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 16:11:15 +0200 Subject: [PATCH 06/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 08c3a916..6cb6b941 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -633,10 +633,20 @@ when: removed.changed - name: apt clean - shell: "apt clean" + shell: "apt-get clean" args: executable: /bin/bash + - name: remove /root/go folder + file: + state: absent + path: /root/go + + - name: remove /usr/local/go folder + file: + state: absent + path: /usr/local/go + - name: remove dependencies that are no longer required apt: autoremove: yes From b8c255c1b489c27151be1e17b5a81b669d8deba1 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 16:50:54 +0200 Subject: [PATCH 07/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 6cb6b941..ad62f2ab 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -647,6 +647,11 @@ state: absent path: /usr/local/go + - name: remove pip cache + file: + state: absent + path: /root/.cache/pip + - name: remove dependencies that are no longer required apt: autoremove: yes From b3a08e3601fae9e91a25080c78f925dfc2802bc2 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 19:46:08 +0200 Subject: [PATCH 08/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/data/root/settings.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/builder/data/root/settings.yaml b/builder/data/root/settings.yaml index e69de29b..5f198bde 100644 --- a/builder/data/root/settings.yaml +++ b/builder/data/root/settings.yaml @@ -0,0 +1,15 @@ +client_config_backend: file +client_config_file: /root/client_secrets.json +client_config: + client_id: + client_secret: + +save_credentials: True +save_credentials_backend: file +save_credentials_file: /root/credentials.json + +get_refresh_token: True + +oauth_scope: + - https://www.googleapis.com/auth/drive + - https://www.googleapis.com/auth/drive.install \ No newline at end of file From df3bcbf0ad1dad69c2a616da4fc092aa64d72430 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 19:47:37 +0200 Subject: [PATCH 09/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- README-google.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README-google.md diff --git a/README-google.md b/README-google.md new file mode 100644 index 00000000..127e3591 --- /dev/null +++ b/README-google.md @@ -0,0 +1,32 @@ +Before you enable the gdrivesync plugin follow these guidelines. + +# Authentication +Drive API requires OAuth2.0 for authentication. PyDrive2 makes your life much easier by handling complex authentication steps for you. + +Go to APIs Console and make your own project. + +Search for ‘Google Drive API’, select the entry, and click ‘Enable’. + +Select ‘Credentials’ from the left menu, click ‘Create Credentials’, select ‘OAuth client ID’. + +Now, the product name and consent screen need to be set -> click ‘Configure consent screen’ and follow the instructions. Once finished: + +Select ‘Application type’ to be Web application. + +Enter an appropriate name. + +Input http://localhost:8080/ for ‘Authorized redirect URIs’. + +Click ‘Create’. + +Click ‘Download JSON’ and copy the contents to /root/client_secrets.json. + +Then copy your client_id and client_secret to /root/settings.yaml + +# Login to google + +When you have done this please run the following command in your ssh shell: + +`sudo pwnagotchi google login` + +And follow the steps, after which you can enable the plugin and let the magic begin. \ No newline at end of file From 83e6ada3ba52ddf2446a3a13ad79529087a59f33 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 19:48:59 +0200 Subject: [PATCH 10/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c810b1ec..ecde5b60 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Default SSH credentials are pi/raspberry Nope I will not help with these 'issues'. Read the manual/readme for your specific device, if that doesn't help -> **[GOOGLE](https://www.google.com)** +- If you want to use the gdrivesync plugin >> [README](README-google.md) # Patreon: [Pwnagotchi-Torch](https://www.patreon.com/pwnagotchi_torch) From b3dc5f64374e0f52040fa790bf1c98a6144f407f Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 19:51:10 +0200 Subject: [PATCH 11/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/update-motd.d/01-motd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builder/data/etc/update-motd.d/01-motd b/builder/data/etc/update-motd.d/01-motd index f549cd6d..4cb9709a 100755 --- a/builder/data/etc/update-motd.d/01-motd +++ b/builder/data/etc/update-motd.d/01-motd @@ -8,6 +8,8 @@ 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 " All plugin config files are located in /etc/pwnagotchi/conf.d/" +echo " Read the readme if you want to use gdrivesync plugin!!" 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!" From 25bf2fa7b277b0042a6726a9c5cc1d637e2f592a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 19:53:57 +0200 Subject: [PATCH 12/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- README-google.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README-google.md b/README-google.md index 127e3591..81dedd2b 100644 --- a/README-google.md +++ b/README-google.md @@ -17,6 +17,11 @@ Enter an appropriate name. Input http://localhost:8080/ for ‘Authorized redirect URIs’. +Select the correct oauth scope: + + - drive + - drive.install + Click ‘Create’. Click ‘Download JSON’ and copy the contents to /root/client_secrets.json. From d43862ab2502c5fd6fd644add460c14294fa1fd7 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 21:16:14 +0200 Subject: [PATCH 13/33] Update README-google.md Signed-off-by: Jeroen Oudshoorn --- README-google.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README-google.md b/README-google.md index 81dedd2b..e53f776f 100644 --- a/README-google.md +++ b/README-google.md @@ -34,4 +34,11 @@ When you have done this please run the following command in your ssh shell: `sudo pwnagotchi google login` -And follow the steps, after which you can enable the plugin and let the magic begin. \ No newline at end of file +And follow the steps, after which you can enable the plugin and let the magic begin. + +# Functionality +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. From 5b2d0e96729a34c374681de97a7fe6690ab164eb Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 21:25:26 +0200 Subject: [PATCH 14/33] Update README-google.md Signed-off-by: Jeroen Oudshoorn --- README-google.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README-google.md b/README-google.md index e53f776f..a57045f0 100644 --- a/README-google.md +++ b/README-google.md @@ -3,7 +3,7 @@ Before you enable the gdrivesync plugin follow these guidelines. # Authentication Drive API requires OAuth2.0 for authentication. PyDrive2 makes your life much easier by handling complex authentication steps for you. -Go to APIs Console and make your own project. +Go to [APIs Console](https://console.developers.google.com/iam-admin/projects) and make your own project. Search for ‘Google Drive API’, select the entry, and click ‘Enable’. From a5583cfdeabafb6a371bbd9ae2a6736f0cffddbc Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Mon, 16 Oct 2023 21:26:47 +0200 Subject: [PATCH 15/33] Update README-google.md Signed-off-by: Jeroen Oudshoorn --- README-google.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README-google.md b/README-google.md index a57045f0..627dce72 100644 --- a/README-google.md +++ b/README-google.md @@ -11,11 +11,11 @@ Select ‘Credentials’ from the left menu, click ‘Create Credentials’, sel Now, the product name and consent screen need to be set -> click ‘Configure consent screen’ and follow the instructions. Once finished: -Select ‘Application type’ to be Web application. +Select ‘Application type’ to be Desktop application. Enter an appropriate name. -Input http://localhost:8080/ for ‘Authorized redirect URIs’. +Input http://localhost/ for ‘Authorized redirect URIs’. Select the correct oauth scope: From c897a8d1d0baae74da58e301620bbb3e22a85bc0 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 17 Oct 2023 07:05:06 +0200 Subject: [PATCH 16/33] v2.4.7 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 3 +-- requirements.txt | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index ad62f2ab..90e50f35 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -414,10 +414,9 @@ path: /usr/local/share/pwnagotchi/ state: directory - # Install go-1.20.6 - name: Install go-1.21 unarchive: - src: https://go.dev/dl/go1.21.1.linux-arm64.tar.gz + src: https://go.dev/dl/go1.21.3.linux-arm64.tar.gz dest: /usr/local remote_src: yes register: golang diff --git a/requirements.txt b/requirements.txt index 89d8c85f..e30135e9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -gymnasium +gym shimmy pycryptodome requests @@ -18,7 +18,8 @@ dbus-python toml python-dateutil websockets -tensorflow +torch==2.0.1 +torchvision==0.15.2 stable_baselines3 RPi.GPIO pydrive2 \ No newline at end of file From d37fc117b98c0936a6d13b6478bbf6437c4085c4 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 17 Oct 2023 21:52:34 +0200 Subject: [PATCH 17/33] v2.4.8 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/dhcpcd.conf | 4 +- builder/data/etc/pwnagotchi/conf.d/age.toml | 5 - .../etc/pwnagotchi/conf.d/auto-update.toml | 3 - .../data/etc/pwnagotchi/conf.d/bt-tether.toml | 23 ----- .../etc/pwnagotchi/conf.d/fix_services.toml | 1 - .../etc/pwnagotchi/conf.d/gdrivesync.toml | 4 - .../etc/pwnagotchi/conf.d/gpio_buttons.toml | 1 - builder/data/etc/pwnagotchi/conf.d/gps.toml | 3 - builder/data/etc/pwnagotchi/conf.d/grid.toml | 5 - .../data/etc/pwnagotchi/conf.d/logtail.toml | 2 - .../data/etc/pwnagotchi/conf.d/memtemp.toml | 3 - .../data/etc/pwnagotchi/conf.d/net-pos.toml | 2 - .../etc/pwnagotchi/conf.d/onlinehascrack.toml | 5 - .../data/etc/pwnagotchi/conf.d/paw-gps.toml | 2 - .../data/etc/pwnagotchi/conf.d/pisugar2.toml | 3 - .../etc/pwnagotchi/conf.d/session-stats.toml | 2 - .../data/etc/pwnagotchi/conf.d/ups_hat_c.toml | 5 - .../data/etc/pwnagotchi/conf.d/ups_lite.toml | 2 - .../data/etc/pwnagotchi/conf.d/webcfg.toml | 1 - .../data/etc/pwnagotchi/conf.d/webgpsmap.toml | 1 - builder/data/etc/pwnagotchi/conf.d/wigle.toml | 4 - .../data/etc/pwnagotchi/conf.d/wpa-sec.toml | 5 - pwnagotchi/__init__.py | 3 +- pwnagotchi/defaults.toml | 97 +++++++++++++++++++ pwnagotchi/utils.py | 4 +- 25 files changed, 104 insertions(+), 86 deletions(-) delete mode 100644 builder/data/etc/pwnagotchi/conf.d/age.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/auto-update.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/bt-tether.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/fix_services.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/gps.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/grid.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/logtail.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/memtemp.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/net-pos.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/paw-gps.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/pisugar2.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/session-stats.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/ups_lite.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/webcfg.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/wigle.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml diff --git a/builder/data/etc/dhcpcd.conf b/builder/data/etc/dhcpcd.conf index deac8212..3878a8fe 100644 --- a/builder/data/etc/dhcpcd.conf +++ b/builder/data/etc/dhcpcd.conf @@ -49,8 +49,10 @@ denyinterfaces wlan0 interface eth0 static domain_name_servers=8.8.8.8 1.1.1.1 +metric=202 interface usb0 static ip_address=10.0.0.2/24 static routers=10.0.0.1 -static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 \ No newline at end of file +static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 +metric=203 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/age.toml b/builder/data/etc/pwnagotchi/conf.d/age.toml deleted file mode 100644 index 4ca7e8ea..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/age.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.age.enabled = false -main.plugins.age.age_x_coord = 0 -main.plugins.age.age_y_coord = 32 -main.plugins.age.str_x_coord = 67 -main.plugins.age.str_y_coord = 32 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/auto-update.toml b/builder/data/etc/pwnagotchi/conf.d/auto-update.toml deleted file mode 100644 index e073dbb9..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/auto-update.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.auto-update.enabled = true -main.plugins.auto-update.install = true -main.plugins.auto-update.interval = 1 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/bt-tether.toml b/builder/data/etc/pwnagotchi/conf.d/bt-tether.toml deleted file mode 100644 index 64d1691a..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/bt-tether.toml +++ /dev/null @@ -1,23 +0,0 @@ -main.plugins.bt-tether.enabled = false - -main.plugins.bt-tether.devices.android-phone.enabled = false -main.plugins.bt-tether.devices.android-phone.search_order = 1 -main.plugins.bt-tether.devices.android-phone.mac = "" -main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" -main.plugins.bt-tether.devices.android-phone.netmask = 24 -main.plugins.bt-tether.devices.android-phone.interval = 1 -main.plugins.bt-tether.devices.android-phone.scantime = 10 -main.plugins.bt-tether.devices.android-phone.max_tries = 10 -main.plugins.bt-tether.devices.android-phone.share_internet = false -main.plugins.bt-tether.devices.android-phone.priority = 1 - -main.plugins.bt-tether.devices.ios-phone.enabled = false -main.plugins.bt-tether.devices.ios-phone.search_order = 2 -main.plugins.bt-tether.devices.ios-phone.mac = "" -main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6" -main.plugins.bt-tether.devices.ios-phone.netmask = 24 -main.plugins.bt-tether.devices.ios-phone.interval = 5 -main.plugins.bt-tether.devices.ios-phone.scantime = 20 -main.plugins.bt-tether.devices.ios-phone.max_tries = 0 -main.plugins.bt-tether.devices.ios-phone.share_internet = false -main.plugins.bt-tether.devices.ios-phone.priority = 999 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/fix_services.toml b/builder/data/etc/pwnagotchi/conf.d/fix_services.toml deleted file mode 100644 index 9af7b6e1..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/fix_services.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.fix_services.enabled = true \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml b/builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml deleted file mode 100644 index f5a3b65c..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml +++ /dev/null @@ -1,4 +0,0 @@ -main.plugins.gdrivesync.enabled = false -main.plugins.gdrivesync.backupfiles = [''] -main.plugins.gdrivesync.backup_folder = "PwnagotchiBackups" -main.plugin.gdrivesync.interval = 1 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml b/builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml deleted file mode 100644 index 3567b22b..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.gpio_buttons.enabled = false \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/gps.toml b/builder/data/etc/pwnagotchi/conf.d/gps.toml deleted file mode 100644 index e975b538..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/gps.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.gps.enabled = false -main.plugins.gps.speed = 19200 -main.plugins.gps.device = "/dev/ttyUSB0" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/grid.toml b/builder/data/etc/pwnagotchi/conf.d/grid.toml deleted file mode 100644 index 0ec2ab52..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/grid.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.grid.enabled = true -main.plugins.grid.report = true -main.plugins.grid.exclude = [ - "YourHomeNetworkHere" -] \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/logtail.toml b/builder/data/etc/pwnagotchi/conf.d/logtail.toml deleted file mode 100644 index 55393368..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/logtail.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.logtail.enabled = false -main.plugins.logtail.max-lines = 10000 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/memtemp.toml b/builder/data/etc/pwnagotchi/conf.d/memtemp.toml deleted file mode 100644 index d3521d5f..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/memtemp.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.memtemp.enabled = false -main.plugins.memtemp.scale = "celsius" -main.plugins.memtemp.orientation = "horizontal" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/net-pos.toml b/builder/data/etc/pwnagotchi/conf.d/net-pos.toml deleted file mode 100644 index bdf22f1c..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/net-pos.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.net-pos.enabled = false -main.plugins.net-pos.api_key = "test" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml b/builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml deleted file mode 100644 index b1170d0a..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.onlinehashcrack.enabled = false -main.plugins.onlinehashcrack.email = "" -main.plugins.onlinehashcrack.dashboard = "" -main.plugins.onlinehashcrack.single_files = false -main.plugins.onlinehashcrack.whitelist = [] \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/paw-gps.toml b/builder/data/etc/pwnagotchi/conf.d/paw-gps.toml deleted file mode 100644 index b5e0cfee..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/paw-gps.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.paw-gps.enabled = false -main.plugins.paw-gps.ip = "192.168.44.1:8080" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/pisugar2.toml b/builder/data/etc/pwnagotchi/conf.d/pisugar2.toml deleted file mode 100644 index 424c8873..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/pisugar2.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.pisugar2.enabled = false -main.plugins.pisugar2.shutdown = 5 -main.plugins.pisugar2.sync_rtc_on_boot = false \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/session-stats.toml b/builder/data/etc/pwnagotchi/conf.d/session-stats.toml deleted file mode 100644 index ef57f4c8..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/session-stats.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.session-stats.enabled = true -main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml b/builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml deleted file mode 100644 index 5a0e405d..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.ups_hat_c.enabled = false -main.plugins.ups_hat_c.label_on = true # show BAT label or just percentage -main.plugins.ups_hat_c.shutdown = 5 # battery percent at which the device will turn off -main.plugins.ups_hat_c.bat_x_coord = 140 -main.plugins.ups_hat_c.bat_y_coord = 0 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/ups_lite.toml b/builder/data/etc/pwnagotchi/conf.d/ups_lite.toml deleted file mode 100644 index 7b6a43fc..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/ups_lite.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.ups_lite.enabled = false -main.plugins.ups_lite.shutdown = 2 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/webcfg.toml b/builder/data/etc/pwnagotchi/conf.d/webcfg.toml deleted file mode 100644 index d57b403e..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/webcfg.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.webcfg.enabled = true \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml b/builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml deleted file mode 100644 index 6a22d55c..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.webgpsmap.enabled = false \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/wigle.toml b/builder/data/etc/pwnagotchi/conf.d/wigle.toml deleted file mode 100644 index 8f612473..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/wigle.toml +++ /dev/null @@ -1,4 +0,0 @@ -main.plugins.wigle.enabled = false -main.plugins.wigle.api_key = "" -main.plugins.wigle.whitelist = [] -main.plugins.wigle.donate = true \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml b/builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml deleted file mode 100644 index bdd91e4b..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.wpa-sec.enabled = false -main.plugins.wpa-sec.api_key = "" -main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org" -main.plugins.wpa-sec.download_results = false -main.plugins.wpa-sec.whitelist = [] \ No newline at end of file diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index 4387579b..730c7d93 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -92,7 +92,8 @@ def cpu_load(tag=None): parts0 = _cpu_stat() time.sleep(0.1) # only need to sleep when no tag parts1 = _cpu_stat() - if tag: _cpu_stats[tag] = parts1 + if tag: + _cpu_stats[tag] = parts1 parts_diff = [p1 - p0 for (p0, p1) in zip(parts0, parts1)] user, nice, sys, idle, iowait, irq, softirq, steal, _guest, _guest_nice = parts_diff diff --git a/pwnagotchi/defaults.toml b/pwnagotchi/defaults.toml index 1e2f5caa..3cb3f5d8 100644 --- a/pwnagotchi/defaults.toml +++ b/pwnagotchi/defaults.toml @@ -10,6 +10,103 @@ main.custom_plugin_repos = [ main.custom_plugins = "/usr/local/share/pwnagotchi/custom-plugins/" +main.plugins.auto-update.enabled = true +main.plugins.auto-update.install = true +main.plugins.auto-update.interval = 1 + +main.plugins.bt-tether.enabled = false + +main.plugins.bt-tether.devices.android-phone.enabled = false +main.plugins.bt-tether.devices.android-phone.search_order = 1 +main.plugins.bt-tether.devices.android-phone.mac = "" +main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" +main.plugins.bt-tether.devices.android-phone.netmask = 24 +main.plugins.bt-tether.devices.android-phone.interval = 1 +main.plugins.bt-tether.devices.android-phone.scantime = 10 +main.plugins.bt-tether.devices.android-phone.max_tries = 10 +main.plugins.bt-tether.devices.android-phone.share_internet = false +main.plugins.bt-tether.devices.android-phone.priority = 1 + +main.plugins.bt-tether.devices.ios-phone.enabled = false +main.plugins.bt-tether.devices.ios-phone.search_order = 2 +main.plugins.bt-tether.devices.ios-phone.mac = "" +main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6" +main.plugins.bt-tether.devices.ios-phone.netmask = 24 +main.plugins.bt-tether.devices.ios-phone.interval = 5 +main.plugins.bt-tether.devices.ios-phone.scantime = 20 +main.plugins.bt-tether.devices.ios-phone.max_tries = 0 +main.plugins.bt-tether.devices.ios-phone.share_internet = false +main.plugins.bt-tether.devices.ios-phone.priority = 999 + +main.plugins.fix_services.enabled = true + +main.plugins.gdrivesync.enabled = false +main.plugins.gdrivesync.backupfiles = [''] +main.plugins.gdrivesync.backup_folder = "PwnagotchiBackups" +main.plugin.gdrivesync.interval = 1 + +main.plugins.gpio_buttons.enabled = false + +main.plugins.gps.enabled = false +main.plugins.gps.speed = 19200 +main.plugins.gps.device = "/dev/ttyUSB0" + +main.plugins.grid.enabled = true +main.plugins.grid.report = true +main.plugins.grid.exclude = [ + "YourHomeNetworkHere" +] + +main.plugins.logtail.enabled = false +main.plugins.logtail.max-lines = 10000 + +main.plugins.memtemp.enabled = false +main.plugins.memtemp.scale = "celsius" +main.plugins.memtemp.orientation = "horizontal" + +main.plugins.net-pos.enabled = false +main.plugins.net-pos.api_key = "test" + +main.plugins.onlinehashcrack.enabled = false +main.plugins.onlinehashcrack.email = "" +main.plugins.onlinehashcrack.dashboard = "" +main.plugins.onlinehashcrack.single_files = false +main.plugins.onlinehashcrack.whitelist = [] + +main.plugins.paw-gps.enabled = false +main.plugins.paw-gps.ip = "192.168.44.1:8080" + +main.plugins.pisugar2.enabled = false +main.plugins.pisugar2.shutdown = 5 +main.plugins.pisugar2.sync_rtc_on_boot = false + +main.plugins.session-stats.enabled = true +main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/" + +main.plugins.ups_hat_c.enabled = false +main.plugins.ups_hat_c.label_on = true # show BAT label or just percentage +main.plugins.ups_hat_c.shutdown = 5 # battery percent at which the device will turn off +main.plugins.ups_hat_c.bat_x_coord = 140 +main.plugins.ups_hat_c.bat_y_coord = 0 + +main.plugins.ups_lite.enabled = false +main.plugins.ups_lite.shutdown = 2 + +main.plugins.webcfg.enabled = true + +main.plugins.webgpsmap.enabled = false + +main.plugins.wigle.enabled = false +main.plugins.wigle.api_key = "" +main.plugins.wigle.whitelist = [] +main.plugins.wigle.donate = true + +main.plugins.wpa-sec.enabled = false +main.plugins.wpa-sec.api_key = "" +main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org" +main.plugins.wpa-sec.download_results = false +main.plugins.wpa-sec.whitelist = [] + main.iface = "wlan0mon" main.mon_start_cmd = "/usr/bin/monstart" main.mon_stop_cmd = "/usr/bin/monstop" diff --git a/pwnagotchi/utils.py b/pwnagotchi/utils.py index f8f38677..f9e9d117 100644 --- a/pwnagotchi/utils.py +++ b/pwnagotchi/utils.py @@ -223,13 +223,13 @@ def load_config(args): if user_config: config = merge_config(user_config, config) except Exception as ex: - logging.error("There was an error processing the configuration file:\n%s ",ex) + logging.error("There was an error processing the configuration file:\n%s ", ex) sys.exit(1) # dropins dropin = config['main']['confd'] if dropin and os.path.isdir(dropin): - dropin += '*.toml' if dropin.endswith('/') else '/*.toml' # only toml here; yaml is no more + dropin += '*.toml' if dropin.endswith('/') else '/*.toml' # only toml here; yaml is no more for conf in glob.glob(dropin): with open(conf) as toml_file: additional_config = toml.load(toml_file) From 8578fcbe4582d0d5a804556d6d79afbbcb650810 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 17 Oct 2023 21:52:34 +0200 Subject: [PATCH 18/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/dhcpcd.conf | 4 +- builder/data/etc/pwnagotchi/conf.d/age.toml | 5 - .../etc/pwnagotchi/conf.d/auto-update.toml | 3 - .../data/etc/pwnagotchi/conf.d/bt-tether.toml | 23 ----- .../etc/pwnagotchi/conf.d/fix_services.toml | 1 - .../etc/pwnagotchi/conf.d/gdrivesync.toml | 4 - .../etc/pwnagotchi/conf.d/gpio_buttons.toml | 1 - builder/data/etc/pwnagotchi/conf.d/gps.toml | 3 - builder/data/etc/pwnagotchi/conf.d/grid.toml | 5 - .../data/etc/pwnagotchi/conf.d/logtail.toml | 2 - .../data/etc/pwnagotchi/conf.d/memtemp.toml | 3 - .../data/etc/pwnagotchi/conf.d/net-pos.toml | 2 - .../etc/pwnagotchi/conf.d/onlinehascrack.toml | 5 - .../data/etc/pwnagotchi/conf.d/paw-gps.toml | 2 - .../data/etc/pwnagotchi/conf.d/pisugar2.toml | 3 - .../etc/pwnagotchi/conf.d/session-stats.toml | 2 - .../data/etc/pwnagotchi/conf.d/ups_hat_c.toml | 5 - .../data/etc/pwnagotchi/conf.d/ups_lite.toml | 2 - .../data/etc/pwnagotchi/conf.d/webcfg.toml | 1 - .../data/etc/pwnagotchi/conf.d/webgpsmap.toml | 1 - builder/data/etc/pwnagotchi/conf.d/wigle.toml | 4 - .../data/etc/pwnagotchi/conf.d/wpa-sec.toml | 5 - pwnagotchi/__init__.py | 3 +- pwnagotchi/_version.py | 2 +- pwnagotchi/defaults.toml | 97 +++++++++++++++++++ pwnagotchi/utils.py | 4 +- 26 files changed, 105 insertions(+), 87 deletions(-) delete mode 100644 builder/data/etc/pwnagotchi/conf.d/age.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/auto-update.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/bt-tether.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/fix_services.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/gps.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/grid.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/logtail.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/memtemp.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/net-pos.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/paw-gps.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/pisugar2.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/session-stats.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/ups_lite.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/webcfg.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/wigle.toml delete mode 100644 builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml diff --git a/builder/data/etc/dhcpcd.conf b/builder/data/etc/dhcpcd.conf index deac8212..3878a8fe 100644 --- a/builder/data/etc/dhcpcd.conf +++ b/builder/data/etc/dhcpcd.conf @@ -49,8 +49,10 @@ denyinterfaces wlan0 interface eth0 static domain_name_servers=8.8.8.8 1.1.1.1 +metric=202 interface usb0 static ip_address=10.0.0.2/24 static routers=10.0.0.1 -static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 \ No newline at end of file +static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 +metric=203 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/age.toml b/builder/data/etc/pwnagotchi/conf.d/age.toml deleted file mode 100644 index 4ca7e8ea..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/age.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.age.enabled = false -main.plugins.age.age_x_coord = 0 -main.plugins.age.age_y_coord = 32 -main.plugins.age.str_x_coord = 67 -main.plugins.age.str_y_coord = 32 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/auto-update.toml b/builder/data/etc/pwnagotchi/conf.d/auto-update.toml deleted file mode 100644 index e073dbb9..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/auto-update.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.auto-update.enabled = true -main.plugins.auto-update.install = true -main.plugins.auto-update.interval = 1 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/bt-tether.toml b/builder/data/etc/pwnagotchi/conf.d/bt-tether.toml deleted file mode 100644 index 64d1691a..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/bt-tether.toml +++ /dev/null @@ -1,23 +0,0 @@ -main.plugins.bt-tether.enabled = false - -main.plugins.bt-tether.devices.android-phone.enabled = false -main.plugins.bt-tether.devices.android-phone.search_order = 1 -main.plugins.bt-tether.devices.android-phone.mac = "" -main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" -main.plugins.bt-tether.devices.android-phone.netmask = 24 -main.plugins.bt-tether.devices.android-phone.interval = 1 -main.plugins.bt-tether.devices.android-phone.scantime = 10 -main.plugins.bt-tether.devices.android-phone.max_tries = 10 -main.plugins.bt-tether.devices.android-phone.share_internet = false -main.plugins.bt-tether.devices.android-phone.priority = 1 - -main.plugins.bt-tether.devices.ios-phone.enabled = false -main.plugins.bt-tether.devices.ios-phone.search_order = 2 -main.plugins.bt-tether.devices.ios-phone.mac = "" -main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6" -main.plugins.bt-tether.devices.ios-phone.netmask = 24 -main.plugins.bt-tether.devices.ios-phone.interval = 5 -main.plugins.bt-tether.devices.ios-phone.scantime = 20 -main.plugins.bt-tether.devices.ios-phone.max_tries = 0 -main.plugins.bt-tether.devices.ios-phone.share_internet = false -main.plugins.bt-tether.devices.ios-phone.priority = 999 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/fix_services.toml b/builder/data/etc/pwnagotchi/conf.d/fix_services.toml deleted file mode 100644 index 9af7b6e1..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/fix_services.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.fix_services.enabled = true \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml b/builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml deleted file mode 100644 index f5a3b65c..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/gdrivesync.toml +++ /dev/null @@ -1,4 +0,0 @@ -main.plugins.gdrivesync.enabled = false -main.plugins.gdrivesync.backupfiles = [''] -main.plugins.gdrivesync.backup_folder = "PwnagotchiBackups" -main.plugin.gdrivesync.interval = 1 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml b/builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml deleted file mode 100644 index 3567b22b..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/gpio_buttons.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.gpio_buttons.enabled = false \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/gps.toml b/builder/data/etc/pwnagotchi/conf.d/gps.toml deleted file mode 100644 index e975b538..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/gps.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.gps.enabled = false -main.plugins.gps.speed = 19200 -main.plugins.gps.device = "/dev/ttyUSB0" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/grid.toml b/builder/data/etc/pwnagotchi/conf.d/grid.toml deleted file mode 100644 index 0ec2ab52..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/grid.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.grid.enabled = true -main.plugins.grid.report = true -main.plugins.grid.exclude = [ - "YourHomeNetworkHere" -] \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/logtail.toml b/builder/data/etc/pwnagotchi/conf.d/logtail.toml deleted file mode 100644 index 55393368..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/logtail.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.logtail.enabled = false -main.plugins.logtail.max-lines = 10000 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/memtemp.toml b/builder/data/etc/pwnagotchi/conf.d/memtemp.toml deleted file mode 100644 index d3521d5f..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/memtemp.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.memtemp.enabled = false -main.plugins.memtemp.scale = "celsius" -main.plugins.memtemp.orientation = "horizontal" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/net-pos.toml b/builder/data/etc/pwnagotchi/conf.d/net-pos.toml deleted file mode 100644 index bdf22f1c..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/net-pos.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.net-pos.enabled = false -main.plugins.net-pos.api_key = "test" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml b/builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml deleted file mode 100644 index b1170d0a..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/onlinehascrack.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.onlinehashcrack.enabled = false -main.plugins.onlinehashcrack.email = "" -main.plugins.onlinehashcrack.dashboard = "" -main.plugins.onlinehashcrack.single_files = false -main.plugins.onlinehashcrack.whitelist = [] \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/paw-gps.toml b/builder/data/etc/pwnagotchi/conf.d/paw-gps.toml deleted file mode 100644 index b5e0cfee..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/paw-gps.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.paw-gps.enabled = false -main.plugins.paw-gps.ip = "192.168.44.1:8080" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/pisugar2.toml b/builder/data/etc/pwnagotchi/conf.d/pisugar2.toml deleted file mode 100644 index 424c8873..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/pisugar2.toml +++ /dev/null @@ -1,3 +0,0 @@ -main.plugins.pisugar2.enabled = false -main.plugins.pisugar2.shutdown = 5 -main.plugins.pisugar2.sync_rtc_on_boot = false \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/session-stats.toml b/builder/data/etc/pwnagotchi/conf.d/session-stats.toml deleted file mode 100644 index ef57f4c8..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/session-stats.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.session-stats.enabled = true -main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/" \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml b/builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml deleted file mode 100644 index 5a0e405d..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/ups_hat_c.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.ups_hat_c.enabled = false -main.plugins.ups_hat_c.label_on = true # show BAT label or just percentage -main.plugins.ups_hat_c.shutdown = 5 # battery percent at which the device will turn off -main.plugins.ups_hat_c.bat_x_coord = 140 -main.plugins.ups_hat_c.bat_y_coord = 0 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/ups_lite.toml b/builder/data/etc/pwnagotchi/conf.d/ups_lite.toml deleted file mode 100644 index 7b6a43fc..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/ups_lite.toml +++ /dev/null @@ -1,2 +0,0 @@ -main.plugins.ups_lite.enabled = false -main.plugins.ups_lite.shutdown = 2 \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/webcfg.toml b/builder/data/etc/pwnagotchi/conf.d/webcfg.toml deleted file mode 100644 index d57b403e..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/webcfg.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.webcfg.enabled = true \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml b/builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml deleted file mode 100644 index 6a22d55c..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/webgpsmap.toml +++ /dev/null @@ -1 +0,0 @@ -main.plugins.webgpsmap.enabled = false \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/wigle.toml b/builder/data/etc/pwnagotchi/conf.d/wigle.toml deleted file mode 100644 index 8f612473..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/wigle.toml +++ /dev/null @@ -1,4 +0,0 @@ -main.plugins.wigle.enabled = false -main.plugins.wigle.api_key = "" -main.plugins.wigle.whitelist = [] -main.plugins.wigle.donate = true \ No newline at end of file diff --git a/builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml b/builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml deleted file mode 100644 index bdd91e4b..00000000 --- a/builder/data/etc/pwnagotchi/conf.d/wpa-sec.toml +++ /dev/null @@ -1,5 +0,0 @@ -main.plugins.wpa-sec.enabled = false -main.plugins.wpa-sec.api_key = "" -main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org" -main.plugins.wpa-sec.download_results = false -main.plugins.wpa-sec.whitelist = [] \ No newline at end of file diff --git a/pwnagotchi/__init__.py b/pwnagotchi/__init__.py index 4387579b..730c7d93 100644 --- a/pwnagotchi/__init__.py +++ b/pwnagotchi/__init__.py @@ -92,7 +92,8 @@ def cpu_load(tag=None): parts0 = _cpu_stat() time.sleep(0.1) # only need to sleep when no tag parts1 = _cpu_stat() - if tag: _cpu_stats[tag] = parts1 + if tag: + _cpu_stats[tag] = parts1 parts_diff = [p1 - p0 for (p0, p1) in zip(parts0, parts1)] user, nice, sys, idle, iowait, irq, softirq, steal, _guest, _guest_nice = parts_diff diff --git a/pwnagotchi/_version.py b/pwnagotchi/_version.py index e91b5bf4..85bd7ff0 100644 --- a/pwnagotchi/_version.py +++ b/pwnagotchi/_version.py @@ -1 +1 @@ -__version__ = '2.4.8' +__version__ = '2.4.9' diff --git a/pwnagotchi/defaults.toml b/pwnagotchi/defaults.toml index 1e2f5caa..3cb3f5d8 100644 --- a/pwnagotchi/defaults.toml +++ b/pwnagotchi/defaults.toml @@ -10,6 +10,103 @@ main.custom_plugin_repos = [ main.custom_plugins = "/usr/local/share/pwnagotchi/custom-plugins/" +main.plugins.auto-update.enabled = true +main.plugins.auto-update.install = true +main.plugins.auto-update.interval = 1 + +main.plugins.bt-tether.enabled = false + +main.plugins.bt-tether.devices.android-phone.enabled = false +main.plugins.bt-tether.devices.android-phone.search_order = 1 +main.plugins.bt-tether.devices.android-phone.mac = "" +main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44" +main.plugins.bt-tether.devices.android-phone.netmask = 24 +main.plugins.bt-tether.devices.android-phone.interval = 1 +main.plugins.bt-tether.devices.android-phone.scantime = 10 +main.plugins.bt-tether.devices.android-phone.max_tries = 10 +main.plugins.bt-tether.devices.android-phone.share_internet = false +main.plugins.bt-tether.devices.android-phone.priority = 1 + +main.plugins.bt-tether.devices.ios-phone.enabled = false +main.plugins.bt-tether.devices.ios-phone.search_order = 2 +main.plugins.bt-tether.devices.ios-phone.mac = "" +main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6" +main.plugins.bt-tether.devices.ios-phone.netmask = 24 +main.plugins.bt-tether.devices.ios-phone.interval = 5 +main.plugins.bt-tether.devices.ios-phone.scantime = 20 +main.plugins.bt-tether.devices.ios-phone.max_tries = 0 +main.plugins.bt-tether.devices.ios-phone.share_internet = false +main.plugins.bt-tether.devices.ios-phone.priority = 999 + +main.plugins.fix_services.enabled = true + +main.plugins.gdrivesync.enabled = false +main.plugins.gdrivesync.backupfiles = [''] +main.plugins.gdrivesync.backup_folder = "PwnagotchiBackups" +main.plugin.gdrivesync.interval = 1 + +main.plugins.gpio_buttons.enabled = false + +main.plugins.gps.enabled = false +main.plugins.gps.speed = 19200 +main.plugins.gps.device = "/dev/ttyUSB0" + +main.plugins.grid.enabled = true +main.plugins.grid.report = true +main.plugins.grid.exclude = [ + "YourHomeNetworkHere" +] + +main.plugins.logtail.enabled = false +main.plugins.logtail.max-lines = 10000 + +main.plugins.memtemp.enabled = false +main.plugins.memtemp.scale = "celsius" +main.plugins.memtemp.orientation = "horizontal" + +main.plugins.net-pos.enabled = false +main.plugins.net-pos.api_key = "test" + +main.plugins.onlinehashcrack.enabled = false +main.plugins.onlinehashcrack.email = "" +main.plugins.onlinehashcrack.dashboard = "" +main.plugins.onlinehashcrack.single_files = false +main.plugins.onlinehashcrack.whitelist = [] + +main.plugins.paw-gps.enabled = false +main.plugins.paw-gps.ip = "192.168.44.1:8080" + +main.plugins.pisugar2.enabled = false +main.plugins.pisugar2.shutdown = 5 +main.plugins.pisugar2.sync_rtc_on_boot = false + +main.plugins.session-stats.enabled = true +main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/" + +main.plugins.ups_hat_c.enabled = false +main.plugins.ups_hat_c.label_on = true # show BAT label or just percentage +main.plugins.ups_hat_c.shutdown = 5 # battery percent at which the device will turn off +main.plugins.ups_hat_c.bat_x_coord = 140 +main.plugins.ups_hat_c.bat_y_coord = 0 + +main.plugins.ups_lite.enabled = false +main.plugins.ups_lite.shutdown = 2 + +main.plugins.webcfg.enabled = true + +main.plugins.webgpsmap.enabled = false + +main.plugins.wigle.enabled = false +main.plugins.wigle.api_key = "" +main.plugins.wigle.whitelist = [] +main.plugins.wigle.donate = true + +main.plugins.wpa-sec.enabled = false +main.plugins.wpa-sec.api_key = "" +main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org" +main.plugins.wpa-sec.download_results = false +main.plugins.wpa-sec.whitelist = [] + main.iface = "wlan0mon" main.mon_start_cmd = "/usr/bin/monstart" main.mon_stop_cmd = "/usr/bin/monstop" diff --git a/pwnagotchi/utils.py b/pwnagotchi/utils.py index f8f38677..f9e9d117 100644 --- a/pwnagotchi/utils.py +++ b/pwnagotchi/utils.py @@ -223,13 +223,13 @@ def load_config(args): if user_config: config = merge_config(user_config, config) except Exception as ex: - logging.error("There was an error processing the configuration file:\n%s ",ex) + logging.error("There was an error processing the configuration file:\n%s ", ex) sys.exit(1) # dropins dropin = config['main']['confd'] if dropin and os.path.isdir(dropin): - dropin += '*.toml' if dropin.endswith('/') else '/*.toml' # only toml here; yaml is no more + dropin += '*.toml' if dropin.endswith('/') else '/*.toml' # only toml here; yaml is no more for conf in glob.glob(dropin): with open(conf) as toml_file: additional_config = toml.load(toml_file) From d104772ee874bf6f46272a5d66f97e183641fd55 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Tue, 17 Oct 2023 22:28:06 +0200 Subject: [PATCH 19/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/dhcpcd.conf | 2 +- builder/data/etc/network/interfaces.d/usb0-cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/data/etc/dhcpcd.conf b/builder/data/etc/dhcpcd.conf index 3878a8fe..a19c8a11 100644 --- a/builder/data/etc/dhcpcd.conf +++ b/builder/data/etc/dhcpcd.conf @@ -55,4 +55,4 @@ interface usb0 static ip_address=10.0.0.2/24 static routers=10.0.0.1 static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 -metric=203 \ No newline at end of file +metric=208 \ No newline at end of file diff --git a/builder/data/etc/network/interfaces.d/usb0-cfg b/builder/data/etc/network/interfaces.d/usb0-cfg index c1d9150b..62e721b8 100644 --- a/builder/data/etc/network/interfaces.d/usb0-cfg +++ b/builder/data/etc/network/interfaces.d/usb0-cfg @@ -5,4 +5,4 @@ iface usb0 inet static network 10.0.0.0 broadcast 10.0.0.255 gateway 10.0.0.1 - metric 203 \ No newline at end of file + metric 208 \ No newline at end of file From 2e0faa0674a5affc13720ea30b2fac46372683ea Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 18 Oct 2023 08:45:50 +0200 Subject: [PATCH 20/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/dhcpcd.conf | 7 ++++++- .../data/etc/network/interfaces.d/eth0-cfg | 2 -- builder/data/etc/network/interfaces.d/lo-cfg | 2 -- .../data/etc/network/interfaces.d/usb0-cfg | 8 -------- .../data/etc/network/interfaces.d/wlan0-cfg | 2 -- builder/pwnagotchi.json | 20 ------------------- 6 files changed, 6 insertions(+), 35 deletions(-) delete mode 100644 builder/data/etc/network/interfaces.d/eth0-cfg delete mode 100644 builder/data/etc/network/interfaces.d/lo-cfg delete mode 100644 builder/data/etc/network/interfaces.d/usb0-cfg delete mode 100644 builder/data/etc/network/interfaces.d/wlan0-cfg diff --git a/builder/data/etc/dhcpcd.conf b/builder/data/etc/dhcpcd.conf index a19c8a11..d24b1061 100644 --- a/builder/data/etc/dhcpcd.conf +++ b/builder/data/etc/dhcpcd.conf @@ -51,8 +51,13 @@ interface eth0 static domain_name_servers=8.8.8.8 1.1.1.1 metric=202 +interface bnep0 +metric 203 + interface usb0 static ip_address=10.0.0.2/24 static routers=10.0.0.1 static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 -metric=208 \ No newline at end of file +metric=204 + +interface lo \ No newline at end of file diff --git a/builder/data/etc/network/interfaces.d/eth0-cfg b/builder/data/etc/network/interfaces.d/eth0-cfg deleted file mode 100644 index 2166051a..00000000 --- a/builder/data/etc/network/interfaces.d/eth0-cfg +++ /dev/null @@ -1,2 +0,0 @@ -allow-hotplug eth0 -iface eth0 inet dhcp \ No newline at end of file diff --git a/builder/data/etc/network/interfaces.d/lo-cfg b/builder/data/etc/network/interfaces.d/lo-cfg deleted file mode 100644 index 18ff4764..00000000 --- a/builder/data/etc/network/interfaces.d/lo-cfg +++ /dev/null @@ -1,2 +0,0 @@ -auto lo -iface lo inet loopback \ No newline at end of file diff --git a/builder/data/etc/network/interfaces.d/usb0-cfg b/builder/data/etc/network/interfaces.d/usb0-cfg deleted file mode 100644 index 62e721b8..00000000 --- a/builder/data/etc/network/interfaces.d/usb0-cfg +++ /dev/null @@ -1,8 +0,0 @@ -allow-hotplug usb0 -iface usb0 inet static - address 10.0.0.2 - netmask 255.255.255.0 - network 10.0.0.0 - broadcast 10.0.0.255 - gateway 10.0.0.1 - metric 208 \ No newline at end of file diff --git a/builder/data/etc/network/interfaces.d/wlan0-cfg b/builder/data/etc/network/interfaces.d/wlan0-cfg deleted file mode 100644 index f5425694..00000000 --- a/builder/data/etc/network/interfaces.d/wlan0-cfg +++ /dev/null @@ -1,2 +0,0 @@ -allow-hotplug wlan0 -iface wlan0 inet static \ No newline at end of file diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index e667d8cc..40707c01 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -49,26 +49,6 @@ "source": "../builder/data/usr/bin/hdmioff", "destination": "/usr/bin/hdmioff" }, - { - "type": "file", - "source": "../builder/data/etc/network/interfaces.d/lo-cfg", - "destination": "/etc/network/interfaces.d/lo-cfg" - }, - { - "type": "file", - "source": "../builder/data/etc/network/interfaces.d/wlan0-cfg", - "destination": "/etc/network/interfaces.d/wlan0-cfg" - }, - { - "type": "file", - "source": "../builder/data/etc/network/interfaces.d/usb0-cfg", - "destination": "/etc/network/interfaces.d/usb0-cfg" - }, - { - "type": "file", - "source": "../builder/data/etc/network/interfaces.d/eth0-cfg", - "destination": "/etc/network/interfaces.d/eth0-cfg" - }, { "type": "file", "source": "../builder/data/etc/systemd/system/pwngrid-peer.service", From 91451e7639d0e98da946dfcaefbbcf79a4cceda7 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 18 Oct 2023 09:41:39 +0200 Subject: [PATCH 21/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 144 +---------------------------------------- 1 file changed, 3 insertions(+), 141 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index a3f3e4a5..9165e833 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -203,162 +203,24 @@ executable: /bin/bash chdir: /usr/local/src/nexmon/ - #- name: choose the right kernel version (bcm43455c0) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile - # backup: no - # regexp: "KERNEL_VERSION = .*$" - # replace: "KERNEL_VERSION = {{ kernel.min }}" - - #- name: choose the right kernel release (variable) (bcm43455c0) - # lineinfile: - # dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile - # insertafter: "DRIVER_FOLDER_NAME = .*$" - # line: "KERNEL_RELEASE = {{ kernel.full }}" - - #- name: choose the right kernel arch (bcm43455c0) - # lineinfile: - # dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile - # insertafter: "KERNEL_RELEASE = .*$" - # line: "KERNEL_ARCH = {{ kernel.arch }}" - - #- name: choose the right kernel arch (replace string) (bcm43455c0) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile - # backup: no - # regexp: "shell uname -m" - # replace: "KERNEL_ARCH" - - #- name: choose the right kernel release (replace string) (bcm43455c0) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile - # backup: no - # regexp: "shell uname -r" - # replace: "KERNEL_RELEASE" - - name: make firmware patch (bcm43455c0) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make && make install-firmware" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ - - name: install new firmware (bcm43455c0) - copy: - src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin - dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin - follow: true - - #- name: choose the right kernel version (bcm43436b0) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile - # backup: no - # regexp: "KERNEL_VERSION = .*$" - # replace: "KERNEL_VERSION = {{ kernel.min }}" - - #- name: choose the right kernel release (variable) (bcm43436b0) - # lineinfile: - # dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile - # insertafter: "DRIVER_FOLDER_NAME = .*$" - # line: "KERNEL_RELEASE = {{ kernel.full }}" - - #- name: choose the right kernel arch (bcm43436b0) - # lineinfile: - # dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile - # insertafter: "KERNEL_RELEASE = .*$" - # line: "KERNEL_ARCH = {{ kernel.arch }}" - - #- name: choose the right kernel arch (bcm43436b0) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile - # backup: no - # regexp: "shell uname -m" - # replace: "KERNEL_ARCH" - - #- name: choose the right kernel release (replace string) (bcm43436b0) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile - # backup: no - # regexp: "shell uname -r" - # replace: "KERNEL_RELEASE" - - name: make firmware patch (bcm43436b0) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make && make install-firmware" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ - - name: install new firmware (bcm43436b0) - copy: - src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin - dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin - follow: true - - #- name: choose the right kernel version (bcm43430a1) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile - # backup: no - # regexp: "KERNEL_VERSION = .*$" - # replace: "KERNEL_VERSION = {{ kernel.min }}" - - #- name: choose the right kernel release (variable) (bcm43430a1) - # lineinfile: - # dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile - # insertafter: "DRIVER_FOLDER_NAME = .*$" - # line: "KERNEL_RELEASE = {{ kernel.full }}" - - #- name: choose the right kernel arch (bcm43430a1) - # lineinfile: - # dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile - # insertafter: "KERNEL_RELEASE = .*$" - # line: "KERNEL_ARCH = {{ kernel.arch }}" - - #- name: choose the right kernel arch (bcm43430a1) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile - # backup: no - # regexp: "shell uname -m" - # replace: "KERNEL_ARCH" - - #- name: choose the right kernel release (replace string) (bcm43430a1) - # replace: - # dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile - # backup: no - # regexp: "shell uname -r" - # replace: "KERNEL_RELEASE" - - name: make firmware patch (bcm43430a1) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make && make install-firmware" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ - - name: install new firmware (bcm43430a1) - copy: - src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin - dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin - follow: true - - - name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2 - copy: - src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin - dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin - follow: true - - - name: Delete the firmware blob to avoid it crashing - file: - state: absent - path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob - - - name: Delete the RPiZW firmware blob to avoid it crashing - file: - state: absent - path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob - - - name: Delete the RPi3 firmware blob to avoid it crashing - file: - state: absent - path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob - - name: backup original driver command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" From 524612496b98da28c928aaa0dc837c33cb7e0899 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 18 Oct 2023 10:11:06 +0200 Subject: [PATCH 22/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 45 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 9165e833..47b06df2 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -204,23 +204,62 @@ chdir: /usr/local/src/nexmon/ - name: make firmware patch (bcm43455c0) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make && make install-firmware" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ + - name: install new firmware (bcm43455c0) + copy: + src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin + follow: true + - name: make firmware patch (bcm43436b0) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make && make install-firmware" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ + - name: install new firmware (bcm43436b0) + copy: + src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin + follow: true + - name: make firmware patch (bcm43430a1) - shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make && make install-firmware" + shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make" args: executable: /bin/bash chdir: /usr/local/src/nexmon/ + - name: install new firmware (bcm43430a1) + copy: + src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin + follow: true + + - name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2 + copy: + src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin + dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin + follow: true + + - name: Delete the firmware blob to avoid it crashing + file: + state: absent + path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob + + - name: Delete the RPiZW firmware blob to avoid it crashing + file: + state: absent + path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob + + - name: Delete the RPi3 firmware blob to avoid it crashing + file: + state: absent + path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob + - name: backup original driver command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" From 3218eb4ca8e6ac245e7dbc15b517aab1d1a63099 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 18 Oct 2023 11:24:10 +0200 Subject: [PATCH 23/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 47b06df2..b4f14d69 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -551,6 +551,11 @@ autoremove: yes when: removed.changed + - name: rfkill unblock all + shell: "rfkill unblock all" + args: + executable: /bin/bash + handlers: - name: reload systemd services systemd: From 39ce42db96f507ee6ef4416b9bbea4af07b8810e Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 18 Oct 2023 12:14:02 +0200 Subject: [PATCH 24/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index b4f14d69..e083f4b2 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -153,6 +153,9 @@ content: | pi:$6$3jNr0GA9KIyt4hmM$efeVIopdMQ8DGgEPCWWlbx3mJJNAYci1lEXGdlky0xPyjqwKNbwTL5SrCcpb4144C4IvzWjn7Iv.QjqmU7iyT/ + - name: rfkill unblock all + command: "rfkill unblock all" + - name: change hostname lineinfile: dest: /etc/hostname @@ -551,11 +554,6 @@ autoremove: yes when: removed.changed - - name: rfkill unblock all - shell: "rfkill unblock all" - args: - executable: /bin/bash - handlers: - name: reload systemd services systemd: From a440fcdf1e6a399c022c5770d1c7083e8e014c89 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Wed, 18 Oct 2023 12:26:53 +0200 Subject: [PATCH 25/33] v2.4.9 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index e083f4b2..47b06df2 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -153,9 +153,6 @@ content: | pi:$6$3jNr0GA9KIyt4hmM$efeVIopdMQ8DGgEPCWWlbx3mJJNAYci1lEXGdlky0xPyjqwKNbwTL5SrCcpb4144C4IvzWjn7Iv.QjqmU7iyT/ - - name: rfkill unblock all - command: "rfkill unblock all" - - name: change hostname lineinfile: dest: /etc/hostname From 23681e9cdcb7f9f88110e416cad9e21109804232 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 07:52:44 +0200 Subject: [PATCH 26/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/data/etc/dhcpcd.conf | 6 +++--- builder/data/usr/bin/pwnlib | 1 - builder/pwnagotchi.yml | 6 ++++++ pwnagotchi/_version.py | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/builder/data/etc/dhcpcd.conf b/builder/data/etc/dhcpcd.conf index d24b1061..95c71a3a 100644 --- a/builder/data/etc/dhcpcd.conf +++ b/builder/data/etc/dhcpcd.conf @@ -51,13 +51,13 @@ interface eth0 static domain_name_servers=8.8.8.8 1.1.1.1 metric=202 -interface bnep0 -metric 203 - interface usb0 static ip_address=10.0.0.2/24 static routers=10.0.0.1 static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1 +metric=203 + +interface bnep0 metric=204 interface lo \ No newline at end of file diff --git a/builder/data/usr/bin/pwnlib b/builder/data/usr/bin/pwnlib index adf1e978..b50fb07a 100755 --- a/builder/data/usr/bin/pwnlib +++ b/builder/data/usr/bin/pwnlib @@ -37,7 +37,6 @@ reload_brcm() { # starts mon0 start_monitor_interface() { - rfkill unblock all ifconfig wlan0 up iw dev wlan0 set power_save off airmon-ng check kill diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 47b06df2..41bb2797 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -460,6 +460,12 @@ regexp: '(.*)$' line: '\1 modules-load=dwc2,g_ether' + - name: rfkill unblock all at boot + lineinfile: + dest: /boot/cmdline.txt + insertafter: EOF + line: "systemd.restore_state=0 rfkill.default_state=1" + - name: Add pwnlog alias lineinfile: dest: /home/pi/.bashrc diff --git a/pwnagotchi/_version.py b/pwnagotchi/_version.py index 85bd7ff0..e59b17b4 100644 --- a/pwnagotchi/_version.py +++ b/pwnagotchi/_version.py @@ -1 +1 @@ -__version__ = '2.4.9' +__version__ = '2.5.0' From a841ebb1cdffc72c7b5b52dcc2dbef03bd3cee4a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 09:53:26 +0200 Subject: [PATCH 27/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 8 ++++---- builder/pwnagotchi.yml | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index 40707c01..1a3befc4 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -3,13 +3,13 @@ { "name": "pwnagotchi", "type": "arm-image", - "iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz", - "iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256", + "iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-10-10/2023-10-10-raspios-bookworm-arm64-lite.img.xz", + "iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-10-10/2023-10-10-raspios-bookworm-arm64-lite.img.xz.sha256", "target_image_size": 8568709120, "qemu_binary": "qemu-aarch64-static", - "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", + "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-bookworm-arm64.img", "qemu_args": [ - "-r", "6.1.21-v8+" + "-r", "6.1.0-rpi4-rpi-v8" ] } ], diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 41bb2797..6a411a9c 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -6,7 +6,7 @@ vars: kernel: min: "6.1" - full: "6.1.21-v8+" + full: "6.1.0-rpi4-rpi-v8" pwnagotchi: hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}" version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi-torch', true) }}" @@ -23,6 +23,7 @@ services: enable: - bettercap.service + - dhcpcd - dphys-swapfile.service - fstrim.timer - pwnagotchi.service @@ -70,6 +71,7 @@ - bluez - build-essential - curl + - dhcpcd5 - dkms - dphys-swapfile - fbi @@ -86,6 +88,7 @@ - libavcodec58 - libavformat58 - libblas-dev + - libbluetooth3 - libbz2-dev - libc-ares-dev - libc6-dev @@ -262,6 +265,7 @@ - name: backup original driver command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" + with_items: "{{ kernel.full }}" - name: copy modified driver copy: From 4358c38891292d4b19680259f9156e8fd79f665e Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 10:02:15 +0200 Subject: [PATCH 28/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 6a411a9c..4ef3dbe2 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -120,7 +120,7 @@ - libsqlite3-dev - libssl-dev - libswscale5 - - libtiff5 + - libtiff6 - libtool - libusb-1.0-0-dev - lsof From 451dc1ecae7ac5b5ac255329606a832d918aa87a Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 10:14:26 +0200 Subject: [PATCH 29/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 4ef3dbe2..9807211b 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -85,8 +85,6 @@ - gcc-arm-none-eabi - git - libatlas-base-dev - - libavcodec58 - - libavformat58 - libblas-dev - libbluetooth3 - libbz2-dev From f5c69ef12817eed470fd6deb9ab949241bde8912 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 11:38:55 +0200 Subject: [PATCH 30/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.json | 8 ++++---- builder/pwnagotchi.yml | 10 ++++------ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json index 1a3befc4..40707c01 100644 --- a/builder/pwnagotchi.json +++ b/builder/pwnagotchi.json @@ -3,13 +3,13 @@ { "name": "pwnagotchi", "type": "arm-image", - "iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-10-10/2023-10-10-raspios-bookworm-arm64-lite.img.xz", - "iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-10-10/2023-10-10-raspios-bookworm-arm64-lite.img.xz.sha256", + "iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz", + "iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256", "target_image_size": 8568709120, "qemu_binary": "qemu-aarch64-static", - "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-bookworm-arm64.img", + "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", "qemu_args": [ - "-r", "6.1.0-rpi4-rpi-v8" + "-r", "6.1.21-v8+" ] } ], diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 9807211b..41bb2797 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -6,7 +6,7 @@ vars: kernel: min: "6.1" - full: "6.1.0-rpi4-rpi-v8" + full: "6.1.21-v8+" pwnagotchi: hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}" version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi-torch', true) }}" @@ -23,7 +23,6 @@ services: enable: - bettercap.service - - dhcpcd - dphys-swapfile.service - fstrim.timer - pwnagotchi.service @@ -71,7 +70,6 @@ - bluez - build-essential - curl - - dhcpcd5 - dkms - dphys-swapfile - fbi @@ -85,8 +83,9 @@ - gcc-arm-none-eabi - git - libatlas-base-dev + - libavcodec58 + - libavformat58 - libblas-dev - - libbluetooth3 - libbz2-dev - libc-ares-dev - libc6-dev @@ -118,7 +117,7 @@ - libsqlite3-dev - libssl-dev - libswscale5 - - libtiff6 + - libtiff5 - libtool - libusb-1.0-0-dev - lsof @@ -263,7 +262,6 @@ - name: backup original driver command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" - with_items: "{{ kernel.full }}" - name: copy modified driver copy: From 462e0f70925f78cb8f77d8075325f0c8b19ef4c7 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 21:42:30 +0200 Subject: [PATCH 31/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 41bb2797..72f67b88 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -27,6 +27,7 @@ - fstrim.timer - pwnagotchi.service - pwngrid-peer.service + - rfkill-unblock@all disable: - apt-daily-upgrade.service - apt-daily-upgrade.timer From 422e05197b6cec04d64d11edff4f8c73939584af Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 22:29:21 +0200 Subject: [PATCH 32/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 72f67b88..41bb2797 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -27,7 +27,6 @@ - fstrim.timer - pwnagotchi.service - pwngrid-peer.service - - rfkill-unblock@all disable: - apt-daily-upgrade.service - apt-daily-upgrade.timer From 2f07e147c85db2263fd9476219c50b75146838c2 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 20 Oct 2023 22:30:22 +0200 Subject: [PATCH 33/33] v2.5.0 Signed-off-by: Jeroen Oudshoorn --- builder/pwnagotchi.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index 41bb2797..fa04641b 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -394,6 +394,8 @@ 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: