From f67b15190c6e5667617036a1c8343bce6f3b0420 Mon Sep 17 00:00:00 2001 From: Jeroen Oudshoorn Date: Fri, 3 Nov 2023 18:21:55 +0100 Subject: [PATCH] v2.5.1 Signed-off-by: Jeroen Oudshoorn --- Makefile | 2 +- builder/{ => extras}/build_install_gopkg.yml | 0 builder/{ => extras}/nexmon.yml | 0 builder/pwnagotchi.json | 117 ------------------- builder/pwnagotchi.json.pkr.hcl | 2 +- builder/raspberrypi32.yml | 6 +- 6 files changed, 5 insertions(+), 122 deletions(-) rename builder/{ => extras}/build_install_gopkg.yml (100%) rename builder/{ => extras}/nexmon.yml (100%) delete mode 100644 builder/pwnagotchi.json diff --git a/Makefile b/Makefile index 9c429e7a..fbe2a2f8 100644 --- a/Makefile +++ b/Makefile @@ -51,7 +51,7 @@ $(SDIST): setup.py pwnagotchi $(PWN_RELEASE).img: | $(PACKER) # If the packer or ansible files are updated, rebuild the image. -$(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json.pkr.hcl builder/raspberrypi32.yml builder/raspberrypi64.yml builder/orangepi.yml builder/build_install_gopkg.yml builder/nexmon.yml $(shell find builder/data -type f) +$(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json.pkr.hcl builder/raspberrypi32.yml builder/raspberrypi64.yml builder/orangepi.yml builder/extras/build_install_gopkg.yml builder/extras/nexmon.yml $(shell find builder/data -type f) # sudo $(PACKER) plugins install github.com/solo-io/arm-image # sudo $(PACKER) plugins install github.com/hashicorp/ansible diff --git a/builder/build_install_gopkg.yml b/builder/extras/build_install_gopkg.yml similarity index 100% rename from builder/build_install_gopkg.yml rename to builder/extras/build_install_gopkg.yml diff --git a/builder/nexmon.yml b/builder/extras/nexmon.yml similarity index 100% rename from builder/nexmon.yml rename to builder/extras/nexmon.yml diff --git a/builder/pwnagotchi.json b/builder/pwnagotchi.json deleted file mode 100644 index 3c3949e7..00000000 --- a/builder/pwnagotchi.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "builders": [ - { - "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", - "target_image_size": 8568709120, - "qemu_binary": "qemu-aarch64-static", - "output_filename": "../../pwnagotchi-{{user `pwn_version`}}-arm64.img", - "qemu_args": [ - "-r", "6.1.21-v8+" - ] - } - ], - "provisioners": [ - { - "type": "file", - "source": "../builder/data/usr/local/bin/bettercap", - "destination": "/usr/local/bin/bettercap" - }, - { - "type": "file", - "source": "../builder/data/usr/local/bin/pwngrid", - "destination": "/usr/local/bin/pwngrid" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/pwnlib", - "destination": "/usr/bin/pwnlib" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/bettercap-launcher", - "destination": "/usr/bin/bettercap-launcher" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/pwnagotchi-launcher", - "destination": "/usr/bin/pwnagotchi-launcher" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/monstop", - "destination": "/usr/bin/monstop" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/monstart", - "destination": "/usr/bin/monstart" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/hdmion", - "destination": "/usr/bin/hdmion" - }, - { - "type": "file", - "source": "../builder/data/usr/bin/hdmioff", - "destination": "/usr/bin/hdmioff" - }, - { - "type": "file", - "source": "../builder/data/etc/systemd/system/pwngrid-peer.service", - "destination": "/etc/systemd/system/pwngrid-peer.service" - }, - { - "type": "file", - "source": "../builder/data/etc/systemd/system/pwnagotchi.service", - "destination": "/etc/systemd/system/pwnagotchi.service" - }, - { - "type": "file", - "source": "../builder/data/etc/systemd/system/bettercap.service", - "destination": "/etc/systemd/system/bettercap.service" - }, - { - "type": "shell", - "inline": [ - "chmod +x /usr/bin/*" - ] - }, - { - "type": "shell", - "inline": [ - "chmod +x /usr/local/bin/*" - ] - }, - { - "type": "file", - "source": "../builder/data/etc/update-motd.d/01-motd", - "destination": "/etc/update-motd.d/01-motd" - }, - { - "type": "shell", - "inline": [ - "chmod +x /etc/update-motd.d/*" - ] - }, - { - "type": "shell", - "inline": [ - "apt-get -y --allow-releaseinfo-change update", - "apt-get -y dist-upgrade", - "apt-get install -y --no-install-recommends ansible" - ] - }, - { - "type": "ansible-local", - "playbook_file": "../builder/pwnagotchi.yml", - "extra_arguments": [ - "--extra-vars \"ansible_python_interpreter=/usr/bin/python3\"" - ], - "command": "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION={{user `pwn_version`}} PWN_HOSTNAME={{user `pwn_hostname`}} ansible-playbook" - } - ] -} diff --git a/builder/pwnagotchi.json.pkr.hcl b/builder/pwnagotchi.json.pkr.hcl index 639e296a..d5fd6b2b 100644 --- a/builder/pwnagotchi.json.pkr.hcl +++ b/builder/pwnagotchi.json.pkr.hcl @@ -185,7 +185,7 @@ build { provisioner "ansible-local" { command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION=${var.pwn_version} PWN_HOSTNAME=${var.pwn_hostname} ansible-playbook" extra_arguments = ["--extra-vars \"ansible_python_interpreter=/usr/bin/python3\""] - playbook_dir = "../builder/" + playbook_dir = "../builder/extras/" playbook_file = "../builder/raspberrypi32.yml" } } diff --git a/builder/raspberrypi32.yml b/builder/raspberrypi32.yml index 7c8d27e9..405dc336 100644 --- a/builder/raspberrypi32.yml +++ b/builder/raspberrypi32.yml @@ -293,7 +293,7 @@ # Install nexmon for all boards - name: build and install nexmon as needed - include_tasks: nexmon.yml + include_tasks: extras/nexmon.yml loop: "{{ boards }}" # some pizero2w have the pizeroW wifi chip @@ -382,7 +382,7 @@ - block: - name: install bettercap if missing when: not bettercap.stat.exists - include_tasks: build_install_gopkg.yml + include_tasks: extras/build_install_gopkg.yml vars: item: name: bettercap @@ -399,7 +399,7 @@ - block: - name: install pwngrid if missing when: not pwngrid.stat.exists - include_tasks: build_install_gopkg.yml + include_tasks: extras/build_install_gopkg.yml vars: item: name: pwngrid