Compare commits

..

18 Commits

Author SHA1 Message Date
611a3e7fb5 fix for waveshare3in7.py 2024-02-15 20:51:55 +01:00
599c6211e4 version 2.8.4 2024-02-15 20:48:27 +01:00
eb48d29851 fix on 38 displays 2024-02-15 20:46:48 +01:00
0999b95be0 update build 2024-02-15 09:55:01 +01:00
ae351e5e9c update waveshare3in0g.py 2024-02-15 09:54:49 +01:00
fa58136c0e update waveshare3in7.py 2024-02-15 09:34:45 +01:00
3d5185f2c1 update waveshare3in7.py 2024-02-15 09:30:03 +01:00
b6bb7b9080 update waveshare3in7.py 2024-02-15 09:26:33 +01:00
20715351af revert back to drschottky 2024-02-14 08:53:54 +01:00
1d3c781d12 version 2.8.3 2024-02-13 23:25:55 +01:00
bd51b4330f version 2.8.3 2024-02-13 23:15:05 +01:00
f216a21132 update 2024-02-13 23:13:49 +01:00
5ae357c3dc Merge remote-tracking branch 'origin/master' 2024-02-13 23:11:10 +01:00
ed9afe6856 Revert "Changed from dphys-swapfile to zram-tools"
This reverts commit 26913016b9.
2024-02-13 23:10:53 +01:00
25d932fa9b Revert "zramswap"
This reverts commit 0dbd611ed5.
2024-02-13 23:10:52 +01:00
ebd25d50b0 Update README.md 2024-02-09 23:13:26 +01:00
27e784a5d7 update 2024-02-09 13:12:40 +01:00
c02efb5224 update Makefile 2024-02-09 13:11:02 +01:00
49 changed files with 116 additions and 95 deletions

1
.github/FUNDING.yml vendored
View File

@ -1,4 +1,3 @@
# These are supported funding model platforms
patreon: pwnagotchi_torch
github: jayofelony

View File

@ -1,4 +1,4 @@
PACKER_VERSION := 1.10.0
PACKER_VERSION := 1.10.1
PWN_HOSTNAME := pwnagotchi
PWN_VERSION := $(shell cut -d"'" -f2 < pwnagotchi/_version.py)

View File

@ -8,7 +8,7 @@ The RPi5 can only be used headless currently. (without display.)
If you are using an older 32-bit version Raspberry Pi, ZeroWH, use this [fork](https://github.com/jayofelony/pwnagotchi-torch/releases/tag/v2.6.4) and make sure you download the `armhf` version.
---
Download the latest image file [here](https://github.com/jayofelony/pwnagotchi-bookworm/releases/tag/v2.7.9), and let it auto-update from here on out.
Download the latest image file [here](https://github.com/jayofelony/pwnagotchi-bookworm/releases/tag/v2.8.2), and let it auto-update from here on out.
**Use RPi imager to flash, please don't flash a new user as this will mess with logs created.**
- Select `Use Custom Image`

View File

@ -1,15 +0,0 @@
# Specifies amount of zram devices to create.
# By default, zramswap-start will use all available cores.
#CORES=1
# Specifies the amount of RAM that should be used for zram
# based on a percentage the total amount of available memory
PERCENTAGE=60
# Specifies a static amount of RAM that should be used for
# the ZRAM devices, this is in MiB
#ALLOCATION=256
# Specifies the priority for the swap devices, see swapon(2)
# for more details.
#PRIORITY=100

View File

@ -0,0 +1,26 @@
# /etc/dphys-swapfile - user settings for dphys-swapfile package
# author Neil Franklin, last modification 2010.05.05
# copyright ETH Zuerich Physics Departement
# use under either modified/non-advertising BSD or GPL license
# this file is sourced with . so full normal sh syntax applies
# the default settings are added as commented out CONF_*=* lines
# where we want the swapfile to be, this is the default
#CONF_SWAPFILE=/var/swap
# set size to absolute value, leaving empty (default) then uses computed value
# you most likely don't want this, unless you have an special disk situation
CONF_SWAPSIZE=2048
# set size to computed value, this times RAM size, dynamically adapts,
# guarantees that there is enough swap without wasting disk space on excess
#CONF_SWAPFACTOR=2
# restrict size (computed and absolute!) to maximally this limit
# can be set to empty for no limit, but beware of filled partitions!
# this is/was a (outdated?) 32bit kernel limit (in MBytes), do not overrun it
# but is also sensible on 64bit to prevent filling /var or even / partition
#CONF_MAXSWAP=2048

View File

@ -5,4 +5,4 @@ iface usb0 inet static
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.1
metric 101
metric 101

View File

@ -1,6 +1,6 @@
[Unit]
Description=pwnagotchi Deep Reinforcement Learning instrumenting bettercap for WiFI pwning.
Documentation=https://pwnagotchi.ai
Documentation=https://pwnagotchi.org
Wants=network.target
After=pwngrid-peer.service
@ -8,6 +8,7 @@ After=pwngrid-peer.service
Type=simple
WorkingDirectory=~
ExecStart=/usr/bin/pwnagotchi-launcher
ExecStopPost=/usr/bin/bash -c "if egrep -qi 'personality.clear_on_exit[ =]*true' /etc/pwnagotchi/config.toml ; then /usr/local/bin/pwnagotchi --clear; fi"
Restart=always
RestartSec=30
TasksMax=infinity

View File

@ -74,10 +74,6 @@ build {
inline = ["chmod +x /usr/bin/*"]
}
provisioner "shell" {
inline = ["dpkg --add-architecture armhf"]
}
provisioner "file" {
destination = "/etc/systemd/system/"
sources = [

View File

@ -27,7 +27,6 @@
- fstrim.timer
- pwnagotchi.service
- pwngrid-peer.service
- zramswap.service
disable:
- apt-daily-upgrade.service
- apt-daily-upgrade.timer
@ -40,7 +39,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.2/bettercap-2.32.2.zip"
url: "https://github.com/jayofelony/bettercap/releases/download/2.32.4/bettercap-2.32.4.zip"
ui: "https://github.com/bettercap/ui/releases/download/v1.3.0/ui.zip"
pwngrid:
source: "https://github.com/jayofelony/pwngrid.git"
@ -78,6 +77,7 @@
- build-essential
- curl
- dkms
- dphys-swapfile
- fbi
- firmware-atheros
- firmware-brcm80211
@ -102,7 +102,6 @@
- libbz2-dev
- libc-ares-dev
- libc6-dev
- libc6:armhf
- libcap-dev
- libcurl-ocaml-dev
- libdbus-1-dev
@ -117,10 +116,7 @@
- libgmp3-dev
- libgstreamer1.0-0
- libhdf5-dev
- libisl23:armhf
- liblapack-dev
- libmpc3:armhf
- libmpfr6:armhf
- libncursesw5-dev
- libnetfilter-queue-dev
- libopenblas-dev
@ -135,7 +131,6 @@
- libsqlite3-dev
- libssl-dev
- libssl-ocaml-dev
- libstdc++6:armhf
- libswscale5
- libtiff6
- libtool
@ -173,10 +168,8 @@
- wl
- xxd
- zlib1g-dev
- zram-tools
environment:
ARCHFLAGS: "-arch aarch64"
QEMU_UNAME: "{{ kernel.full }}"
tasks:
# First we install packages
@ -298,22 +291,9 @@
state: absent
path: /usr/local/src/hcxtools
# Install nexmon to fix wireless scanning (takes 2.5G of space)
- name: symlink 1
file:
src: "/usr/lib/arm-linux-gnueabihf/libisl.so.23.2.0"
dest: "/usr/lib/arm-linux-gnueabihf/libisl.so.10"
state: link
- name: symlink 2
file:
src: "/usr/lib/arm-linux-gnueabihf/libmpfr.so.6.2.0"
dest: "/usr/lib/arm-linux-gnueabihf/libmpfr.so.4"
state: link
- name: clone nexmon repository
git:
repo: https://github.com/seemoo-lab/nexmon.git
repo: https://github.com/DrSchottky/nexmon.git
dest: /usr/local/src/nexmon
# FIRST WE BUILD DRIVER FOR RPi5
@ -366,7 +346,7 @@
- name: clone nexmon repository
git:
repo: https://github.com/seemoo-lab/nexmon.git
repo: https://github.com/DrSchottky/nexmon.git
dest: /usr/local/src/nexmon
- name: make firmware, RPi4
@ -534,7 +514,7 @@
repo: "{{ packages.bettercap.source }}"
dest: /usr/local/src/bettercap
- name: install bettercap 2.32.2
- name: install bettercap 2.32.4
shell: "export GOPATH=$HOME/go && export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin && go mod tidy && make && make install"
args:
executable: /bin/bash

View File

@ -1 +1 @@
__version__ = '2.8.2'
__version__ = '2.8.4'

View File

@ -156,6 +156,8 @@ personality.bond_encounters_factor = 20000
personality.throttle_a = 0.4
personality.throttle_d = 0.9
personality.clear_on_exit = true # clear display when shutting down cleanly
ui.fps = 0.0
ui.font.name = "DejaVuSansMono" # for japanese: fonts-japanese-gothic
ui.font.size_offset = 0 # will be added to the font size

View File

@ -12,6 +12,7 @@ from . import config
from . import LCD_1in44
from PIL import ImageOps
class EPD(object):
def __init__(self):
self.width = 128
@ -24,9 +25,8 @@ class EPD(object):
pass
def clear(self):
#self.LCD.LCD_Clear()
pass
self.LCD.LCD_Clear()
def display(self, image):
rgb_im = ImageOps.colorize(image.convert("L"), black ="green", white ="black")
rgb_im = ImageOps.colorize(image.convert("L"), black="green", white="black")
self.LCD.LCD_ShowImage(rgb_im, 0, 0)

View File

@ -38,7 +38,8 @@ class Waveshare13in3k(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare1in02(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -39,7 +39,7 @@ class Waveshare154(DisplayImpl):
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
self._display.display(buf)
def clear(self):
# pass

View File

@ -39,7 +39,7 @@ class Waveshare154V2(DisplayImpl):
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare1in54c(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare1in64g(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare2in36g(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -34,11 +34,12 @@ class Waveshare2in66(DisplayImpl):
logging.info("initializing waveshare 2.66 inch lcd display")
from pwnagotchi.ui.hw.libs.waveshare.v2in66.epd2in66 import EPD
self._display = EPD()
self._display.init(0)
self._display.init(1)
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare2in66g(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -39,7 +39,7 @@ class Waveshare27b(DisplayImpl):
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.display(buf)
self._display.display(buf, None)
def clear(self):
self._display.Clear(0xff)

View File

@ -39,7 +39,7 @@ class Waveshare27bV2(DisplayImpl):
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.display(buf)
self._display.display(buf, None)
def clear(self):
self._display.Clear(0xff)

View File

@ -35,12 +35,12 @@ class Waveshare29bV3(DisplayImpl):
from pwnagotchi.ui.hw.libs.waveshare.v2in9b_v3.epd2in9b_V3 import EPD
self._display = EPD()
self._display.init()
self._display.Clear(0xFF)
self._display.Clear()
self._display.init()
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.display(buf)
self._display.display(buf, None)
def clear(self):
self._display.Clear(0xFF)
self._display.Clear()

View File

@ -35,12 +35,12 @@ class Waveshare29bV4(DisplayImpl):
from pwnagotchi.ui.hw.libs.waveshare.v2in9b_v4.epd2in9b_V4 import EPD
self._display = EPD()
self._display.init()
self._display.Clear(0xFF)
self._display.Clear()
self._display.init()
def render(self, canvas):
buf = self._display.getbuffer(canvas)
self._display.display(buf)
self._display.display(buf, None)
def clear(self):
self._display.Clear(0xFF)
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare2in9bc(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare2in9d(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare3in0g(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -36,9 +36,11 @@ class Waveshare3in7(DisplayImpl):
self._display = EPD()
self._display.init(0)
self._display.Clear(0)
self._display.init(1) # 1Gray mode
def render(self, canvas):
self._display.display_4Gray(canvas)
buf = self._display.getbuffer(canvas)
self._display.display_1Gray(buf)
def clear(self):
self._display.Clear(0)

View File

@ -38,7 +38,8 @@ class Waveshare4in01f(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare4in2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare4in26(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare4in2V2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare4in2bV2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare4in2bc(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare4in37g(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare5in65f(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare5in83(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare5in83V2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare5in83bV2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare5in83bc(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in3f(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in3g(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in5(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in5HD(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -51,7 +51,8 @@ class Waveshare7in5V2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in5bHD(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in5bV2(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()

View File

@ -38,7 +38,8 @@ class Waveshare7in5bc(DisplayImpl):
self._display.Clear()
def render(self, canvas):
self._display.display(canvas)
buf = self._display.getbuffer(canvas)
self._display.display(buf, None)
def clear(self):
self._display.Clear()