mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
2
Makefile
2
Makefile
@ -51,7 +51,7 @@ $(SDIST): setup.py pwnagotchi
|
|||||||
$(PWN_RELEASE).img: | $(PACKER)
|
$(PWN_RELEASE).img: | $(PACKER)
|
||||||
|
|
||||||
# If the packer or ansible files are updated, rebuild the image.
|
# 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/solo-io/arm-image
|
||||||
# sudo $(PACKER) plugins install github.com/hashicorp/ansible
|
# sudo $(PACKER) plugins install github.com/hashicorp/ansible
|
||||||
|
@ -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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -185,7 +185,7 @@ build {
|
|||||||
provisioner "ansible-local" {
|
provisioner "ansible-local" {
|
||||||
command = "ANSIBLE_FORCE_COLOR=1 PYTHONUNBUFFERED=1 PWN_VERSION=${var.pwn_version} PWN_HOSTNAME=${var.pwn_hostname} ansible-playbook"
|
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\""]
|
extra_arguments = ["--extra-vars \"ansible_python_interpreter=/usr/bin/python3\""]
|
||||||
playbook_dir = "../builder/"
|
playbook_dir = "../builder/extras/"
|
||||||
playbook_file = "../builder/raspberrypi32.yml"
|
playbook_file = "../builder/raspberrypi32.yml"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@
|
|||||||
|
|
||||||
# Install nexmon for all boards
|
# Install nexmon for all boards
|
||||||
- name: build and install nexmon as needed
|
- name: build and install nexmon as needed
|
||||||
include_tasks: nexmon.yml
|
include_tasks: extras/nexmon.yml
|
||||||
loop: "{{ boards }}"
|
loop: "{{ boards }}"
|
||||||
|
|
||||||
# some pizero2w have the pizeroW wifi chip
|
# some pizero2w have the pizeroW wifi chip
|
||||||
@ -382,7 +382,7 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: install bettercap if missing
|
- name: install bettercap if missing
|
||||||
when: not bettercap.stat.exists
|
when: not bettercap.stat.exists
|
||||||
include_tasks: build_install_gopkg.yml
|
include_tasks: extras/build_install_gopkg.yml
|
||||||
vars:
|
vars:
|
||||||
item:
|
item:
|
||||||
name: bettercap
|
name: bettercap
|
||||||
@ -399,7 +399,7 @@
|
|||||||
- block:
|
- block:
|
||||||
- name: install pwngrid if missing
|
- name: install pwngrid if missing
|
||||||
when: not pwngrid.stat.exists
|
when: not pwngrid.stat.exists
|
||||||
include_tasks: build_install_gopkg.yml
|
include_tasks: extras/build_install_gopkg.yml
|
||||||
vars:
|
vars:
|
||||||
item:
|
item:
|
||||||
name: pwngrid
|
name: pwngrid
|
||||||
|
Reference in New Issue
Block a user