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_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
|
||||
|
||||
clean:
|
||||
- rm -rf dist pwnagotchi.egg-info
|
||||
- rm -rf build dist pwnagotchi.egg-info
|
||||
- rm -f $(PACKER)
|
||||
|
@ -18,12 +18,12 @@ from pwnagotchi import fs
|
||||
from pwnagotchi.utils import DottedTomlEncoder, parse_version as version_to_tuple
|
||||
|
||||
|
||||
def pwnagotchi_cli():
|
||||
def do_clear(display):
|
||||
logging.info("clearing the display ...")
|
||||
display.clear()
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
def do_manual_mode(agent):
|
||||
logging.info("entering manual mode ...")
|
||||
|
||||
@ -45,7 +45,6 @@ def do_manual_mode(agent):
|
||||
if grid.is_connected():
|
||||
plugins.on('internet_available', agent)
|
||||
|
||||
|
||||
def do_auto_mode(agent):
|
||||
logging.info("entering auto mode ...")
|
||||
|
||||
@ -88,15 +87,16 @@ def do_auto_mode(agent):
|
||||
|
||||
except Exception as e:
|
||||
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.info("sleeping 60 seconds then advancing to next epoch to allow for cleanup code to trigger")
|
||||
logging.exception(
|
||||
"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)
|
||||
agent.next_epoch()
|
||||
else:
|
||||
logging.exception("main loop exception (%s)", e)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def add_parsers(parser):
|
||||
"""
|
||||
Adds the plugins and google subcommands
|
||||
@ -221,3 +221,7 @@ if __name__ == '__main__':
|
||||
do_manual_mode(agent)
|
||||
else:
|
||||
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 is_interface_up usb0; then
|
||||
return 0
|
||||
return 1
|
||||
fi
|
||||
|
||||
# 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 is_interface_up usb0; then
|
||||
return 0
|
||||
return 1
|
||||
fi
|
||||
|
||||
# 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)
|
||||
- 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"
|
||||
|
@ -3,7 +3,7 @@
|
||||
packer {
|
||||
required_plugins {
|
||||
#arm = {
|
||||
# version = "1.0.0"
|
||||
# version = "~> 1"
|
||||
# source = "github.com/cdecoux/builder-arm"
|
||||
#}
|
||||
ansible = {
|
||||
@ -22,12 +22,12 @@ variable "pwn_version" {
|
||||
}
|
||||
|
||||
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_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_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-12-06/2023-12-05-raspios-bookworm-arm64-lite.img.xz"]
|
||||
file_checksum_type = "sha256"
|
||||
file_target_extension = "xz"
|
||||
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_destination_path = "/usr/bin/qemu-aarch64-static"
|
||||
image_build_method = "resize"
|
||||
@ -39,7 +39,7 @@ source "arm" "rpi64-pwnagotchi" {
|
||||
start_sector = "8192"
|
||||
filesystem = "fat"
|
||||
size = "256M"
|
||||
mountpoint = "/boot"
|
||||
mountpoint = "/boot/firmware"
|
||||
}
|
||||
image_partitions {
|
||||
name = "root"
|
||||
@ -51,12 +51,12 @@ source "arm" "rpi64-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_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_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-12-06/2023-12-05-raspios-bookworm-armhf-lite.img.xz"]
|
||||
file_checksum_type = "sha256"
|
||||
file_target_extension = "xz"
|
||||
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_destination_path = "/usr/bin/qemu-arm-static"
|
||||
image_build_method = "resize"
|
||||
@ -85,7 +85,7 @@ source "arm" "opi-pwnagotchi" {
|
||||
file_checksum_type = "sha256"
|
||||
file_target_extension = "xz"
|
||||
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_destination_path = "/usr/bin/qemu-aarch64-static"
|
||||
image_build_method = "resize"
|
||||
@ -132,6 +132,7 @@ build {
|
||||
"data/etc/systemd/system/pwngrid-peer.service",
|
||||
]
|
||||
}
|
||||
|
||||
provisioner "file" {
|
||||
destination = "/etc/update-motd.d/01-motd"
|
||||
source = "data/etc/update-motd.d/01-motd"
|
||||
@ -149,92 +150,92 @@ build {
|
||||
}
|
||||
}
|
||||
|
||||
build {
|
||||
name = "Raspberry Pi 32 Pwnagotchi"
|
||||
sources = ["source.arm.rpi32-pwnagotchi"]
|
||||
provisioner "file" {
|
||||
destination = "/usr/bin/"
|
||||
sources = [
|
||||
"data/usr/bin/bettercap-launcher",
|
||||
"data/usr/bin/hdmioff",
|
||||
"data/usr/bin/hdmion",
|
||||
"data/usr/bin/monstart",
|
||||
"data/usr/bin/monstop",
|
||||
"data/usr/bin/pwnagotchi-launcher",
|
||||
"data/usr/bin/pwnlib",
|
||||
]
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = ["chmod +x /usr/bin/*"]
|
||||
}
|
||||
#build {
|
||||
# name = "Raspberry Pi 32 Pwnagotchi"
|
||||
# sources = ["source.arm.rpi32-pwnagotchi"]
|
||||
# provisioner "file" {
|
||||
# destination = "/usr/bin/"
|
||||
# sources = [
|
||||
# "data/usr/bin/bettercap-launcher",
|
||||
# "data/usr/bin/hdmioff",
|
||||
# "data/usr/bin/hdmion",
|
||||
# "data/usr/bin/monstart",
|
||||
# "data/usr/bin/monstop",
|
||||
# "data/usr/bin/pwnagotchi-launcher",
|
||||
# "data/usr/bin/pwnlib",
|
||||
# ]
|
||||
# }
|
||||
# provisioner "shell" {
|
||||
# inline = ["chmod +x /usr/bin/*"]
|
||||
# }
|
||||
|
||||
provisioner "file" {
|
||||
destination = "/etc/systemd/system/"
|
||||
sources = [
|
||||
"data/etc/systemd/system/bettercap.service",
|
||||
"data/etc/systemd/system/pwnagotchi.service",
|
||||
"data/etc/systemd/system/pwngrid-peer.service",
|
||||
]
|
||||
}
|
||||
provisioner "file" {
|
||||
destination = "/etc/update-motd.d/01-motd"
|
||||
source = "data/etc/update-motd.d/01-motd"
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = ["chmod +x /etc/update-motd.d/*"]
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
||||
}
|
||||
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 = "extras/"
|
||||
playbook_file = "raspberrypi32.yml"
|
||||
}
|
||||
}
|
||||
# provisioner "file" {
|
||||
# destination = "/etc/systemd/system/"
|
||||
# sources = [
|
||||
# "data/etc/systemd/system/bettercap.service",
|
||||
# "data/etc/systemd/system/pwnagotchi.service",
|
||||
# "data/etc/systemd/system/pwngrid-peer.service",
|
||||
# ]
|
||||
# }
|
||||
# provisioner "file" {
|
||||
# destination = "/etc/update-motd.d/01-motd"
|
||||
# source = "data/etc/update-motd.d/01-motd"
|
||||
# }
|
||||
# provisioner "shell" {
|
||||
# inline = ["chmod +x /etc/update-motd.d/*"]
|
||||
# }
|
||||
# provisioner "shell" {
|
||||
# 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" {
|
||||
# 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 = "extras/"
|
||||
# playbook_file = "raspberrypi32.yml"
|
||||
# }
|
||||
#}
|
||||
|
||||
build {
|
||||
name = "Orange Pi Pwnagotchi"
|
||||
sources = ["source.arm.opi-pwnagotchi"]
|
||||
#build {
|
||||
# name = "Orange Pi Pwnagotchi"
|
||||
# sources = ["source.arm.opi-pwnagotchi"]
|
||||
|
||||
provisioner "file" {
|
||||
destination = "/usr/bin/"
|
||||
sources = [
|
||||
"data/usr/bin/bettercap-launcher",
|
||||
"data/usr/bin/hdmioff",
|
||||
"data/usr/bin/hdmion",
|
||||
"data/usr/bin/monstart",
|
||||
"data/usr/bin/monstop",
|
||||
"data/usr/bin/pwnagotchi-launcher",
|
||||
"data/usr/bin/pwnlib",
|
||||
]
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = ["chmod +x /usr/bin/*"]
|
||||
}
|
||||
# provisioner "file" {
|
||||
# destination = "/usr/bin/"
|
||||
# sources = [
|
||||
# "data/usr/bin/bettercap-launcher",
|
||||
# "data/usr/bin/hdmioff",
|
||||
# "data/usr/bin/hdmion",
|
||||
# "data/usr/bin/monstart",
|
||||
# "data/usr/bin/monstop",
|
||||
# "data/usr/bin/pwnagotchi-launcher",
|
||||
# "data/usr/bin/pwnlib",
|
||||
# ]
|
||||
# }
|
||||
# provisioner "shell" {
|
||||
# inline = ["chmod +x /usr/bin/*"]
|
||||
# }
|
||||
|
||||
provisioner "file" {
|
||||
destination = "/etc/systemd/system/"
|
||||
sources = [
|
||||
"data/etc/systemd/system/bettercap.service",
|
||||
"data/etc/systemd/system/pwnagotchi.service",
|
||||
"data/etc/systemd/system/pwngrid-peer.service",
|
||||
]
|
||||
}
|
||||
provisioner "file" {
|
||||
destination = "/etc/update-motd.d/01-motd"
|
||||
source = "data/etc/update-motd.d/01-motd"
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = ["chmod +x /etc/update-motd.d/*"]
|
||||
}
|
||||
provisioner "shell" {
|
||||
inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
||||
}
|
||||
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 = "orangepi.yml"
|
||||
}
|
||||
}
|
||||
# provisioner "file" {
|
||||
# destination = "/etc/systemd/system/"
|
||||
# sources = [
|
||||
# "data/etc/systemd/system/bettercap.service",
|
||||
# "data/etc/systemd/system/pwnagotchi.service",
|
||||
# "data/etc/systemd/system/pwngrid-peer.service",
|
||||
# ]
|
||||
# }
|
||||
# provisioner "file" {
|
||||
# destination = "/etc/update-motd.d/01-motd"
|
||||
# source = "data/etc/update-motd.d/01-motd"
|
||||
# }
|
||||
# provisioner "shell" {
|
||||
# inline = ["chmod +x /etc/update-motd.d/*"]
|
||||
# }
|
||||
# provisioner "shell" {
|
||||
# inline = ["apt-get -y --allow-releaseinfo-change update", "apt-get -y dist-upgrade", "apt-get install -y --no-install-recommends ansible"]
|
||||
# }
|
||||
# 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 = "orangepi.yml"
|
||||
# }
|
||||
#}
|
@ -6,7 +6,7 @@
|
||||
vars:
|
||||
boards:
|
||||
- {
|
||||
kernel: "6.1.21+",
|
||||
kernel: "6.1.0-rpi7-rpi-v6",
|
||||
name: "PiZeroW",
|
||||
firmware: "brcmfmac43430-sdio.bin",
|
||||
patch: "bcm43430a1/7_45_41_46",
|
||||
@ -14,7 +14,7 @@
|
||||
arch_flags: "-arch armv6l"
|
||||
}
|
||||
- {
|
||||
kernel: "6.1.21-v7+",
|
||||
kernel: "6.1.0-rpi7-rpi-v7",
|
||||
name: "PiZero2W",
|
||||
firmware: "brcmfmac43436-sdio.bin",
|
||||
patch: "bcm43436b0/9_88_4_65",
|
||||
@ -22,7 +22,7 @@
|
||||
arch_flags: "-arch armv7l"
|
||||
}
|
||||
- {
|
||||
kernel: "6.1.21-v7l+",
|
||||
kernel: "6.1.0-rpi7-rpi-v7",
|
||||
name: "Pi4b_32",
|
||||
firmware: "brcmfmac43455-sdio.bin",
|
||||
patch: "bcm43455c0/7_45_206",
|
||||
@ -80,7 +80,7 @@
|
||||
source: "https://github.com/jayofelony/caplets.git"
|
||||
bettercap:
|
||||
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"
|
||||
opwngrid:
|
||||
source: "https://github.com/jayofelony/pwngrid.git"
|
||||
@ -98,11 +98,6 @@
|
||||
- libpcap0.8-dev_1.9.1-4_armhf.deb
|
||||
- libpcap0.8_1.9.1-4_armhf.deb
|
||||
hold:
|
||||
- firmware-atheros
|
||||
- firmware-brcm80211
|
||||
- firmware-libertas
|
||||
- firmware-misc-nonfree
|
||||
- firmware-realtek
|
||||
- libpcap-dev
|
||||
- libpcap0.8
|
||||
- libpcap0.8-dev
|
||||
@ -292,7 +287,10 @@
|
||||
###############################################################
|
||||
# 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
|
||||
- name: build and install nexmon as needed
|
||||
include_tasks: nexmon.yml
|
||||
@ -355,7 +353,7 @@
|
||||
- "{{ lookup('fileglob', '/usr/local/src/pwnagotchi/dist/pwnagotchi*.whl') }}"
|
||||
- "{{ packages.torch.url }}"
|
||||
- "{{ packages.torchvision.url }}"
|
||||
extra_args: "--no-cache-dir"
|
||||
extra_args: "--no-cache-dir --break-system-packages"
|
||||
environment:
|
||||
QEMU_CPU: arm1176
|
||||
QEMU_UNAME: "{{ kernel.full }}"
|
||||
|
@ -6,7 +6,7 @@
|
||||
vars:
|
||||
kernel:
|
||||
min: "6.1"
|
||||
full: "6.1.21-v8+"
|
||||
full: "6.1.0-rpi7-rpi-v8"
|
||||
pwnagotchi:
|
||||
hostname: "{{ lookup('env', 'PWN_HOSTNAME') | default('pwnagotchi', true) }}"
|
||||
version: "{{ lookup('env', 'PWN_VERSION') | default('pwnagotchi-torch', true) }}"
|
||||
@ -43,9 +43,9 @@
|
||||
source: "https://github.com/jayofelony/caplets.git"
|
||||
bettercap:
|
||||
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"
|
||||
opwngrid:
|
||||
pwngrid:
|
||||
source: "https://github.com/jayofelony/pwngrid.git"
|
||||
url: "https://github.com/jayofelony/pwngrid/releases/download/v1.10.5/pwngrid-1.10.5-aarch64.zip"
|
||||
apt:
|
||||
@ -55,11 +55,6 @@
|
||||
- libpcap0.8-dev_1.9.1-4_arm64.deb
|
||||
- libpcap0.8_1.9.1-4_arm64.deb
|
||||
hold:
|
||||
- firmware-atheros
|
||||
- firmware-brcm80211
|
||||
- firmware-libertas
|
||||
- firmware-misc-nonfree
|
||||
- firmware-realtek
|
||||
- libpcap-dev
|
||||
- libpcap0.8
|
||||
- libpcap0.8-dev
|
||||
@ -89,8 +84,8 @@
|
||||
- gcc-arm-none-eabi
|
||||
- git
|
||||
- libatlas-base-dev
|
||||
- libavcodec58
|
||||
- libavformat58
|
||||
- libavcodec59
|
||||
- libavformat59
|
||||
- libblas-dev
|
||||
- libbluetooth-dev
|
||||
- libbz2-dev
|
||||
@ -124,17 +119,32 @@
|
||||
- libsqlite3-dev
|
||||
- libssl-dev
|
||||
- libswscale5
|
||||
- libtiff5
|
||||
- libtiff6
|
||||
- libtool
|
||||
- libusb-1.0-0-dev
|
||||
- lsof
|
||||
- make
|
||||
- python3-yaml
|
||||
- python3-dbus
|
||||
- python3-flask
|
||||
- python3-flask-cors
|
||||
- python3-flaskext.wtf
|
||||
- python3-gast
|
||||
- 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-setuptools
|
||||
- python3-smbus
|
||||
- qpdf
|
||||
- raspberrypi-kernel-headers
|
||||
@ -341,7 +351,7 @@
|
||||
- name: install pwnagotchi wheel and dependencies
|
||||
pip:
|
||||
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)
|
||||
|
||||
- name: remove pwnagotchi folder
|
||||
@ -370,28 +380,28 @@
|
||||
export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin
|
||||
when: golang.changed
|
||||
|
||||
- name: download opwngrid
|
||||
- name: download pwngrid
|
||||
git:
|
||||
repo: "{{ packages.opwngrid.source }}"
|
||||
dest: /usr/local/src/opwngrid
|
||||
repo: "{{ packages.pwngrid.source }}"
|
||||
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"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
chdir: /usr/local/src/opwngrid
|
||||
chdir: /usr/local/src/pwngrid
|
||||
|
||||
- name: remove opwngrid folder
|
||||
- name: remove pwngrid folder
|
||||
file:
|
||||
state: absent
|
||||
path: /usr/local/src/opwngrid
|
||||
path: /usr/local/src/pwngrid
|
||||
|
||||
- name: download bettercap
|
||||
git:
|
||||
repo: "{{ packages.bettercap.source }}"
|
||||
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"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
|
@ -3,15 +3,15 @@ import secrets
|
||||
import logging
|
||||
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_cors import CORS
|
||||
from flask_wtf.csrf import CSRFProtect
|
||||
|
||||
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:
|
||||
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
|
||||
shimmy; platform_machine!="armv6l"
|
||||
pycryptodome
|
||||
requests
|
||||
PyYAML
|
||||
scapy
|
||||
tweepy
|
||||
file-read-backwards
|
||||
inky
|
||||
smbus2
|
||||
OPi.GPIO; platform_release=="6.1.31-sun50iw9"
|
||||
Pillow
|
||||
spidev
|
||||
gast
|
||||
PyYAML
|
||||
RPi.GPIO; platform_release!="6.1.31-sun50iw9"
|
||||
file-read-backwards
|
||||
flask
|
||||
flask-cors
|
||||
flask-wtf
|
||||
dbus-python
|
||||
toml
|
||||
python-dateutil
|
||||
websockets
|
||||
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"
|
||||
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
|
Reference in New Issue
Block a user