Version 2.9.2

Signed-off-by: jayofelony <oudshoorn.jeroen@gmail.com>
This commit is contained in:
jayofelony
2024-06-02 12:47:51 +02:00
parent 70f0dcb891
commit 8e99ae419d
17 changed files with 324 additions and 507 deletions

19
.idea/deployment.xml generated
View File

@ -1,23 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="PublishConfigData" serverName="pwnagotchi" filePermissions="493" folderPermissions="493" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false"> <component name="PublishConfigData" filePermissions="493" folderPermissions="493" remoteFilesAllowedToDisappearOnAutoupload="false" confirmBeforeUploading="false">
<option name="confirmBeforeUploading" value="false" /> <option name="confirmBeforeUploading" value="false" />
<serverData>
<paths name="pwnagotchi">
<serverdata>
<mappings>
<mapping deploy="/usr/local/lib/python3.11/dist-packages/pwnagotchi" local="$PROJECT_DIR$/pwnagotchi" web="/" />
<mapping deploy="/usr/local/bin" local="$PROJECT_DIR$/bin" />
<mapping local="" />
</mappings>
<excludedPaths>
<excludedPath local="true" path="$PROJECT_DIR$/venv" />
<excludedPath local="true" path="$PROJECT_DIR$/pwnagotchi.egg-info" />
<excludedPath local="true" path="$PROJECT_DIR$/dist" />
<excludedPath local="true" path="$PROJECT_DIR$/builder/packer-builder-arm" />
</excludedPaths>
</serverdata>
</paths>
</serverData>
</component> </component>
</project> </project>

View File

@ -1,4 +1,4 @@
PACKER_VERSION := 1.10.1 PACKER_VERSION := 1.11.0
PWN_HOSTNAME := pwnagotchi PWN_HOSTNAME := pwnagotchi
PWN_VERSION := $(shell cut -d"'" -f2 < pwnagotchi/_version.py) PWN_VERSION := $(shell cut -d"'" -f2 < pwnagotchi/_version.py)
@ -26,7 +26,7 @@ UNSHARE := $(UNSHARE) --uts
endif endif
# sudo apt-get install qemu-user-static qemu-utils # sudo apt-get install qemu-user-static qemu-utils
all: clean packer image all: packer image
update_langs: update_langs:
@for lang in pwnagotchi/locale/*/; do\ @for lang in pwnagotchi/locale/*/; do\
@ -40,22 +40,23 @@ compile_langs:
./scripts/language.sh compile $$(basename $$lang); \ ./scripts/language.sh compile $$(basename $$lang); \
done done
packer: clean packer:
curl https://releases.hashicorp.com/packer/$(PACKER_VERSION)/packer_$(PACKER_VERSION)_linux_amd64.zip -o /tmp/packer.zip curl https://releases.hashicorp.com/packer/$(PACKER_VERSION)/packer_$(PACKER_VERSION)_linux_amd64.zip -o /tmp/packer.zip
unzip /tmp/packer.zip -d /tmp unzip -o /tmp/packer.zip -d /tmp
sudo mv /tmp/packer /usr/bin/packer sudo mv /tmp/packer /usr/bin/packer
image: clean packer image: packer
export LC_ALL=en_GB.UTF-8 export LC_ALL=en_GB.UTF-8
cd builder && sudo /usr/bin/packer init combined.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" combined.json.pkr.hcl cd builder && sudo /usr/bin/packer init combined.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" combined.json.pkr.hcl
bullseye: clean packer 32bit: packer
export LC_ALL=en_GB.UTF-8 export LC_ALL=en_GB.UTF-8
cd builder && sudo /usr/bin/packer init raspberrypi32.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" raspberrypi32.json.pkr.hcl cd builder && sudo /usr/bin/packer init raspberrypi32.json.pkr.hcl && QEMU_CPU=arm1176 sudo -E $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" raspberrypi32.json.pkr.hcl
bookworm: clean packer 64bit: packer
export LC_ALL=en_GB.UTF-8 export LC_ALL=en_GB.UTF-8
cd builder && sudo /usr/bin/packer init raspberrypi64.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" raspberrypi64.json.pkr.hcl cd builder && sudo /usr/bin/packer init raspberrypi64.json.pkr.hcl && sudo $(UNSHARE) /usr/bin/packer build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" raspberrypi64.json.pkr.hcl
clean: clean:
- rm -rf /tmp/packer* - rm -rf /tmp/packer*
- rm -rf /tmp/LICENSE.txt

View File

@ -25,7 +25,7 @@ source "arm" "rpi64-pwnagotchi" {
file_checksum_type = "sha256" file_checksum_type = "sha256"
file_target_extension = "xz" file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"] file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../pwnagotchi-64bit.img" image_path = "../../../pwnagotchi-64bit.img"
qemu_binary_source_path = "/usr/libexec/qemu-binfmt/aarch64-binfmt-P" qemu_binary_source_path = "/usr/libexec/qemu-binfmt/aarch64-binfmt-P"
qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/aarch64-binfmt-P" qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/aarch64-binfmt-P"
image_build_method = "resize" image_build_method = "resize"
@ -50,12 +50,12 @@ source "arm" "rpi64-pwnagotchi" {
} }
source "arm" "rpi32-pwnagotchi" { source "arm" "rpi32-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2024-03-12/2024-03-12-raspios-bullseye-armhf-lite.img.xz.sha256" file_checksum_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2024-03-12/2024-03-12-raspios-bullseye-armhf-lite.img.xz"] file_urls = ["https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz"]
file_checksum_type = "sha256" file_checksum_type = "sha256"
file_target_extension = "xz" file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"] file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../pwnagotchi-32bit.img" image_path = "../../../pwnagotchi-32bit.img"
qemu_binary_source_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P" qemu_binary_source_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P"
qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P" qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P"
image_build_method = "resize" image_build_method = "resize"
@ -67,7 +67,7 @@ source "arm" "rpi32-pwnagotchi" {
start_sector = "8192" start_sector = "8192"
filesystem = "fat" filesystem = "fat"
size = "256M" size = "256M"
mountpoint = "/boot" mountpoint = "/boot/firmware"
} }
image_partitions { image_partitions {
name = "root" name = "root"
@ -101,6 +101,13 @@ build {
provisioner "shell" { provisioner "shell" {
inline = ["chmod +x /usr/bin/*"] inline = ["chmod +x /usr/bin/*"]
} }
provisioner "shell" {
inline = ["mkdir -p /usr/local/src/pwnagotchi"]
}
provisioner "file" {
destination = "/usr/local/src/pwnagotchi/"
source = "../"
}
provisioner "file" { provisioner "file" {
destination = "/etc/systemd/system/" destination = "/etc/systemd/system/"
@ -142,10 +149,16 @@ build {
"data/32bit/usr/bin/pwnlib", "data/32bit/usr/bin/pwnlib",
] ]
} }
provisioner "shell" {
inline = ["mkdir -p /usr/local/src/pwnagotchi"]
}
provisioner "file" {
destination = "/usr/local/src/pwnagotchi/"
source = "../"
}
provisioner "shell" { provisioner "shell" {
inline = ["chmod +x /usr/bin/*"] inline = ["chmod +x /usr/bin/*"]
} }
provisioner "file" { provisioner "file" {
destination = "/etc/systemd/system/" destination = "/etc/systemd/system/"
sources = [ sources = [
@ -167,7 +180,6 @@ 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 = "extras/"
playbook_file = "raspberrypi32.yml" playbook_file = "raspberrypi32.yml"
} }
} }

View File

@ -0,0 +1,5 @@
[main]
plugins=keyfile,ifupdown
[ifupdown]
managed=true

View File

@ -1,62 +0,0 @@
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
# Some non-RFC compliant DHCP servers do not reply with this set.
# In this case, comment out duid and enable clientid above.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Respect the network MTU. This is applied to DHCP routes.
option interface_mtu
# Most distributions have NTP support.
#option ntp_servers
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate SLAAC address using the Hardware Address of the interface
#slaac hwaddr
# OR generate Stable Private IPv6 Addresses based from the DUID
slaac private
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# !! DO NOT EDIT THESE LINES BELOW PLEASE !!
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# static IP configuration:
denyinterfaces wlan0
interface eth0
static domain_name_servers=8.8.8.8 1.1.1.1
metric 201
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 202
interface bnep0
static domain_name_servers=8.8.8.8 1.1.1.1
metric 203

View File

@ -0,0 +1,2 @@
allow-hotplug eth0
iface eth0 inet dhcp

View File

@ -0,0 +1,2 @@
auto lo
iface lo inet loopback

View File

@ -0,0 +1,8 @@
allow-hotplug usb0
iface usb0 inet static
address 10.0.0.2
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1
metric 101

View File

@ -0,0 +1,2 @@
allow-hotplug wlan0
iface wlan0 inet static

View File

@ -1,40 +0,0 @@
# Install nexmon to fix wireless scanning (takes 2.5G of space)
- name: clone nexmon repository
git:
repo: https://github.com/DrSchottky/nexmon.git
dest: /usr/local/src/nexmon
- name: make firmware
shell: "source ./setup_env.sh && make"
args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
- name: "make firmware patch ({{ item.name }})"
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/{{ item.patch }}/nexmon/ && make"
args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ item.kernel }}"
ARCHFLAGS: "{{ item.arch_flags }}"
- name: "install new firmware ({{ item.name }})"
copy:
src: "/usr/local/src/nexmon/patches/{{ item.patch }}/nexmon/{{ item.firmware }}"
dest: "/usr/lib/firmware/brcm/{{ item.firmware }}"
follow: true
environment:
QEMU_UNAME: "{{ item.kernel }}"
ARCHFLAGS: "{{ item.arch_flags }}"
- name: backup original driver
command: "mv /usr/lib/modules/{{ item.kernel }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ item.kernel }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig"
- name: copy modified driver
copy:
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_6.1.y-nexmon/brcmfmac.ko"
dest: "/usr/lib/modules/{{ item.kernel }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
- name : load brcmfmac drivers
command: "/sbin/depmod -a {{ item.kernel }}"

View File

@ -1,8 +1,8 @@
packer { packer {
required_plugins { required_plugins {
arm = { arm = {
version = "1.0.0" version = ">=1.0.0"
source = "github.com/cdecoux/builder-arm" source = "github.com/michalfita/cross"
} }
ansible = { ansible = {
source = "github.com/hashicorp/ansible" source = "github.com/hashicorp/ansible"
@ -20,12 +20,12 @@ variable "pwn_version" {
} }
source "arm" "rpi32-pwnagotchi" { source "arm" "rpi32-pwnagotchi" {
file_checksum_url = "https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2024-03-12/2024-03-12-raspios-bullseye-armhf-lite.img.xz.sha256" file_checksum_url = "https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz.sha256"
file_urls = ["https://downloads.raspberrypi.com/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2024-03-12/2024-03-12-raspios-bullseye-armhf-lite.img.xz"] file_urls = ["https://downloads.raspberrypi.com/raspios_lite_armhf/images/raspios_lite_armhf-2024-03-15/2024-03-15-raspios-bookworm-armhf-lite.img.xz"]
file_checksum_type = "sha256" file_checksum_type = "sha256"
file_target_extension = "xz" file_target_extension = "xz"
file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"] file_unarchive_cmd = ["unxz", "$ARCHIVE_PATH"]
image_path = "../../pwnagotchi-32bit.img" image_path = "../../../pwnagotchi-32bit.img"
qemu_binary_source_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P" qemu_binary_source_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P"
qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P" qemu_binary_destination_path = "/usr/libexec/qemu-binfmt/arm-binfmt-P"
image_build_method = "resize" image_build_method = "resize"
@ -37,7 +37,7 @@ source "arm" "rpi32-pwnagotchi" {
start_sector = "8192" start_sector = "8192"
filesystem = "fat" filesystem = "fat"
size = "256M" size = "256M"
mountpoint = "/boot" mountpoint = "/boot/firmware"
} }
image_partitions { image_partitions {
name = "root" name = "root"
@ -51,6 +51,9 @@ source "arm" "rpi32-pwnagotchi" {
build { build {
name = "Raspberry Pi 32 Pwnagotchi" name = "Raspberry Pi 32 Pwnagotchi"
sources = ["source.arm.rpi32-pwnagotchi"] sources = ["source.arm.rpi32-pwnagotchi"]
provisioner "shell" {
inline = ["uname -m"]
}
provisioner "file" { provisioner "file" {
destination = "/usr/bin/" destination = "/usr/bin/"
sources = [ sources = [
@ -66,7 +69,13 @@ build {
provisioner "shell" { provisioner "shell" {
inline = ["chmod +x /usr/bin/*"] inline = ["chmod +x /usr/bin/*"]
} }
provisioner "shell" {
inline = ["mkdir -p /usr/local/src/pwnagotchi"]
}
provisioner "file" {
destination = "/usr/local/src/pwnagotchi/"
source = "../"
}
provisioner "file" { provisioner "file" {
destination = "/etc/systemd/system/" destination = "/etc/systemd/system/"
sources = [ sources = [
@ -88,7 +97,6 @@ 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 = "extras/"
playbook_file = "raspberrypi32.yml" playbook_file = "raspberrypi32.yml"
} }
} }

View File

@ -4,46 +4,15 @@
gather_facts: true gather_facts: true
become: true become: true
vars: vars:
boards:
- {
kernel: "6.1.21+",
name: "PiZeroW",
firmware: "brcmfmac43430-sdio.bin",
patch: "bcm43430a1/7_45_41_46",
cpu: arm1176,
arch_flags: "-arch armv6l"
}
- {
kernel: "6.1.21-v7+",
name: "PiZero2W",
firmware: "brcmfmac43436-sdio.bin",
patch: "bcm43436b0/9_88_4_65",
cpu: any, #cortex-a53
arch_flags: "-arch armv7l"
}
- {
kernel: "6.1.21-v7l+",
name: "Pi4b_32",
firmware: "brcmfmac43455-sdio.bin",
patch: "bcm43455c0/7_45_206",
cpu: any, #cortex-a72
arch_flags: "-arch armv7l"
}
kernel: kernel:
min: "6.1" min: "6.6"
full: "6.1.21+" full: "6.6.31+rpt-rpi-v6"
full_2w: "6.1.21-v7+"
full_4b: "6.1.21-v7l+"
arch: "v6l"
pwnagotchi: pwnagotchi:
hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}" hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}"
version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi-torch', true) }}" version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi', true) }}"
custom_plugin_dir: "/usr/local/share/pwnagotchi/custom-plugins"
services: services:
enable: enable:
- bettercap.service - bettercap.service
- bluetooth.service
- dphys-swapfile.service
- fstrim.timer - fstrim.timer
- pwnagotchi.service - pwnagotchi.service
- pwngrid-peer.service - pwngrid-peer.service
@ -52,25 +21,23 @@
- apt-daily-upgrade.timer - apt-daily-upgrade.timer
- apt-daily.service - apt-daily.service
- apt-daily.timer - apt-daily.timer
- bluetooth.service
- ifup@wlan0.service - ifup@wlan0.service
- triggerhappy.service
- wpa_supplicant.service
packages: packages:
caplets: caplets:
source: "https://github.com/jayofelony/caplets.git" source: "https://github.com/jayofelony/caplets.git"
bettercap: bettercap:
source: "https://github.com/jayofelony/bettercap.git" source: "https://github.com/jayofelony/bettercap.git"
url: "https://github.com/jayofelony/bettercap/releases/download/2.32.2/bettercap-2.32.2-armhf.zip"
ui: "https://github.com/bettercap/ui/releases/download/v1.3.0/ui.zip" ui: "https://github.com/bettercap/ui/releases/download/v1.3.0/ui.zip"
pwngrid: pwngrid:
source: "https://github.com/jayofelony/pwngrid.git" source: "https://github.com/jayofelony/pwngrid.git"
url: "https://github.com/jayofelony/pwngrid/releases/download/v1.10.7/pwngrid-1.10.7-armhf.zip" url: "https://github.com/jayofelony/pwngrid/releases/download/v1.10.7/pwngrid-1.10.7-armhf.zip"
torch: torch:
wheel: "torch-2.1.0a0+gitunknown-cp39-cp39-linux_armv6l.whl" wheel: "torch-2.1.0a0+gita8e7c98-cp311-cp311-linux_armv6ll.whl"
url: "https://github.com/Sniffleupagus/Torch4Pizero/releases/download/v1.0.0/torch-2.1.0a0+gitunknown-cp39-cp39-linux_armv6l.whl" url: "https://github.com/Sniffleupagus/Torch4Pizero/releases/download/py0torch-bookworm-2024-05/torch-2.1.0a0+gita8e7c98-cp311-cp311-linux_armv6l.whl"
torchvision: torchvision:
wheel: "torchvision-0.16.0a0-cp39-cp39-linux_armv6l.whl" wheel: "torchvision-0.16.0+fbb4cc5-cp311-cp311-linux_armv6ll.whl"
url: "https://github.com/Sniffleupagus/Torch4Pizero/releases/download/v1.0.0/torchvision-0.16.0a0-cp39-cp39-linux_armv6l.whl" url: "https://github.com/Sniffleupagus/Torch4Pizero/releases/download/py0torch-bookworm-2024-05/torchvision-0.16.0+fbb4cc5-cp311-cp311-linux_armv6l.whl"
apt: apt:
downgrade: downgrade:
- libpcap-dev_1.9.1-4_armhf.deb - libpcap-dev_1.9.1-4_armhf.deb
@ -85,111 +52,142 @@
- firmware-realtek - firmware-realtek
- libpcap-dev - libpcap-dev
- libpcap0.8 - libpcap0.8
- libpcap0.8-dev
- libpcap0.8-dbg - libpcap0.8-dbg
- libpcap0.8-dev
remove: remove:
- avahi-daemon - avahi-daemon
- nfs-common - nfs-common
- triggerhappy - triggerhappy
- wpasupplicant - wpasupplicant
install: install:
- aircrack-ng
- autoconf - autoconf
- bc
- bison - bison
- bluez - bluez
- bluez-tools - bluez-tools
- build-essential - build-essential
- curl - curl
- dkms
- dphys-swapfile - dphys-swapfile
- espeak-ng
- evtest
- fbi - fbi
- firmware-atheros
- firmware-brcm80211
- firmware-libertas
- firmware-misc-nonfree
- firmware-realtek
- flex - flex
- fonts-dejavu
- fonts-dejavu-core
- fonts-dejavu-extra
- fonts-freefont-ttf
- g++ - g++
- gawk - gawk
- gcc-arm-none-eabi - gcc-arm-none-eabi
- git - git
- libatlas-base-dev - libatlas-base-dev
- libavcodec58
- libavformat58
- libblas-dev
- libbluetooth-dev
- libbz2-dev
- libc-ares-dev
- libc6-dev - libc6-dev
- libcpuinfo-dev - libcurl-ocaml-dev
- libcurl4-openssl-dev
- libdbus-1-dev - libdbus-1-dev
- libdbus-glib-1-dev - libdbus-glib-1-dev
- libeigen3-dev
- libelf-dev
- libffi-dev
- libfl-dev - libfl-dev
- libfuse-dev
- libgdbm-dev
- libgl1-mesa-glx
- libgmp3-dev - libgmp3-dev
- libgstreamer1.0-0
- libhdf5-dev
- liblapack-dev
- libncursesw5-dev
- libnetfilter-queue-dev - libnetfilter-queue-dev
- libopenblas-dev
- libopenjp2-7 - libopenjp2-7
- libopenmpi-dev
- libopenmpi3
- libpcap-dev - libpcap-dev
- libprotobuf-dev
- libraspberrypi-bin - libraspberrypi-bin
- libraspberrypi-dev - libraspberrypi-dev
- libraspberrypi-doc - libraspberrypi-doc
- libraspberrypi0 - libraspberrypi0
- libsleef-dev
- libsqlite3-dev
- libssl-dev - libssl-dev
- libssl-ocaml-dev - libssl-ocaml-dev
- libswscale5
- libtiff5
- libtool - libtool
- libts-bin
- libusb-1.0-0-dev - libusb-1.0-0-dev
- lsof
- make - make
- ntp - ntp
- python3-dbus - pkg-config
- python3-flask - python3-dev
- python3-flask-cors
- python3-flaskext.wtf
- python3-pil
- python3-pip - python3-pip
- python3-protobuf - python3-setuptools
- python3-smbus
- qpdf - qpdf
- raspberrypi-kernel-headers - raspberrypi-kernel-headers
- rsync - rsync
- screen
- tcpdump - tcpdump
- texinfo - texinfo
- time
- tk-dev
- unzip - unzip
- vim
- wget - wget
- wl - wl
- xxd - xxd
- zlib1g-dev - zlib1g-dev
environment:
ARCHFLAGS: "-arch armv6l"
tasks: tasks:
# First we install packages
- name: install packages
apt:
name: "{{ packages.apt.install }}"
state: latest
update_cache: yes
install_recommends: no
- name: update pip3, setuptools, wheel
shell: "python3 -m pip install --upgrade pip setuptools wheel --break-system-packages"
args:
executable: /bin/bash
chdir: /usr/local/src
- name: install 32bit torch
shell: "python3 -m pip install {{ packages.torch.url }} {{ packages.torchvision.url }} --break-system-packages"
args:
executable: /bin/bash
environment:
QEMU_UNAME: "{{ kernel.full }}"
ARCHFLAGS: "-arch armv6l"
# Now we set up /boot/firmware
- name: Create pi user - name: Create pi user
copy: copy:
dest: /boot/userconf dest: /boot/firmware/userconf
content: | content: |
pi:$6$3jNr0GA9KIyt4hmM$efeVIopdMQ8DGgEPCWWlbx3mJJNAYci1lEXGdlky0xPyjqwKNbwTL5SrCcpb4144C4IvzWjn7Iv.QjqmU7iyT/ pi:$5$733Efsksay$SEFUKemv8FaNAu6X4GUfxdSzSDh6PbpOcdtNe5b7Nt0
- name: enable ssh on boot
file:
path: /boot/firmware/ssh
state: touch
- name: remove current rc.local
file:
path: /etc/rc.local
state: absent
- name: change root partition
replace:
dest: /boot/firmware/cmdline.txt
backup: no
regexp: "root=PARTUUID=[a-zA-Z0-9\\-]+"
replace: "root=/dev/mmcblk0p2"
- name: configure /boot/firmware/cmdline.txt
lineinfile:
path: /boot/firmware/cmdline.txt
backrefs: True
state: present
backup: no
regexp: '(.*)$'
line: '\1 modules-load=dwc2,g_ether'
- name: setup /boot/firmware/config.txt
blockinfile:
path: /boot/firmware/config.txt
insertafter: EOF
block: |
dtparam=i2c1=on
dtparam=i2c_arm=on
dtparam=spi=on
gpu_mem=1
dtoverlay=dwc2
#dtoverlay=disable-wifi
enable_uart=1
[pi0]
dtoverlay=spi0-0cs
#dtoverlay=disable-wifi
- name: change hostname - name: change hostname
lineinfile: lineinfile:
@ -208,55 +206,14 @@
state: present state: present
when: hostname.changed when: hostname.changed
- name: setup /boot/config.txt # Now we disable sap and a2dp, we don't use them on rpi
blockinfile: - name: disable sap plugin for bluetooth.service
path: /boot/config.txt lineinfile:
insertafter: EOF dest: /lib/systemd/system/bluetooth.service
block: | regexp: '^ExecStart=/usr/libexec/bluetooth/bluetoothd$'
dtparam=i2c1=on line: 'ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=sap,a2dp'
dtparam=i2c_arm=on
dtparam=spi=on
gpu_mem=1
dtoverlay=dwc2
#dtoverlay=disable-wifi
[pi0]
dtoverlay=spi0-0cs
#dtoverlay=disable-wifi
[pi3]
dtoverlay=spi0-0cs
#dtoverlay=disable-wifi
[pi4]
dtoverlay=spi0-0cs
#dtoverlay=disable-wifi
- name: Create custom plugin directory
file:
path: '{{ pwnagotchi.custom_plugin_dir }}'
state: directory
- name: remove current rc.local
file:
path: /etc/rc.local
state: absent
- name: update apt package cache
apt:
update_cache: yes
- name: install packages
apt:
name: "{{ packages.apt.install }}"
state: present state: present
- name: update pip3, setuptools, wheel
shell: "python3 -m pip install --upgrade pip setuptools wheel"
args:
executable: /bin/bash
chdir: /usr/local/src
########################################### ###########################################
# #
# libpcap v1.9 - build from source # libpcap v1.9 - build from source
@ -291,34 +248,60 @@
state: link state: link
# install latest hcxtools # install latest hcxtools
- name: clone hcxtools
git:
repo: https://github.com/ZerBea/hcxtools.git
dest: /usr/local/src/hcxtools
#- name: clone hcxtools - name: install hcxtools
# git: shell: "make && make install"
# repo: https://github.com/ZerBea/hcxtools.git args:
# dest: /usr/local/src/hcxtools executable: /bin/bash
chdir: /usr/local/src/hcxtools
#- name: install hcxtools - name: remove hcxtools directory
# shell: "make && make install" file:
# args: state: absent
# executable: /bin/bash path: /usr/local/src/hcxtools
# chdir: /usr/local/src/hcxtools
#- name: remove hcxtools directory # Installing nexmon
# file: - name: clone nexmon repository
# state: absent git:
# path: /usr/local/src/hcxtools repo: https://github.com/DrSchottky/nexmon.git
dest: /usr/local/src/nexmon
############################################################### - name: make firmware
# Install nexmon to fix wireless scanning (takes 2.5G of space) shell: "source ./setup_env.sh && make"
############################################################### args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ kernel.full }}"
ARCHFLAGS: "-arch armv6l"
# Install nexmon for all boards - name: make firmware patch (bcm43430a1)
- name: build and install nexmon as needed shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make"
include_tasks: nexmon.yml args:
loop: "{{ boards }}" executable: /bin/bash
chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ kernel.full }}"
ARCHFLAGS: "-arch armv6l"
- name: install new firmware (bcm43430a1)
copy:
src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin
dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
follow: true
- name: copy modified driver
copy:
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
environment:
QEMU_UNAME: "{{ kernel.full }}"
ARCHFLAGS: "-arch armv6l"
# some pizero2w have the pizeroW wifi chip
# could this be a link instead of a copy? and force, only if not a link?
- name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2 - name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2
copy: copy:
src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
@ -333,9 +316,19 @@
loop: loop:
- /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob - /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob - /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43436-sdio.raspberrypi,model-zero-2-w.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob - /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43430b0-sdio.raspberrypi,model-zero-2-w.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43436-sdio.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43436-sdio.raspberrypi,model-zero-2-w.clm_blob
- /usr/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob
- name: backup original driver
command: "mv /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig"
- name: load brcmfmac drivers
command: "/sbin/depmod {{ kernel.full }}"
environment:
QEMU_UNAME: "{{ kernel.full }}"
# To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation # To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation
- name: Delete nexmon content & directory - name: Delete nexmon content & directory
@ -343,58 +336,36 @@
state: absent state: absent
path: /usr/local/src/nexmon/ path: /usr/local/src/nexmon/
- name: clone pwnagotchi repository - name: Create custom config directory
git: file:
repo: https://github.com/jayofelony/pwnagotchi.git path: /etc/pwnagotchi/conf.d/
dest: /usr/local/src/pwnagotchi state: directory
register: pwnagotchigit
#- name: clone pwnagotchi repository
# git:
# repo: https://github.com/jayofelony/pwnagotchi.git
# dest: /usr/local/src/pwnagotchi
# is this even necessary? Can't we just link from /home/pi/pwnagotchi to /usr/local/{bin,lib,etc}
# then just git update in the home dir and encourage hacking?
# make owned by pi.pi, and custom plugins.
- name: build pwnagotchi wheel - name: build pwnagotchi wheel
command: "python3 setup.py sdist bdist_wheel" command: "pip3 install . --no-cache-dir --break-system-packages"
args: args:
chdir: /usr/local/src/pwnagotchi chdir: /usr/local/src/pwnagotchi
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
- 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:
- "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
- "{{ packages.torch.url }}"
- "{{ packages.torchvision.url }}"
extra_args: "--no-cache-dir"
environment:
QEMU_CPU: arm1176
QEMU_UNAME: "{{ kernel.full }}"
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
- name: create /usr/local/share/pwnagotchi/ folder - name: create /usr/local/share/pwnagotchi/ folder
file: file:
path: /usr/local/share/pwnagotchi/ path: /usr/local/share/pwnagotchi/
state: directory state: directory
- name: Create custom plugin directory
file:
path: /usr/local/share/pwnagotchi/custom-plugins/
state: directory
- name: remove pwnagotchi folder - name: remove pwnagotchi folder
file: file:
state: absent state: absent
path: /usr/local/src/pwnagotchi path: /usr/local/src/pwnagotchi
- name: remove torch whl
file:
state: absent
path: "{{ lookup('fileglob', '/usr/local/src/torch*.whl') }}"
########################################## ##########################################
# #
# pwngrid, bettercap # pwngrid, bettercap
@ -403,14 +374,14 @@
- name: Install go-1.21 - name: Install go-1.21
unarchive: unarchive:
src: https://go.dev/dl/go1.21.6.linux-armv6l.tar.gz src: https://go.dev/dl/go1.22.3.linux-armv6l.tar.gz
dest: /usr/local dest: /usr/local
remote_src: yes remote_src: yes
register: golang register: golang
- name: Update .bashrc for go-1.21 - name: Update .bashrc for go-1.21
blockinfile: blockinfile:
dest: /home/pi/.bashrc dest: /etc/profile
state: present state: present
block: | block: |
export GOPATH=$HOME/go export GOPATH=$HOME/go
@ -449,6 +420,16 @@
state: absent state: absent
path: /usr/local/src/bettercap path: /usr/local/src/bettercap
#- name: download and install bettercap
# unarchive:
# src: "{{ packages.bettercap.url }}"
# dest: /usr/local/bin
# remote_src: yes
# exclude:
# - README.md
# - LICENSE.md
# mode: 0755
- name: clone bettercap caplets - name: clone bettercap caplets
git: git:
repo: "{{ packages.caplets.source }}" repo: "{{ packages.caplets.source }}"
@ -481,11 +462,6 @@
path: /etc/pwnagotchi path: /etc/pwnagotchi
state: directory state: directory
- name: create log folder
file:
path: /home/pi/logs
state: directory
- name: check if user configuration exists - name: check if user configuration exists
stat: stat:
path: /etc/pwnagotchi/config.toml path: /etc/pwnagotchi/config.toml
@ -501,32 +477,16 @@
# ui.display.type = "waveshare_4" # ui.display.type = "waveshare_4"
when: not user_config.stat.exists when: not user_config.stat.exists
- name: Delete motd
file:
state: absent
path: /etc/motd
- name: Delete motd 10-uname - name: Delete motd 10-uname
file: file:
state: absent state: absent
path: /etc/update-motd.d/10-uname path: /etc/update-motd.d/10-uname
- name: enable ssh on boot
file:
path: /boot/ssh
state: touch
- name: change root partition
replace:
dest: /boot/cmdline.txt
backup: no
regexp: "root=PARTUUID=[a-zA-Z0-9\\-]+"
replace: "root=/dev/mmcblk0p2"
- name: configure /boot/cmdline.txt
lineinfile:
path: /boot/cmdline.txt
backrefs: True
state: present
backup: no
regexp: '(.*)$'
line: '\1 modules-load=dwc2,g_ether'
- name: add firmware packages to hold - name: add firmware packages to hold
dpkg_selections: dpkg_selections:
name: "{{ item }}" name: "{{ item }}"
@ -546,16 +506,7 @@
enabled: true enabled: true
state: stopped state: stopped
with_items: "{{ services.enable }}" with_items: "{{ services.enable }}"
register: enabled
#- name: remove golang build libraries
# file:
# state: absent
# path: /root/go
#- name: remove golang
# file:
# state: absent
# path: /usr/local/go
- name: make /root readable, becauase that's where all the files are - name: make /root readable, becauase that's where all the files are
file: file:
@ -569,39 +520,25 @@
group: pi group: pi
recurse: true recurse: true
- name: remove unnecessary apt packages
apt:
name: "{{ packages.apt.remove }}"
state: absent
purge: yes
- name: remove dependencies that are no longer required
apt:
autoremove: yes
- name: clean apt cache
apt:
autoclean: true
- name: remove golang build libraries
file:
state: absent
path: /root/go
- name: remove pre-collected packages zip - name: remove pre-collected packages zip
file: file:
path: /root/go_pkgs.tgz path: /root/go_pkgs.tgz
state: absent state: absent
- name: remove golang - name: remove /root/go folder
file:
state: absent
path: /root/go
- name: remove /usr/local/go folder
file: file:
state: absent state: absent
path: /usr/local/go path: /usr/local/go
- name: remove /root/.cache (pip cache) - name: remove pip cache
file: file:
state: absent state: absent
path: /root/.cache path: /root/.cache/pip
- name: remove ssh keys - name: remove ssh keys
file: file:
@ -615,7 +552,26 @@
args: args:
executable: /bin/bash executable: /bin/bash
# Now we remove packages
- name: remove unnecessary apt packages
apt:
name: "{{ packages.apt.remove }}"
state: absent
purge: yes
register: removed
- name: remove dependencies that are no longer required
apt:
autoremove: yes
when: removed.changed
- name: clean apt cache
apt:
autoclean: true
when: removed.changed
handlers: handlers:
- name: reload systemd services - name: reload systemd services
systemd: systemd:
daemon_reload: yes daemon_reload: yes
when: enabled.changed

View File

@ -73,7 +73,13 @@ build {
provisioner "shell" { provisioner "shell" {
inline = ["chmod +x /usr/bin/*"] inline = ["chmod +x /usr/bin/*"]
} }
provisioner "shell" {
inline = ["mkdir -p /usr/local/src/pwnagotchi"]
}
provisioner "file" {
destination = "/usr/local/src/pwnagotchi/"
source = "../"
}
provisioner "file" { provisioner "file" {
destination = "/etc/systemd/system/" destination = "/etc/systemd/system/"
sources = [ sources = [

View File

@ -6,8 +6,8 @@
vars: vars:
kernel: kernel:
min: "6.6" min: "6.6"
full: "6.6.20+rpt-rpi-v8" full: "6.6.31+rpt-rpi-v8"
full_pi5: "6.6.20+rpt-rpi-2712" full_pi5: "6.6.31+rpt-rpi-2712"
pwnagotchi: pwnagotchi:
hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}" hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}"
version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi', true) }}" version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi', true) }}"
@ -53,21 +53,17 @@
remove: remove:
- avahi-daemon - avahi-daemon
- dhpys-swapfile - dhpys-swapfile
- libcurl-ocaml-dev
- libssl-ocaml-dev
- nfs-common - nfs-common
- triggerhappy - triggerhappy
- wpasupplicant - wpasupplicant
install: install:
- aircrack-ng - aircrack-ng
- autoconf - autoconf
- bc
- bison - bison
- bluez - bluez
- bluez-tools - bluez-tools
- build-essential - build-essential
- curl - curl
- dkms
- dphys-swapfile - dphys-swapfile
- fbi - fbi
- firmware-atheros - firmware-atheros
@ -76,86 +72,38 @@
- firmware-misc-nonfree - firmware-misc-nonfree
- firmware-realtek - firmware-realtek
- flex - flex
- fonts-dejavu
- fonts-dejavu-core
- fonts-dejavu-extra
- fonts-freefont-ttf
- g++ - g++
- gawk - gawk
- gcc-arm-none-eabi - gcc-arm-none-eabi
- git - git
- hcxtools
- libatlas-base-dev
- libavcodec59
- libavformat59
- libblas-dev
- libbluetooth-dev
- libbz2-dev
- libc-ares-dev
- libc6-dev - libc6-dev
- libcap-dev
- libcurl-ocaml-dev - libcurl-ocaml-dev
- libdbus-1-dev - libdbus-1-dev
- libdbus-glib-1-dev - libdbus-glib-1-dev
- libeigen3-dev
- libelf-dev
- libffi-dev
- libfl-dev - libfl-dev
- libfuse-dev
- libgdbm-dev
- libgl1-mesa-glx
- libgmp3-dev - libgmp3-dev
- libgstreamer1.0-0
- libhdf5-dev
- liblapack-dev
- libncursesw5-dev
- libnetfilter-queue-dev - libnetfilter-queue-dev
- libopenblas-dev
- libopenjp2-7
- libopenmpi-dev
- libopenmpi3
- libpcap-dev - libpcap-dev
- libraspberrypi-bin - libraspberrypi-bin
- libraspberrypi-dev - libraspberrypi-dev
- libraspberrypi-doc - libraspberrypi-doc
- libraspberrypi0 - libraspberrypi0
- libsqlite3-dev
- libssl-dev - libssl-dev
- libssl-ocaml-dev - libssl-ocaml-dev
- libswscale5
- libtiff6
- libtool - libtool
- libusb-1.0-0-dev - libusb-1.0-0-dev
- lsof
- make - make
- ntp - ntp
- python3-dbus - pkg-config
- python3-flask - python3-dev
- python3-flask-cors
- python3-flaskext.wtf
- python3-gast
- python3-pil
- python3-pip - python3-pip
- python3-pycryptodome
- python3-requests
- python3-scapy
- python3-setuptools - python3-setuptools
- python3-smbus
- python3-smbus2
- python3-spidev
- python3-tweepy
- python3-werkzeug
- python3-yaml
- qpdf - qpdf
- raspberrypi-kernel-headers - raspberrypi-kernel-headers
- rsync - rsync
- screen
- tcpdump - tcpdump
- texinfo - texinfo
- time
- tk-dev
- unzip - unzip
- vim
- wget - wget
- wl - wl
- xxd - xxd
@ -168,9 +116,9 @@
- name: install packages - name: install packages
apt: apt:
name: "{{ packages.apt.install }}" name: "{{ packages.apt.install }}"
state: present state: latest
update_cache: yes update_cache: yes
install_recommends: false install_recommends: no
- name: update pip3, setuptools, wheel - name: update pip3, setuptools, wheel
shell: "python3 -m pip install --upgrade pip setuptools wheel --break-system-packages" shell: "python3 -m pip install --upgrade pip setuptools wheel --break-system-packages"
@ -178,12 +126,22 @@
executable: /bin/bash executable: /bin/bash
chdir: /usr/local/src chdir: /usr/local/src
- name: build pwnagotchi wheel
command: "pip3 install . --no-cache-dir --break-system-packages"
args:
chdir: /usr/local/src/pwnagotchi
- name: remove pwnagotchi folder
file:
state: absent
path: /usr/local/src/pwnagotchi
# Now we set up /boot/firmware # Now we set up /boot/firmware
- name: Create pi user - name: Create pi user
copy: copy:
dest: /boot/firmware/userconf dest: /boot/firmware/userconf
content: | content: |
pi:$6$3jNr0GA9KIyt4hmM$efeVIopdMQ8DGgEPCWWlbx3mJJNAYci1lEXGdlky0xPyjqwKNbwTL5SrCcpb4144C4IvzWjn7Iv.QjqmU7iyT/ pi:$5$733Efsksay$SEFUKemv8FaNAu6X4GUfxdSzSDh6PbpOcdtNe5b7Nt0
- name: enable ssh on boot - name: enable ssh on boot
file: file:
@ -222,6 +180,7 @@
gpu_mem=1 gpu_mem=1
dtoverlay=dwc2 dtoverlay=dwc2
#dtoverlay=disable-wifi #dtoverlay=disable-wifi
enable_uart=1
[pi0] [pi0]
dtoverlay=spi0-0cs dtoverlay=spi0-0cs
@ -298,7 +257,6 @@
state: link state: link
# install latest hcxtools # install latest hcxtools
- name: clone hcxtools - name: clone hcxtools
git: git:
repo: https://github.com/ZerBea/hcxtools.git repo: https://github.com/ZerBea/hcxtools.git
@ -315,13 +273,13 @@
state: absent state: absent
path: /usr/local/src/hcxtools path: /usr/local/src/hcxtools
# Installing nexmon
- name: clone nexmon repository - name: clone nexmon repository
git: git:
repo: https://github.com/DrSchottky/nexmon.git repo: https://github.com/DrSchottky/nexmon.git
dest: /usr/local/src/nexmon dest: /usr/local/src/nexmon
# FIRST WE BUILD DRIVER FOR RPi5 # FIRST WE BUILD DRIVER FOR RPi5
- name: make firmware, RPi5 - name: make firmware, RPi5
shell: "source ./setup_env.sh && make" shell: "source ./setup_env.sh && make"
args: args:
@ -348,11 +306,6 @@
QEMU_UNAME: "{{ kernel.full_pi5 }}" QEMU_UNAME: "{{ kernel.full_pi5 }}"
ARCHFLAGS: "-arch aarch64" ARCHFLAGS: "-arch aarch64"
- name: Delete the modified driver, RPi5
file:
state: absent
path: '/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko'
- name: backup original driver, RPi5 - name: backup original driver, RPi5
command: "mv /usr/lib/modules/{{ kernel.full_pi5 }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full_pi5 }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig" command: "mv /usr/lib/modules/{{ kernel.full_pi5 }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz /usr/lib/modules/{{ kernel.full_pi5 }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig"
@ -367,7 +320,6 @@
path: /usr/local/src/nexmon/ path: /usr/local/src/nexmon/
# NOW WE BUILD DRIVERS FOR RPi4, RPizero2w and RPi3 # NOW WE BUILD DRIVERS FOR RPi4, RPizero2w and RPi3
- name: clone nexmon repository - name: clone nexmon repository
git: git:
repo: https://github.com/DrSchottky/nexmon.git repo: https://github.com/DrSchottky/nexmon.git
@ -398,7 +350,6 @@
follow: true follow: true
# NOW WE BUILD DRIVERS FOR RPiZero2W, RPi 3 # NOW WE BUILD DRIVERS FOR RPiZero2W, RPi 3
- name: make firmware patch (bcm43436b0) - name: make firmware patch (bcm43436b0)
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make" shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make"
args: args:
@ -423,6 +374,12 @@
QEMU_UNAME: "{{ kernel.full }}" QEMU_UNAME: "{{ kernel.full }}"
ARCHFLAGS: "-arch aarch64" ARCHFLAGS: "-arch aarch64"
- name: install new firmware (bcm43430a1)
copy:
src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin
dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
follow: true
- name: copy modified driver, RPi4 - name: copy modified driver, RPi4
copy: copy:
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko" src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
@ -431,12 +388,6 @@
QEMU_UNAME: "{{ kernel.full }}" QEMU_UNAME: "{{ kernel.full }}"
ARCHFLAGS: "-arch aarch64" ARCHFLAGS: "-arch aarch64"
- name: install new firmware (bcm43430a1)
copy:
src: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/brcmfmac43430-sdio.bin
dest: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
follow: true
- name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2 - name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2
copy: copy:
src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
@ -471,39 +422,24 @@
state: absent state: absent
path: /usr/local/src/nexmon/ path: /usr/local/src/nexmon/
- name: Create custom plugin directory
file:
path: /usr/local/share/pwnagotchi/custom-plugins/
state: directory
- name: Create custom config directory - name: Create custom config directory
file: file:
path: /etc/pwnagotchi/conf.d/ path: /etc/pwnagotchi/conf.d/
state: directory state: directory
- name: clone pwnagotchi repository
git:
repo: https://github.com/jayofelony/pwnagotchi.git
dest: /usr/local/src/pwnagotchi
- name: build pwnagotchi wheel
command: "pip3 install . --no-cache-dir --break-system-packages"
args:
chdir: /usr/local/src/pwnagotchi
- name: remove pwnagotchi folder
file:
state: absent
path: /usr/local/src/pwnagotchi
- name: create /usr/local/share/pwnagotchi/ folder - name: create /usr/local/share/pwnagotchi/ folder
file: file:
path: /usr/local/share/pwnagotchi/ path: /usr/local/share/pwnagotchi/
state: directory state: directory
- name: Create custom plugin directory
file:
path: /usr/local/share/pwnagotchi/custom-plugins/
state: directory
- name: Install go-1.21 - name: Install go-1.21
unarchive: unarchive:
src: https://go.dev/dl/go1.21.5.linux-arm64.tar.gz src: https://go.dev/dl/go1.22.3.linux-arm64.tar.gz
dest: /usr/local dest: /usr/local
remote_src: yes remote_src: yes
register: golang register: golang

View File

@ -1 +1 @@
__version__ = '2.9.1.2' __version__ = '2.9.2'

View File

@ -8,7 +8,7 @@ dynamic = ["version"]
dependencies = [ dependencies = [
"Pillow", "Pillow",
"PyYAML", "PyYAML",
"RPi.GPIO", "rpi.lgpio",
"dbus-python", "dbus-python",
"file-read-backwards", "file-read-backwards",
"flask", "flask",
@ -29,8 +29,8 @@ dependencies = [
"spidev", "spidev",
"stable_baselines3", "stable_baselines3",
"toml", "toml",
"torch", "torch; platform_machine=='aarch64'",
"torchvision", "torchvision; platform_machine=='aarch64'",
"tweepy", "tweepy",
"websockets", "websockets",
] ]

View File

@ -18,9 +18,7 @@ dbus-python
toml toml
python-dateutil python-dateutil
websockets websockets
torch
torchvision
stable_baselines3 stable_baselines3
RPi.GPIO rpi-lgpio
rpi_hardware_pwm rpi_hardware_pwm
pydrive2 pydrive2