Update bookworm

This commit is contained in:
Jeroen Oudshoorn
2024-01-04 22:51:52 +01:00
parent 0daa614a1e
commit 93d1c58b80
6 changed files with 20 additions and 38 deletions

View File

@ -22,8 +22,8 @@ variable "pwn_version" {
}
source "arm" "rpi64-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64-lite.img.xz"]
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xz"]
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
@ -51,8 +51,8 @@ source "arm" "rpi64-pwnagotchi" {
}
}
source "arm" "rpi32-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-06/2023-12-05-raspios-bookworm-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-06/2023-12-05-raspios-bookworm-armhf-lite.img.xz"]
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-11/2023-12-11-raspios-bookworm-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-12-11/2023-12-11-raspios-bookworm-armhf-lite.img.xz"]
file_checksum_type = "sha256"
file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]

View File

@ -85,12 +85,6 @@
opwngrid:
source: "https://github.com/jayofelony/pwngrid.git"
url: "https://github.com/jayofelony/pwngrid/releases/download/v1.10.5/pwngrid-1.10.5-armhf.zip"
torch:
wheel: "torch-2.1.0a0+gita8e7c98-cp311-cp311-linux_armv6l.whl"
url: "https://github.com/Sniffleupagus/Torch4Pizero/releases/download/py0torch-bookworm/torch-2.1.0a0+gita8e7c98-cp311-cp311-linux_armv6l.whl"
torchvision:
wheel: "torchvision-0.16.0+fbb4cc5-cp311-cp311-linux_armv6l.whl"
url: "https://github.com/Sniffleupagus/Torch4Pizero/releases/download/py0torch-bookworm/torchvision-0.16.0+fbb4cc5-cp311-cp311-linux_armv6l.whl"
apt:
downgrade:
- libpcap-dev_1.9.1-4_armhf.deb
@ -337,27 +331,12 @@
repo: https://github.com/jayofelony/pwnagotchi-torch.git
dest: /usr/local/src/pwnagotchi
- name: download torch whl
get_url:
url: "{{ packages.torch.url }}"
dest: /usr/local/src/
- name: download torchvision whl
get_url:
url: "{{ packages.torchvision.url }}"
dest: /usr/local/src/
- name: install 32-bit pwnagotchi wheel and dependencies with 32-bit torch wheels
pip:
name:
- "{{ packages.torch.url }}"
- "{{ packages.torchvision.url }}"
extra_args: "--no-cache-dir --break-system-packages"
- name: build pwnagotchi wheel
command: "pip install . --no-cache-dir --break-system-packages"
args:
chdir: /usr/local/src/pwnagotchi
environment:
ARCHFLAGS: "-arch armv6l"
- name: create /usr/local/share/pwnagotchi/ folder
file:

View File

@ -14,12 +14,12 @@ from pwnagotchi.automata import Automata
from pwnagotchi.log import LastSession
from pwnagotchi.bettercap import Client
from pwnagotchi.mesh.utils import AsyncAdvertiser
from pwnagotchi.ai.train import AsyncTrainer
# from pwnagotchi.ai.train import AsyncTrainer
RECOVERY_DATA_FILE = '/root/.pwnagotchi-recovery'
class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
class Agent(Client, Automata, AsyncAdvertiser):
def __init__(self, view, config, keypair):
Client.__init__(self, config['bettercap']['hostname'],
config['bettercap']['scheme'],
@ -28,7 +28,7 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
config['bettercap']['password'])
Automata.__init__(self, config, view)
AsyncAdvertiser.__init__(self, config, view, keypair)
AsyncTrainer.__init__(self, config)
# AsyncTrainer.__init__(self, config)
self._started_at = time.time()
self._filter = None if not config['main']['filter'] else re.compile(config['main']['filter'])
@ -129,7 +129,7 @@ class Agent(Client, Automata, AsyncAdvertiser, AsyncTrainer):
time.sleep(1)
def start(self):
self.start_ai()
# self.start_ai()
self._wait_bettercap()
self.setup_events()
self.set_starting()

View File

@ -3,7 +3,6 @@ main.lang = "en"
main.confd = "/etc/pwnagotchi/conf.d/"
main.custom_plugin_repos = [
"https://github.com/jayofelony/pwnagotchi-torch-plugins/archive/master.zip",
"https://github.com/evilsocket/pwnagotchi-plugins-contrib/archive/master.zip",
"https://github.com/tisboyo/pwnagotchi-pisugar2-plugin/archive/master.zip",
"https://github.com/nullm0ose/pwnagotchi-plugin-pisugar3/archive/master.zip",
"https://github.com/Sniffleupagus/pwnagotchi_plugins/archive/master.zip",

View File

@ -16,8 +16,8 @@ from pwnagotchi.ui.components import *
from pwnagotchi.ui.state import State
from pwnagotchi.voice import Voice
WHITE = 0x00
BLACK = 0xff
WHITE = 0xff
BLACK = 0x00
ROOT = None
@ -28,6 +28,14 @@ class View(object):
# setup faces from the configuration in case the user customized them
faces.load_from_config(config['ui']['faces'])
self._invert = config['ui']['invert']
if self._invert:
global WHITE
global BLACK
WHITE = 0x00
BLACK = 0xff
self._agent = None
self._render_cbs = []
self._config = config

View File

@ -18,10 +18,6 @@ scapy
shimmy; platform_machine!="armv6l"
smbus2
spidev
stable_baselines3; platform_machine!="armv6l"
stable_baselines3==1.8.0; platform_machine=="armv6l"
toml
torch==2.0.1
torchvision==0.15.2
tweepy
websockets