diff --git a/builder/data/etc/dhcpcd.conf b/builder/data/etc/dhcpcd.conf index 95c71a3a..ce889cb2 100644 --- a/builder/data/etc/dhcpcd.conf +++ b/builder/data/etc/dhcpcd.conf @@ -49,15 +49,11 @@ 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 -metric=203 interface bnep0 -metric=204 - -interface lo \ No newline at end of file +static domain_name_servers=8.8.8.8 1.1.1.1 \ No newline at end of file diff --git a/builder/orangepi.yml b/builder/orangepi.yml index 2df7b2d1..7200e786 100644 --- a/builder/orangepi.yml +++ b/builder/orangepi.yml @@ -23,11 +23,11 @@ - "g_ether" services: enable: - #- bettercap.service + - bettercap.service - dphys-swapfile.service - fstrim.timer - #- pwnagotchi.service - #- pwngrid-peer.service + - pwnagotchi.service + - pwngrid-peer.service disable: - apt-daily-upgrade.service - apt-daily-upgrade.timer @@ -36,7 +36,7 @@ - avahi-daemon.service - avahi-daemon.socket - bluetooth.service - #- ifup@wlan0.service + - ifup@wlan0.service - rpi-eeprom-update.service - triggerhappy.service - wpa_supplicant.service @@ -253,6 +253,37 @@ remote_src: yes mode: 0755 + # to always have the bettercap webui available (because why not?) + - name: copy pwnagotchi-manual over pwnagotchi-auto caplet + ansible.builtin.copy: + src: /usr/local/share/bettercap/caplets/pwnagotchi-manual.cap + dest: /usr/local/share/bettercap/caplets/pwnagotchi-auto.cap + force: true + ignore_errors: true + + - name: change hdmioff + lineinfile: + dest: /usr/bin/hdmioff + regexp: '^/opt/vc/' + line: "/usr/" + state: present + + - name: change hdmion + lineinfile: + dest: /usr/bin/hdmion + regexp: '^/opt/vc/' + line: "/usr/" + state: present + + - name: add HDMI powersave to rc.local + blockinfile: + path: /etc/rc.local + insertbefore: "exit 0" + block: | + if ! /usr/bin/tvservice -s | egrep 'HDMI|DVI'; then + /usr/bin/tvservice -o + fi + - name: create /etc/pwnagotchi folder file: path: /etc/pwnagotchi diff --git a/builder/pwnagotchi.json.pkr.hcl b/builder/pwnagotchi.json.pkr.hcl index d5fd6b2b..059892e4 100644 --- a/builder/pwnagotchi.json.pkr.hcl +++ b/builder/pwnagotchi.json.pkr.hcl @@ -107,13 +107,13 @@ build { provisioner "file" { destination = "/usr/bin/" sources = [ - "../builder/data/usr/bin/pwnlib", - "../builder/data/usr/bin/bettercap-launcher", - "../builder/data/usr/bin/pwnagotchi-launcher", - "../builder/data/usr/bin/monstop", - "../builder/data/usr/bin/monstart", - "../builder/data/usr/bin/hdmion", - "../builder/data/usr/bin/hdmioff", + "data/usr/bin/pwnlib", + "data/usr/bin/bettercap-launcher", + "data/usr/bin/pwnagotchi-launcher", + "data/usr/bin/monstop", + "data/usr/bin/monstart", + "data/usr/bin/hdmion", + "data/usr/bin/hdmioff", ] } provisioner "shell" { @@ -123,14 +123,14 @@ build { provisioner "file" { destination = "/etc/systemd/system/" sources = [ - "../builder/data/etc/systemd/system/pwngrid-peer.service", - "../builder/data/etc/systemd/system/pwnagotchi.service", - "../builder/data/etc/systemd/system/bettercap.service", + "data/etc/systemd/system/pwngrid-peer.service", + "data/etc/systemd/system/pwnagotchi.service", + "data/etc/systemd/system/bettercap.service", ] } provisioner "file" { destination = "/etc/update-motd.d/01-motd" - source = "../builder/data/etc/update-motd.d/01-motd" + source = "data/etc/update-motd.d/01-motd" } provisioner "shell" { inline = ["chmod +x /etc/update-motd.d/*"] @@ -141,7 +141,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_file = "../builder/raspberrypi64.yml" + playbook_file = "raspberrypi64.yml" } } @@ -151,13 +151,13 @@ build { provisioner "file" { destination = "/usr/bin/" sources = [ - "../builder/data/usr/bin/pwnlib", - "../builder/data/usr/bin/bettercap-launcher", - "../builder/data/usr/bin/pwnagotchi-launcher", - "../builder/data/usr/bin/monstop", - "../builder/data/usr/bin/monstart", - "../builder/data/usr/bin/hdmion", - "../builder/data/usr/bin/hdmioff", + "data/usr/bin/pwnlib", + "data/usr/bin/bettercap-launcher", + "data/usr/bin/pwnagotchi-launcher", + "data/usr/bin/monstop", + "data/usr/bin/monstart", + "data/usr/bin/hdmion", + "data/usr/bin/hdmioff", ] } provisioner "shell" { @@ -167,14 +167,14 @@ build { provisioner "file" { destination = "/etc/systemd/system/" sources = [ - "../builder/data/etc/systemd/system/pwngrid-peer.service", - "../builder/data/etc/systemd/system/pwnagotchi.service", - "../builder/data/etc/systemd/system/bettercap.service", + "data/etc/systemd/system/pwngrid-peer.service", + "data/etc/systemd/system/pwnagotchi.service", + "data/etc/systemd/system/bettercap.service", ] } provisioner "file" { destination = "/etc/update-motd.d/01-motd" - source = "../builder/data/etc/update-motd.d/01-motd" + source = "data/etc/update-motd.d/01-motd" } provisioner "shell" { inline = ["chmod +x /etc/update-motd.d/*"] @@ -185,8 +185,8 @@ 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/extras/" - playbook_file = "../builder/raspberrypi32.yml" + playbook_dir = "extras/" + playbook_file = "raspberrypi32.yml" } } @@ -197,13 +197,13 @@ build { provisioner "file" { destination = "/usr/bin/" sources = [ - "../builder/data/usr/bin/pwnlib", - "../builder/data/usr/bin/bettercap-launcher", - "../builder/data/usr/bin/pwnagotchi-launcher", - "../builder/data/usr/bin/monstop", - "../builder/data/usr/bin/monstart", - "../builder/data/usr/bin/hdmion", - "../builder/data/usr/bin/hdmioff", + "data/usr/bin/pwnlib", + "data/usr/bin/bettercap-launcher", + "data/usr/bin/pwnagotchi-launcher", + "data/usr/bin/monstop", + "data/usr/bin/monstart", + "data/usr/bin/hdmion", + "data/usr/bin/hdmioff", ] } provisioner "shell" { @@ -213,14 +213,14 @@ build { provisioner "file" { destination = "/etc/systemd/system/" sources = [ - "../builder/data/etc/systemd/system/pwngrid-peer.service", - "../builder/data/etc/systemd/system/pwnagotchi.service", - "../builder/data/etc/systemd/system/bettercap.service", + "data/etc/systemd/system/pwngrid-peer.service", + "data/etc/systemd/system/pwnagotchi.service", + "data/etc/systemd/system/bettercap.service", ] } provisioner "file" { destination = "/etc/update-motd.d/01-motd" - source = "../builder/data/etc/update-motd.d/01-motd" + source = "data/etc/update-motd.d/01-motd" } provisioner "shell" { inline = ["chmod +x /etc/update-motd.d/*"] @@ -231,6 +231,6 @@ 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_file = "../builder/orangepi.yml" + playbook_file = "orangepi.yml" } } \ No newline at end of file diff --git a/builder/raspberrypi32.yml b/builder/raspberrypi32.yml index 253321f3..a18912be 100644 --- a/builder/raspberrypi32.yml +++ b/builder/raspberrypi32.yml @@ -199,7 +199,7 @@ - xxd - zlib1g-dev environment: - #ARCHFLAGS: -arch armv6l + ARCHFLAGS: -arch armv6l #QEMU_CPU: arm1176 QEMU_UNAME: "{{ kernel.full }}" diff --git a/builder/raspberrypi64.yml b/builder/raspberrypi64.yml index 54c0581d..3b62b12b 100644 --- a/builder/raspberrypi64.yml +++ b/builder/raspberrypi64.yml @@ -465,14 +465,14 @@ dest: /boot/config.txt insertafter: EOF line: '{{ item }}' - with_items: "{{system.boot_options}}" + with_items: "{{ system.boot_options }}" - name: adjust /etc/modules lineinfile: dest: /etc/modules insertafter: EOF line: '{{ item }}' - with_items: "{{system.modules}}" + with_items: "{{ system.modules }}" - name: change root partition replace: