diff --git a/builder/combined.json.pkr.hcl b/builder/combined.json.pkr.hcl index 2be005ff..119ef4c6 100644 --- a/builder/combined.json.pkr.hcl +++ b/builder/combined.json.pkr.hcl @@ -21,8 +21,8 @@ variable "pwn_version" { source "arm-image" "rpi64-pwnagotchi" { image_type = "raspberrypi" - iso_url = "https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz" - iso_checksum = "sha256:58a3ec57402c86332e67789a6b8f149aeeb4e7bb0a16c9388a66ea6e07012e45" + iso_url = "https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz" + iso_checksum = "sha256:43d150e7901583919e4eb1f0fa83fe0363af2d1e9777a5bb707d696d535e2599" output_filename = "../../../pwnagotchi-64bit.img" qemu_binary = "qemu-aarch64-static" target_image_size = 19969908736 @@ -30,8 +30,8 @@ source "arm-image" "rpi64-pwnagotchi" { source "arm-image" "rpi32-pwnagotchi" { image_type = "raspberrypi" - iso_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz" - iso_checksum = "sha256:4fa99737265ac338a9ed0643f502246b97b928e5dfffa92939242e26e290638d" + iso_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-07-04/2024-07-04-raspios-bookworm-armhf-lite.img.xz" + iso_checksum = "sha256:df9c192d66d35e1ce67acde33a5b5f2b81ff02d2b986ea52f1f6ea211d646a1b" output_filename = "../../../pwnagotchi-32bit.img" qemu_binary = "qemu-arm-static" qemu_args = ["-cpu", "arm1176"] diff --git a/builder/data/32bit/etc/profile b/builder/data/32bit/etc/profile index adddcd76..f7ef2f2a 100644 --- a/builder/data/32bit/etc/profile +++ b/builder/data/32bit/etc/profile @@ -34,7 +34,7 @@ if [ -d /etc/profile.d ]; then fi alias custom='cd /usr/local/share/pwnagotchi/custom-plugins/' alias config='sudo nano /etc/pwnagotchi/config.toml' -alias pwnlog='tail -f -n300 /etc/pwnagotchi/log/pwn*.log | sed --unbuffered "s/,[[:digit:]]\\{3\\}\\]//g" | cut -d " " -f 2-' +alias pwnlog='tail -f -n300 /etc/pwnagotchi/log/pwnagotchi.log | sed --unbuffered "s/,[[:digit:]]\\{3\\}\\]//g" | cut -d " " -f 2-' alias pwnver='python3 -c "import pwnagotchi as p; print(p.__version__)"' alias pwnkill='sudo killall -USR1 pwnagotchi' diff --git a/builder/data/64bit/etc/profile b/builder/data/64bit/etc/profile index adddcd76..f7ef2f2a 100644 --- a/builder/data/64bit/etc/profile +++ b/builder/data/64bit/etc/profile @@ -34,7 +34,7 @@ if [ -d /etc/profile.d ]; then fi alias custom='cd /usr/local/share/pwnagotchi/custom-plugins/' alias config='sudo nano /etc/pwnagotchi/config.toml' -alias pwnlog='tail -f -n300 /etc/pwnagotchi/log/pwn*.log | sed --unbuffered "s/,[[:digit:]]\\{3\\}\\]//g" | cut -d " " -f 2-' +alias pwnlog='tail -f -n300 /etc/pwnagotchi/log/pwnagotchi.log | sed --unbuffered "s/,[[:digit:]]\\{3\\}\\]//g" | cut -d " " -f 2-' alias pwnver='python3 -c "import pwnagotchi as p; print(p.__version__)"' alias pwnkill='sudo killall -USR1 pwnagotchi' diff --git a/builder/raspberrypi32.json.pkr.hcl b/builder/raspberrypi32.json.pkr.hcl index 621940db..63d88f61 100644 --- a/builder/raspberrypi32.json.pkr.hcl +++ b/builder/raspberrypi32.json.pkr.hcl @@ -21,8 +21,8 @@ variable "pwn_version" { source "arm-image" "rpi32-pwnagotchi" { image_type = "raspberrypi" - iso_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz" - iso_checksum = "sha256:4fa99737265ac338a9ed0643f502246b97b928e5dfffa92939242e26e290638d" + iso_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-07-04/2024-07-04-raspios-bookworm-armhf-lite.img.xz" + iso_checksum = "sha256:df9c192d66d35e1ce67acde33a5b5f2b81ff02d2b986ea52f1f6ea211d646a1b" output_filename = "../../../pwnagotchi-32bit.img" qemu_binary = "qemu-arm-static" qemu_args = ["-cpu", "arm1176"] diff --git a/builder/raspberrypi32.yml b/builder/raspberrypi32.yml index 101c234a..c3d0790e 100644 --- a/builder/raspberrypi32.yml +++ b/builder/raspberrypi32.yml @@ -58,7 +58,6 @@ remove: - nfs-common - triggerhappy - - wpasupplicant install: - aircrack-ng - autoconf @@ -110,7 +109,6 @@ - python3-smbus - qpdf - raspberrypi-kernel-headers - - raspberrypi-sys-mods - rsync - tcpdump - texinfo @@ -543,6 +541,13 @@ autoremove: yes when: removed.changed + - name: install rpi-sys-mods again? + apt: + state: present + name: raspberrypi-sys-mods + update_cache: yes + install_recommends: no + - name: clean apt cache apt: autoclean: true diff --git a/builder/raspberrypi64.json.pkr.hcl b/builder/raspberrypi64.json.pkr.hcl index 3023c3c2..dea21576 100644 --- a/builder/raspberrypi64.json.pkr.hcl +++ b/builder/raspberrypi64.json.pkr.hcl @@ -21,8 +21,8 @@ variable "pwn_version" { source "arm-image" "rpi64-pwnagotchi" { image_type = "raspberrypi" - iso_url = "https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz" - iso_checksum = "sha256:58a3ec57402c86332e67789a6b8f149aeeb4e7bb0a16c9388a66ea6e07012e45" + iso_url = "https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-07-04/2024-07-04-raspios-bookworm-arm64-lite.img.xz" + iso_checksum = "sha256:43d150e7901583919e4eb1f0fa83fe0363af2d1e9777a5bb707d696d535e2599" output_filename = "../../../pwnagotchi-64bit.img" qemu_binary = "qemu-aarch64-static" target_image_size = 19969908736 diff --git a/builder/raspberrypi64.yml b/builder/raspberrypi64.yml index 826b7a87..4cb36738 100644 --- a/builder/raspberrypi64.yml +++ b/builder/raspberrypi64.yml @@ -55,7 +55,6 @@ - dhpys-swapfile - nfs-common - triggerhappy - - wpasupplicant install: - aircrack-ng - autoconf diff --git a/pwnagotchi/ai/gym.py b/pwnagotchi/ai/gym.py index a9800658..ecd9ecdc 100644 --- a/pwnagotchi/ai/gym.py +++ b/pwnagotchi/ai/gym.py @@ -1,6 +1,6 @@ import logging -import gym -from gym import spaces +import gymnasium as gym +from gymnasium import spaces import numpy as np import pwnagotchi.ai.featurizer as featurizer diff --git a/pwnagotchi/ai/parameter.py b/pwnagotchi/ai/parameter.py index 414129b7..5bf6b39c 100644 --- a/pwnagotchi/ai/parameter.py +++ b/pwnagotchi/ai/parameter.py @@ -1,5 +1,4 @@ -from gym import spaces - +from gymnasium import spaces class Parameter(object): def __init__(self, name, value=0.0, min_value=0, max_value=2, meta=None, trainable=True): diff --git a/pyproject.toml b/pyproject.toml index be0a33da..e8a42e5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,7 +16,6 @@ dependencies = [ "flask-wtf", "gast", "gpiozero", - "gym", "inky", "pycryptodome", "pydrive2", @@ -59,4 +58,4 @@ Repository = "https://github.com/jayofelony/pwnagotchi.git" Issues = "https://github.com/jayofelony/pwnagotchi/issues" [project.scripts] -pwnagotchi_cli = "bin.pwnagotchi:pwnagotchi_cli" \ No newline at end of file +pwnagotchi_cli = "bin.pwnagotchi:pwnagotchi_cli" diff --git a/requirements.txt b/requirements.txt index e7714400..0eb75236 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -gym shimmy pycryptodome requests @@ -21,4 +20,9 @@ websockets stable_baselines3 rpi-lgpio rpi_hardware_pwm -pydrive2 \ No newline at end of file +pydrive2 +setuptools +gymnasium +numpy +smbus +gpiozero \ No newline at end of file