mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Update for bookworm release
This commit is contained in:
4
Makefile
4
Makefile
@ -1,4 +1,4 @@
|
|||||||
PACKER_VERSION := 1.9.4
|
PACKER_VERSION := 1.10.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)
|
||||||
|
|
||||||
@ -64,5 +64,5 @@ pwnagotchi: $(SDIST) builder/pwnagotchi.json.pkr.hcl builder/raspberrypi32.yml b
|
|||||||
image: pwnagotchi
|
image: pwnagotchi
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
- rm -rf dist pwnagotchi.egg-info
|
- rm -rf build dist pwnagotchi.egg-info
|
||||||
- rm -f $(PACKER)
|
- rm -f $(PACKER)
|
||||||
|
@ -18,13 +18,13 @@ from pwnagotchi import fs
|
|||||||
from pwnagotchi.utils import DottedTomlEncoder, parse_version as version_to_tuple
|
from pwnagotchi.utils import DottedTomlEncoder, parse_version as version_to_tuple
|
||||||
|
|
||||||
|
|
||||||
def do_clear(display):
|
def pwnagotchi_cli():
|
||||||
|
def do_clear(display):
|
||||||
logging.info("clearing the display ...")
|
logging.info("clearing the display ...")
|
||||||
display.clear()
|
display.clear()
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
def do_manual_mode(agent):
|
||||||
def do_manual_mode(agent):
|
|
||||||
logging.info("entering manual mode ...")
|
logging.info("entering manual mode ...")
|
||||||
|
|
||||||
agent.mode = 'manual'
|
agent.mode = 'manual'
|
||||||
@ -45,8 +45,7 @@ def do_manual_mode(agent):
|
|||||||
if grid.is_connected():
|
if grid.is_connected():
|
||||||
plugins.on('internet_available', agent)
|
plugins.on('internet_available', agent)
|
||||||
|
|
||||||
|
def do_auto_mode(agent):
|
||||||
def do_auto_mode(agent):
|
|
||||||
logging.info("entering auto mode ...")
|
logging.info("entering auto mode ...")
|
||||||
|
|
||||||
agent.mode = 'auto'
|
agent.mode = 'auto'
|
||||||
@ -88,15 +87,16 @@ def do_auto_mode(agent):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if str(e).find("wifi.interface not set") > 0:
|
if str(e).find("wifi.interface not set") > 0:
|
||||||
logging.exception("main loop exception due to unavailable wifi device, likely programmatically disabled (%s)", e)
|
logging.exception(
|
||||||
logging.info("sleeping 60 seconds then advancing to next epoch to allow for cleanup code to trigger")
|
"main loop exception due to unavailable wifi device, likely programmatically disabled (%s)", e)
|
||||||
|
logging.info(
|
||||||
|
"sleeping 60 seconds then advancing to next epoch to allow for cleanup code to trigger")
|
||||||
time.sleep(60)
|
time.sleep(60)
|
||||||
agent.next_epoch()
|
agent.next_epoch()
|
||||||
else:
|
else:
|
||||||
logging.exception("main loop exception (%s)", e)
|
logging.exception("main loop exception (%s)", e)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
def add_parsers(parser):
|
def add_parsers(parser):
|
||||||
"""
|
"""
|
||||||
Adds the plugins and google subcommands
|
Adds the plugins and google subcommands
|
||||||
@ -221,3 +221,7 @@ if __name__ == '__main__':
|
|||||||
do_manual_mode(agent)
|
do_manual_mode(agent)
|
||||||
else:
|
else:
|
||||||
do_auto_mode(agent)
|
do_auto_mode(agent)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
pwnagotchi_cli()
|
5
builder/data/etc/NetworkManager/NetworkManager.conf
Normal file
5
builder/data/etc/NetworkManager/NetworkManager.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[main]
|
||||||
|
plugins=ifupdown,keyfile
|
||||||
|
|
||||||
|
[ifupdown]
|
||||||
|
managed=true
|
@ -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
|
|
@ -82,7 +82,7 @@ is_auto_mode() {
|
|||||||
|
|
||||||
# if usb0 is up, we're in MANU
|
# if usb0 is up, we're in MANU
|
||||||
if is_interface_up usb0; then
|
if is_interface_up usb0; then
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if eth0 is up (for other boards), we're in MANU
|
# if eth0 is up (for other boards), we're in MANU
|
||||||
@ -108,7 +108,7 @@ is_auto_mode_no_delete() {
|
|||||||
|
|
||||||
# if usb0 is up, we're in MANU
|
# if usb0 is up, we're in MANU
|
||||||
if is_interface_up usb0; then
|
if is_interface_up usb0; then
|
||||||
return 0
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if eth0 is up (for other boards), we're in MANU
|
# if eth0 is up (for other boards), we're in MANU
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
# Install nexmon to fix wireless scanning (takes 2.5G of space)
|
# 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
|
- name: make firmware
|
||||||
shell: "source ./setup_env.sh && make"
|
shell: "source ./setup_env.sh && make"
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
packer {
|
packer {
|
||||||
required_plugins {
|
required_plugins {
|
||||||
#arm = {
|
#arm = {
|
||||||
# version = "1.0.0"
|
# version = "~> 1"
|
||||||
# source = "github.com/cdecoux/builder-arm"
|
# source = "github.com/cdecoux/builder-arm"
|
||||||
#}
|
#}
|
||||||
ansible = {
|
ansible = {
|
||||||
@ -22,12 +22,12 @@ variable "pwn_version" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
source "arm" "rpi64-pwnagotchi" {
|
source "arm" "rpi64-pwnagotchi" {
|
||||||
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256"
|
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-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz"]
|
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_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-rpi-bullseye-${var.pwn_version}-arm64.img"
|
image_path = "../../../pwnagotchi-rpi-bookworm-${var.pwn_version}-arm64.img"
|
||||||
qemu_binary_source_path = "/usr/bin/qemu-aarch64-static"
|
qemu_binary_source_path = "/usr/bin/qemu-aarch64-static"
|
||||||
qemu_binary_destination_path = "/usr/bin/qemu-aarch64-static"
|
qemu_binary_destination_path = "/usr/bin/qemu-aarch64-static"
|
||||||
image_build_method = "resize"
|
image_build_method = "resize"
|
||||||
@ -39,7 +39,7 @@ source "arm" "rpi64-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,12 +51,12 @@ source "arm" "rpi64-pwnagotchi" {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
source "arm" "rpi32-pwnagotchi" {
|
source "arm" "rpi32-pwnagotchi" {
|
||||||
file_checksum_url = "https://downloads.raspberrypi.org/raspios_lite_armhf/images/raspios_lite_armhf-2023-05-03/2023-05-03-raspios-bullseye-armhf-lite.img.xz.sha256"
|
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-05-03/2023-05-03-raspios-bullseye-armhf-lite.img.xz"]
|
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_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-rpi-bullseye-${var.pwn_version}-armhf.img"
|
image_path = "../../../pwnagotchi-rpi-bookworm-${var.pwn_version}-armhf.img"
|
||||||
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
|
qemu_binary_source_path = "/usr/bin/qemu-arm-static"
|
||||||
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
|
qemu_binary_destination_path = "/usr/bin/qemu-arm-static"
|
||||||
image_build_method = "resize"
|
image_build_method = "resize"
|
||||||
@ -85,7 +85,7 @@ source "arm" "opi-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-opi-bullseye-${var.pwn_version}-arm64.img"
|
image_path = "../../../pwnagotchi-opi-bullseye-${var.pwn_version}-arm64.img"
|
||||||
qemu_binary_source_path = "/usr/bin/qemu-aarch64-static"
|
qemu_binary_source_path = "/usr/bin/qemu-aarch64-static"
|
||||||
qemu_binary_destination_path = "/usr/bin/qemu-aarch64-static"
|
qemu_binary_destination_path = "/usr/bin/qemu-aarch64-static"
|
||||||
image_build_method = "resize"
|
image_build_method = "resize"
|
||||||
@ -132,6 +132,7 @@ build {
|
|||||||
"data/etc/systemd/system/pwngrid-peer.service",
|
"data/etc/systemd/system/pwngrid-peer.service",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
provisioner "file" {
|
provisioner "file" {
|
||||||
destination = "/etc/update-motd.d/01-motd"
|
destination = "/etc/update-motd.d/01-motd"
|
||||||
source = "data/etc/update-motd.d/01-motd"
|
source = "data/etc/update-motd.d/01-motd"
|
||||||
@ -149,92 +150,92 @@ build {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
build {
|
#build {
|
||||||
name = "Raspberry Pi 32 Pwnagotchi"
|
# name = "Raspberry Pi 32 Pwnagotchi"
|
||||||
sources = ["source.arm.rpi32-pwnagotchi"]
|
# sources = ["source.arm.rpi32-pwnagotchi"]
|
||||||
provisioner "file" {
|
# provisioner "file" {
|
||||||
destination = "/usr/bin/"
|
# destination = "/usr/bin/"
|
||||||
sources = [
|
# sources = [
|
||||||
"data/usr/bin/bettercap-launcher",
|
# "data/usr/bin/bettercap-launcher",
|
||||||
"data/usr/bin/hdmioff",
|
# "data/usr/bin/hdmioff",
|
||||||
"data/usr/bin/hdmion",
|
# "data/usr/bin/hdmion",
|
||||||
"data/usr/bin/monstart",
|
# "data/usr/bin/monstart",
|
||||||
"data/usr/bin/monstop",
|
# "data/usr/bin/monstop",
|
||||||
"data/usr/bin/pwnagotchi-launcher",
|
# "data/usr/bin/pwnagotchi-launcher",
|
||||||
"data/usr/bin/pwnlib",
|
# "data/usr/bin/pwnlib",
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
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 = [
|
||||||
"data/etc/systemd/system/bettercap.service",
|
# "data/etc/systemd/system/bettercap.service",
|
||||||
"data/etc/systemd/system/pwnagotchi.service",
|
# "data/etc/systemd/system/pwnagotchi.service",
|
||||||
"data/etc/systemd/system/pwngrid-peer.service",
|
# "data/etc/systemd/system/pwngrid-peer.service",
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
provisioner "file" {
|
# provisioner "file" {
|
||||||
destination = "/etc/update-motd.d/01-motd"
|
# destination = "/etc/update-motd.d/01-motd"
|
||||||
source = "data/etc/update-motd.d/01-motd"
|
# source = "data/etc/update-motd.d/01-motd"
|
||||||
}
|
# }
|
||||||
provisioner "shell" {
|
# provisioner "shell" {
|
||||||
inline = ["chmod +x /etc/update-motd.d/*"]
|
# inline = ["chmod +x /etc/update-motd.d/*"]
|
||||||
}
|
# }
|
||||||
provisioner "shell" {
|
# provisioner "shell" {
|
||||||
inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
# inline = ["apt-get -y --allow-releaseinfo-change update", "export LC_ALL=en_GB.UTF-8", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
||||||
}
|
# }
|
||||||
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_dir = "extras/"
|
||||||
playbook_file = "raspberrypi32.yml"
|
# playbook_file = "raspberrypi32.yml"
|
||||||
}
|
# }
|
||||||
}
|
#}
|
||||||
|
|
||||||
build {
|
#build {
|
||||||
name = "Orange Pi Pwnagotchi"
|
# name = "Orange Pi Pwnagotchi"
|
||||||
sources = ["source.arm.opi-pwnagotchi"]
|
# sources = ["source.arm.opi-pwnagotchi"]
|
||||||
|
|
||||||
provisioner "file" {
|
# provisioner "file" {
|
||||||
destination = "/usr/bin/"
|
# destination = "/usr/bin/"
|
||||||
sources = [
|
# sources = [
|
||||||
"data/usr/bin/bettercap-launcher",
|
# "data/usr/bin/bettercap-launcher",
|
||||||
"data/usr/bin/hdmioff",
|
# "data/usr/bin/hdmioff",
|
||||||
"data/usr/bin/hdmion",
|
# "data/usr/bin/hdmion",
|
||||||
"data/usr/bin/monstart",
|
# "data/usr/bin/monstart",
|
||||||
"data/usr/bin/monstop",
|
# "data/usr/bin/monstop",
|
||||||
"data/usr/bin/pwnagotchi-launcher",
|
# "data/usr/bin/pwnagotchi-launcher",
|
||||||
"data/usr/bin/pwnlib",
|
# "data/usr/bin/pwnlib",
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
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 = [
|
||||||
"data/etc/systemd/system/bettercap.service",
|
# "data/etc/systemd/system/bettercap.service",
|
||||||
"data/etc/systemd/system/pwnagotchi.service",
|
# "data/etc/systemd/system/pwnagotchi.service",
|
||||||
"data/etc/systemd/system/pwngrid-peer.service",
|
# "data/etc/systemd/system/pwngrid-peer.service",
|
||||||
]
|
# ]
|
||||||
}
|
# }
|
||||||
provisioner "file" {
|
# provisioner "file" {
|
||||||
destination = "/etc/update-motd.d/01-motd"
|
# destination = "/etc/update-motd.d/01-motd"
|
||||||
source = "data/etc/update-motd.d/01-motd"
|
# source = "data/etc/update-motd.d/01-motd"
|
||||||
}
|
# }
|
||||||
provisioner "shell" {
|
# provisioner "shell" {
|
||||||
inline = ["chmod +x /etc/update-motd.d/*"]
|
# inline = ["chmod +x /etc/update-motd.d/*"]
|
||||||
}
|
# }
|
||||||
provisioner "shell" {
|
# provisioner "shell" {
|
||||||
inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
# inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
||||||
}
|
# }
|
||||||
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_file = "orangepi.yml"
|
# playbook_file = "orangepi.yml"
|
||||||
}
|
# }
|
||||||
}
|
#}
|
@ -6,7 +6,7 @@
|
|||||||
vars:
|
vars:
|
||||||
boards:
|
boards:
|
||||||
- {
|
- {
|
||||||
kernel: "6.1.21+",
|
kernel: "6.1.0-rpi7-rpi-v6",
|
||||||
name: "PiZeroW",
|
name: "PiZeroW",
|
||||||
firmware: "brcmfmac43430-sdio.bin",
|
firmware: "brcmfmac43430-sdio.bin",
|
||||||
patch: "bcm43430a1/7_45_41_46",
|
patch: "bcm43430a1/7_45_41_46",
|
||||||
@ -14,7 +14,7 @@
|
|||||||
arch_flags: "-arch armv6l"
|
arch_flags: "-arch armv6l"
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
kernel: "6.1.21-v7+",
|
kernel: "6.1.0-rpi7-rpi-v7",
|
||||||
name: "PiZero2W",
|
name: "PiZero2W",
|
||||||
firmware: "brcmfmac43436-sdio.bin",
|
firmware: "brcmfmac43436-sdio.bin",
|
||||||
patch: "bcm43436b0/9_88_4_65",
|
patch: "bcm43436b0/9_88_4_65",
|
||||||
@ -22,7 +22,7 @@
|
|||||||
arch_flags: "-arch armv7l"
|
arch_flags: "-arch armv7l"
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
kernel: "6.1.21-v7l+",
|
kernel: "6.1.0-rpi7-rpi-v7",
|
||||||
name: "Pi4b_32",
|
name: "Pi4b_32",
|
||||||
firmware: "brcmfmac43455-sdio.bin",
|
firmware: "brcmfmac43455-sdio.bin",
|
||||||
patch: "bcm43455c0/7_45_206",
|
patch: "bcm43455c0/7_45_206",
|
||||||
@ -80,7 +80,7 @@
|
|||||||
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.1/bettercap-2.32.1-armhf.zip"
|
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"
|
||||||
opwngrid:
|
opwngrid:
|
||||||
source: "https://github.com/jayofelony/pwngrid.git"
|
source: "https://github.com/jayofelony/pwngrid.git"
|
||||||
@ -98,11 +98,6 @@
|
|||||||
- libpcap0.8-dev_1.9.1-4_armhf.deb
|
- libpcap0.8-dev_1.9.1-4_armhf.deb
|
||||||
- libpcap0.8_1.9.1-4_armhf.deb
|
- libpcap0.8_1.9.1-4_armhf.deb
|
||||||
hold:
|
hold:
|
||||||
- firmware-atheros
|
|
||||||
- firmware-brcm80211
|
|
||||||
- firmware-libertas
|
|
||||||
- firmware-misc-nonfree
|
|
||||||
- firmware-realtek
|
|
||||||
- libpcap-dev
|
- libpcap-dev
|
||||||
- libpcap0.8
|
- libpcap0.8
|
||||||
- libpcap0.8-dev
|
- libpcap0.8-dev
|
||||||
@ -292,7 +287,10 @@
|
|||||||
###############################################################
|
###############################################################
|
||||||
# Install nexmon to fix wireless scanning (takes 2.5G of space)
|
# 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
|
||||||
# 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: nexmon.yml
|
||||||
@ -355,7 +353,7 @@
|
|||||||
- "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
|
- "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
|
||||||
- "{{ packages.torch.url }}"
|
- "{{ packages.torch.url }}"
|
||||||
- "{{ packages.torchvision.url }}"
|
- "{{ packages.torchvision.url }}"
|
||||||
extra_args: "--no-cache-dir"
|
extra_args: "--no-cache-dir --break-system-packages"
|
||||||
environment:
|
environment:
|
||||||
QEMU_CPU: arm1176
|
QEMU_CPU: arm1176
|
||||||
QEMU_UNAME: "{{ kernel.full }}"
|
QEMU_UNAME: "{{ kernel.full }}"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
vars:
|
vars:
|
||||||
kernel:
|
kernel:
|
||||||
min: "6.1"
|
min: "6.1"
|
||||||
full: "6.1.21-v8+"
|
full: "6.1.0-rpi7-rpi-v8"
|
||||||
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-torch', true) }}"
|
||||||
@ -43,9 +43,9 @@
|
|||||||
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.1/bettercap-2.32.1.zip"
|
url: "https://github.com/jayofelony/bettercap/releases/download/2.32.2/bettercap-2.32.2.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"
|
||||||
opwngrid:
|
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.5/pwngrid-1.10.5-aarch64.zip"
|
url: "https://github.com/jayofelony/pwngrid/releases/download/v1.10.5/pwngrid-1.10.5-aarch64.zip"
|
||||||
apt:
|
apt:
|
||||||
@ -55,11 +55,6 @@
|
|||||||
- libpcap0.8-dev_1.9.1-4_arm64.deb
|
- libpcap0.8-dev_1.9.1-4_arm64.deb
|
||||||
- libpcap0.8_1.9.1-4_arm64.deb
|
- libpcap0.8_1.9.1-4_arm64.deb
|
||||||
hold:
|
hold:
|
||||||
- firmware-atheros
|
|
||||||
- firmware-brcm80211
|
|
||||||
- firmware-libertas
|
|
||||||
- firmware-misc-nonfree
|
|
||||||
- firmware-realtek
|
|
||||||
- libpcap-dev
|
- libpcap-dev
|
||||||
- libpcap0.8
|
- libpcap0.8
|
||||||
- libpcap0.8-dev
|
- libpcap0.8-dev
|
||||||
@ -89,8 +84,8 @@
|
|||||||
- gcc-arm-none-eabi
|
- gcc-arm-none-eabi
|
||||||
- git
|
- git
|
||||||
- libatlas-base-dev
|
- libatlas-base-dev
|
||||||
- libavcodec58
|
- libavcodec59
|
||||||
- libavformat58
|
- libavformat59
|
||||||
- libblas-dev
|
- libblas-dev
|
||||||
- libbluetooth-dev
|
- libbluetooth-dev
|
||||||
- libbz2-dev
|
- libbz2-dev
|
||||||
@ -124,17 +119,32 @@
|
|||||||
- libsqlite3-dev
|
- libsqlite3-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
- libswscale5
|
- libswscale5
|
||||||
- libtiff5
|
- libtiff6
|
||||||
- libtool
|
- libtool
|
||||||
- libusb-1.0-0-dev
|
- libusb-1.0-0-dev
|
||||||
- lsof
|
- lsof
|
||||||
- make
|
- make
|
||||||
|
- python3-yaml
|
||||||
- python3-dbus
|
- python3-dbus
|
||||||
- python3-flask
|
- python3-flask
|
||||||
- python3-flask-cors
|
- python3-flask-cors
|
||||||
- python3-flaskext.wtf
|
- python3-flaskext.wtf
|
||||||
|
- python3-gast
|
||||||
- python3-pil
|
- python3-pil
|
||||||
|
- python3-pycryptodome
|
||||||
|
- python3-requests
|
||||||
|
- python3-scapy
|
||||||
|
- python3-smbus2
|
||||||
|
- python3-spidev
|
||||||
|
- python3-tweepy
|
||||||
|
- python3-werkzeug
|
||||||
|
- firmware-atheros
|
||||||
|
- firmware-brcm80211
|
||||||
|
- firmware-libertas
|
||||||
|
- firmware-misc-nonfree
|
||||||
|
- firmware-realtek
|
||||||
- python3-pip
|
- python3-pip
|
||||||
|
- python3-setuptools
|
||||||
- python3-smbus
|
- python3-smbus
|
||||||
- qpdf
|
- qpdf
|
||||||
- raspberrypi-kernel-headers
|
- raspberrypi-kernel-headers
|
||||||
@ -341,7 +351,7 @@
|
|||||||
- name: install pwnagotchi wheel and dependencies
|
- name: install pwnagotchi wheel and dependencies
|
||||||
pip:
|
pip:
|
||||||
name: "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
|
name: "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
|
||||||
extra_args: "--no-cache-dir"
|
extra_args: "--no-cache-dir --break-system-packages"
|
||||||
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
|
when: (pwnagotchigit.changed) or (pip_packages['pwnagotchi'] is undefined) or (pip_packages['pwnagotchi'] != pwnagotchi_version)
|
||||||
|
|
||||||
- name: remove pwnagotchi folder
|
- name: remove pwnagotchi folder
|
||||||
@ -370,28 +380,28 @@
|
|||||||
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
|
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
|
||||||
when: golang.changed
|
when: golang.changed
|
||||||
|
|
||||||
- name: download opwngrid
|
- name: download pwngrid
|
||||||
git:
|
git:
|
||||||
repo: "{{ packages.opwngrid.source }}"
|
repo: "{{ packages.pwngrid.source }}"
|
||||||
dest: /usr/local/src/opwngrid
|
dest: /usr/local/src/pwngrid
|
||||||
|
|
||||||
- name: install opwngrid
|
- name: install pwngrid
|
||||||
shell: "export GOPATH=$HOME/go && export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin && go mod tidy && make && make install"
|
shell: "export GOPATH=$HOME/go && export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin && go mod tidy && make && make install"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
chdir: /usr/local/src/opwngrid
|
chdir: /usr/local/src/pwngrid
|
||||||
|
|
||||||
- name: remove opwngrid folder
|
- name: remove pwngrid folder
|
||||||
file:
|
file:
|
||||||
state: absent
|
state: absent
|
||||||
path: /usr/local/src/opwngrid
|
path: /usr/local/src/pwngrid
|
||||||
|
|
||||||
- name: download bettercap
|
- name: download bettercap
|
||||||
git:
|
git:
|
||||||
repo: "{{ packages.bettercap.source }}"
|
repo: "{{ packages.bettercap.source }}"
|
||||||
dest: /usr/local/src/bettercap
|
dest: /usr/local/src/bettercap
|
||||||
|
|
||||||
- name: install bettercap 2.32.1
|
- name: install bettercap 2.32.2
|
||||||
shell: "export GOPATH=$HOME/go && export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin && go mod tidy && make && make install"
|
shell: "export GOPATH=$HOME/go && export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin && go mod tidy && make && make install"
|
||||||
args:
|
args:
|
||||||
executable: /bin/bash
|
executable: /bin/bash
|
||||||
|
@ -3,15 +3,15 @@ import secrets
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# https://stackoverflow.com/questions/14888799/disable-console-messages-in-flask-server
|
|
||||||
logging.getLogger('werkzeug').setLevel(logging.ERROR)
|
|
||||||
os.environ['WERKZEUG_RUN_MAIN'] = 'true'
|
|
||||||
|
|
||||||
from flask import Flask
|
from flask import Flask
|
||||||
from flask_cors import CORS
|
from flask_cors import CORS
|
||||||
from flask_wtf.csrf import CSRFProtect
|
from flask_wtf.csrf import CSRFProtect
|
||||||
|
|
||||||
from pwnagotchi.ui.web.handler import Handler
|
from pwnagotchi.ui.web.handler import Handler
|
||||||
|
# https://stackoverflow.com/questions/14888799/disable-console-messages-in-flask-server
|
||||||
|
logging.getLogger('werkzeug').setLevel(logging.ERROR)
|
||||||
|
os.environ['WERKZEUG_RUN_MAIN'] = 'true'
|
||||||
|
|
||||||
|
|
||||||
class Server:
|
class Server:
|
||||||
def __init__(self, agent, config):
|
def __init__(self, agent, config):
|
||||||
|
62
pyproject.toml
Normal file
62
pyproject.toml
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
[build-system]
|
||||||
|
requires = ["setuptools"]
|
||||||
|
build-backend = "setuptools.wheel"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "pwnagotchi"
|
||||||
|
dynamic = ["version"]
|
||||||
|
dependencies = [
|
||||||
|
"OPi.GPIO; platform_release==\"6.1.31-sun50iw9\"",
|
||||||
|
"Pillow",
|
||||||
|
"PyYAML",
|
||||||
|
"RPi.GPIO; platform_release!=\"6.1.31-sun50iw9\"",
|
||||||
|
"file-read-backwards",
|
||||||
|
"flask",
|
||||||
|
"flask-cors",
|
||||||
|
"flask-wtf",
|
||||||
|
"gast",
|
||||||
|
"gym",
|
||||||
|
"inky",
|
||||||
|
"pycryptodome",
|
||||||
|
"pydrive2",
|
||||||
|
"python-dateutil",
|
||||||
|
"requests",
|
||||||
|
"rpi_hardware_pwm; platform_release!=\"6.1.31-sun50iw9\"",
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
requires-python = ">=3.9"
|
||||||
|
authors = [
|
||||||
|
{name = "Evilsocket", email = "evilsocket@gmail.com"},
|
||||||
|
{name = "Jayofelony", email = "oudshoorn.jeroen@gmail.com"}
|
||||||
|
]
|
||||||
|
maintainers = [
|
||||||
|
{name = "Jayofelony", email = "oudshoorn.jeroen@gmail.com"}
|
||||||
|
]
|
||||||
|
description = "(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFI pwning."
|
||||||
|
readme = "README.md"
|
||||||
|
license = {file = "LICENSE.md"}
|
||||||
|
classifiers = [
|
||||||
|
'Programming Language :: Python :: 3',
|
||||||
|
'Development Status :: 5 - Production/Stable',
|
||||||
|
'License :: OSI Approved :: GNU General Public License (GPL)',
|
||||||
|
'Environment :: Console',
|
||||||
|
]
|
||||||
|
|
||||||
|
[project.urls]
|
||||||
|
Homepage = "https://pwnagotchi.ai/"
|
||||||
|
Documentation = "https://pwnagotchi.ai/"
|
||||||
|
Repository = "https://github.com/jayofelony/pwnagotchi-torch.git"
|
||||||
|
"Bug Tracker" = "https://github.com/jayofelony/pwnagotchi-torch.git/issues"
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
pwnagotchi_cli = "bin.pwnagotchi"
|
@ -1,34 +1,27 @@
|
|||||||
gym
|
OPi.GPIO; platform_release=="6.1.31-sun50iw9"
|
||||||
shimmy; platform_machine!="armv6l"
|
|
||||||
pycryptodome
|
|
||||||
requests
|
|
||||||
PyYAML
|
|
||||||
scapy
|
|
||||||
tweepy
|
|
||||||
file-read-backwards
|
|
||||||
inky
|
|
||||||
smbus2
|
|
||||||
Pillow
|
Pillow
|
||||||
spidev
|
PyYAML
|
||||||
gast
|
RPi.GPIO; platform_release!="6.1.31-sun50iw9"
|
||||||
|
file-read-backwards
|
||||||
flask
|
flask
|
||||||
flask-cors
|
flask-cors
|
||||||
flask-wtf
|
flask-wtf
|
||||||
dbus-python
|
gast
|
||||||
toml
|
gym
|
||||||
python-dateutil
|
inky
|
||||||
websockets
|
pycryptodome
|
||||||
torch==2.0.1; platform_machine=="aarch64"
|
|
||||||
torch>=2.0.1; platform_machine!="aarch64"
|
|
||||||
|
|
||||||
torchvision==0.15.2; platform_machine=="aarch64"
|
|
||||||
torchvision>=0.15.2; platform_machine!="aarch64"
|
|
||||||
|
|
||||||
stable_baselines3==1.8.0; platform_machine=="armv6l"
|
|
||||||
stable_baselines3; platform_machine!="armv6l"
|
|
||||||
|
|
||||||
RPi.GPIO; platform_release!="6.1.31-sun50iw9"
|
|
||||||
OPi.GPIO; platform_release=="6.1.31-sun50iw9"
|
|
||||||
|
|
||||||
rpi_hardware_pwm; platform_release!="6.1.31-sun50iw9"
|
|
||||||
pydrive2
|
pydrive2
|
||||||
|
python-dateutil
|
||||||
|
requests
|
||||||
|
rpi_hardware_pwm; platform_release!="6.1.31-sun50iw9"
|
||||||
|
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
|
Reference in New Issue
Block a user