Merge branch 'pwnagotchi-torch-64' into pwnagotchi-torch-testing

This commit is contained in:
Jeroen Oudshoorn
2023-10-21 08:20:38 +02:00
37 changed files with 232 additions and 259 deletions

View File

@ -49,8 +49,15 @@ denyinterfaces wlan0
interface eth0
static domain_name_servers=8.8.8.8 1.1.1.1
metric=202
interface usb0
static ip_address=10.0.0.2/24
static routers=10.0.0.1
static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1
static domain_name_servers=10.0.0.1 8.8.8.8 1.1.1.1
metric=203
interface bnep0
metric=204
interface lo

View File

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

View File

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

View File

@ -1,8 +0,0 @@
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 203

View File

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

View File

@ -1,5 +0,0 @@
main.plugins.age.enabled = false
main.plugins.age.age_x_coord = 0
main.plugins.age.age_y_coord = 32
main.plugins.age.str_x_coord = 67
main.plugins.age.str_y_coord = 32

View File

@ -1,3 +0,0 @@
main.plugins.auto-update.enabled = true
main.plugins.auto-update.install = true
main.plugins.auto-update.interval = 1

View File

@ -1,23 +0,0 @@
main.plugins.bt-tether.enabled = false
main.plugins.bt-tether.devices.android-phone.enabled = false
main.plugins.bt-tether.devices.android-phone.search_order = 1
main.plugins.bt-tether.devices.android-phone.mac = ""
main.plugins.bt-tether.devices.android-phone.ip = "192.168.44.44"
main.plugins.bt-tether.devices.android-phone.netmask = 24
main.plugins.bt-tether.devices.android-phone.interval = 1
main.plugins.bt-tether.devices.android-phone.scantime = 10
main.plugins.bt-tether.devices.android-phone.max_tries = 10
main.plugins.bt-tether.devices.android-phone.share_internet = false
main.plugins.bt-tether.devices.android-phone.priority = 1
main.plugins.bt-tether.devices.ios-phone.enabled = false
main.plugins.bt-tether.devices.ios-phone.search_order = 2
main.plugins.bt-tether.devices.ios-phone.mac = ""
main.plugins.bt-tether.devices.ios-phone.ip = "172.20.10.6"
main.plugins.bt-tether.devices.ios-phone.netmask = 24
main.plugins.bt-tether.devices.ios-phone.interval = 5
main.plugins.bt-tether.devices.ios-phone.scantime = 20
main.plugins.bt-tether.devices.ios-phone.max_tries = 0
main.plugins.bt-tether.devices.ios-phone.share_internet = false
main.plugins.bt-tether.devices.ios-phone.priority = 999

View File

@ -1 +0,0 @@
main.plugins.fix_services.enabled = true

View File

@ -1,4 +0,0 @@
main.plugins.gdrivesync.enabled = false
main.plugins.gdrivesync.backupfiles = ['']
main.plugins.gdrivesync.backup_folder = "PwnagotchiBackups"
main.plugin.gdrivesync.interval = 1

View File

@ -1 +0,0 @@
main.plugins.gpio_buttons.enabled = false

View File

@ -1,3 +0,0 @@
main.plugins.gps.enabled = false
main.plugins.gps.speed = 19200
main.plugins.gps.device = "/dev/ttyUSB0"

View File

@ -1,5 +0,0 @@
main.plugins.grid.enabled = true
main.plugins.grid.report = true
main.plugins.grid.exclude = [
"YourHomeNetworkHere"
]

View File

@ -1,2 +0,0 @@
main.plugins.logtail.enabled = false
main.plugins.logtail.max-lines = 10000

View File

@ -1,3 +0,0 @@
main.plugins.memtemp.enabled = false
main.plugins.memtemp.scale = "celsius"
main.plugins.memtemp.orientation = "horizontal"

View File

@ -1,2 +0,0 @@
main.plugins.net-pos.enabled = false
main.plugins.net-pos.api_key = "test"

View File

@ -1,5 +0,0 @@
main.plugins.onlinehashcrack.enabled = false
main.plugins.onlinehashcrack.email = ""
main.plugins.onlinehashcrack.dashboard = ""
main.plugins.onlinehashcrack.single_files = false
main.plugins.onlinehashcrack.whitelist = []

View File

@ -1,2 +0,0 @@
main.plugins.paw-gps.enabled = false
main.plugins.paw-gps.ip = "192.168.44.1:8080"

View File

@ -1,3 +0,0 @@
main.plugins.pisugar2.enabled = false
main.plugins.pisugar2.shutdown = 5
main.plugins.pisugar2.sync_rtc_on_boot = false

View File

@ -1,2 +0,0 @@
main.plugins.session-stats.enabled = true
main.plugins.session-stats.save_directory = "/var/tmp/pwnagotchi/sessions/"

View File

@ -1,5 +0,0 @@
main.plugins.ups_hat_c.enabled = false
main.plugins.ups_hat_c.label_on = true # show BAT label or just percentage
main.plugins.ups_hat_c.shutdown = 5 # battery percent at which the device will turn off
main.plugins.ups_hat_c.bat_x_coord = 140
main.plugins.ups_hat_c.bat_y_coord = 0

View File

@ -1,2 +0,0 @@
main.plugins.ups_lite.enabled = false
main.plugins.ups_lite.shutdown = 2

View File

@ -1 +0,0 @@
main.plugins.webcfg.enabled = true

View File

@ -1 +0,0 @@
main.plugins.webgpsmap.enabled = false

View File

@ -1,4 +0,0 @@
main.plugins.wigle.enabled = false
main.plugins.wigle.api_key = ""
main.plugins.wigle.whitelist = []
main.plugins.wigle.donate = true

View File

@ -1,5 +0,0 @@
main.plugins.wpa-sec.enabled = false
main.plugins.wpa-sec.api_key = ""
main.plugins.wpa-sec.api_url = "https://wpa-sec.stanev.org"
main.plugins.wpa-sec.download_results = false
main.plugins.wpa-sec.whitelist = []

View File

@ -8,6 +8,8 @@ echo " Hi! I'm a pwnagotchi $_version, please take good care of me!"
echo " Here are some basic things you need to know to raise me properly!"
echo
echo " If you want to change my configuration, use /etc/pwnagotchi/config.toml"
echo " All plugin config files are located in /etc/pwnagotchi/conf.d/"
echo " Read the readme if you want to use gdrivesync plugin!!"
echo
echo " All the configuration options can be found on /etc/pwnagotchi/default.toml,"
echo " but don't change this file because I will recreate it every time I'm restarted!"

View File

@ -0,0 +1,15 @@
client_config_backend: file
client_config_file: /root/client_secrets.json
client_config:
client_id: <YOUR CLIENT ID>
client_secret: <YOUR CLIENT SECRET>
save_credentials: True
save_credentials_backend: file
save_credentials_file: /root/credentials.json
get_refresh_token: True
oauth_scope:
- https://www.googleapis.com/auth/drive
- https://www.googleapis.com/auth/drive.install

View File

@ -37,7 +37,6 @@ reload_brcm() {
# starts mon0
start_monitor_interface() {
rfkill unblock all
ifconfig wlan0 up
iw dev wlan0 set power_save off
airmon-ng check kill

View File

@ -49,26 +49,6 @@
"source": "../builder/data/usr/bin/hdmioff",
"destination": "/usr/bin/hdmioff"
},
{
"type": "file",
"source": "../builder/data/etc/network/interfaces.d/lo-cfg",
"destination": "/etc/network/interfaces.d/lo-cfg"
},
{
"type": "file",
"source": "../builder/data/etc/network/interfaces.d/wlan0-cfg",
"destination": "/etc/network/interfaces.d/wlan0-cfg"
},
{
"type": "file",
"source": "../builder/data/etc/network/interfaces.d/usb0-cfg",
"destination": "/etc/network/interfaces.d/usb0-cfg"
},
{
"type": "file",
"source": "../builder/data/etc/network/interfaces.d/eth0-cfg",
"destination": "/etc/network/interfaces.d/eth0-cfg"
},
{
"type": "file",
"source": "../builder/data/etc/systemd/system/pwngrid-peer.service",

View File

@ -204,161 +204,62 @@
executable: /bin/bash
chdir: /usr/local/src/nexmon/
#- name: choose the right kernel version (bcm43455c0)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
# backup: no
# regexp: "KERNEL_VERSION = .*$"
# replace: "KERNEL_VERSION = {{ kernel.min }}"
#- name: choose the right kernel release (variable) (bcm43455c0)
# lineinfile:
# dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
# insertafter: "DRIVER_FOLDER_NAME = .*$"
# line: "KERNEL_RELEASE = {{ kernel.full }}"
#- name: choose the right kernel arch (bcm43455c0)
# lineinfile:
# dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
# insertafter: "KERNEL_RELEASE = .*$"
# line: "KERNEL_ARCH = {{ kernel.arch }}"
#- name: choose the right kernel arch (replace string) (bcm43455c0)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
# backup: no
# regexp: "shell uname -m"
# replace: "KERNEL_ARCH"
#- name: choose the right kernel release (replace string) (bcm43455c0)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
# backup: no
# regexp: "shell uname -r"
# replace: "KERNEL_RELEASE"
- name: make firmware patch (bcm43455c0)
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make && make install-firmware"
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make"
args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
#- name: install new firmware (bcm43455c0)
# copy:
# src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin
# dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin
# follow: true
#- name: choose the right kernel version (bcm43436b0)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
# backup: no
# regexp: "KERNEL_VERSION = .*$"
# replace: "KERNEL_VERSION = {{ kernel.min }}"
#- name: choose the right kernel release (variable) (bcm43436b0)
# lineinfile:
# dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
# insertafter: "DRIVER_FOLDER_NAME = .*$"
# line: "KERNEL_RELEASE = {{ kernel.full }}"
#- name: choose the right kernel arch (bcm43436b0)
# lineinfile:
# dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
# insertafter: "KERNEL_RELEASE = .*$"
# line: "KERNEL_ARCH = {{ kernel.arch }}"
#- name: choose the right kernel arch (bcm43436b0)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
# backup: no
# regexp: "shell uname -m"
# replace: "KERNEL_ARCH"
#- name: choose the right kernel release (replace string) (bcm43436b0)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
# backup: no
# regexp: "shell uname -r"
# replace: "KERNEL_RELEASE"
- name: install new firmware (bcm43455c0)
copy:
src: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/brcmfmac43455-sdio.bin
dest: /usr/lib/firmware/brcm/brcmfmac43455-sdio.bin
follow: true
- name: make firmware patch (bcm43436b0)
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make && make install-firmware"
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make"
args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
#- name: install new firmware (bcm43436b0)
# copy:
# src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin
# dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin
# follow: true
#- name: choose the right kernel version (bcm43430a1)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
# backup: no
# regexp: "KERNEL_VERSION = .*$"
# replace: "KERNEL_VERSION = {{ kernel.min }}"
#- name: choose the right kernel release (variable) (bcm43430a1)
# lineinfile:
# dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
# insertafter: "DRIVER_FOLDER_NAME = .*$"
# line: "KERNEL_RELEASE = {{ kernel.full }}"
#- name: choose the right kernel arch (bcm43430a1)
# lineinfile:
# dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
# insertafter: "KERNEL_RELEASE = .*$"
# line: "KERNEL_ARCH = {{ kernel.arch }}"
#- name: choose the right kernel arch (bcm43430a1)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
# backup: no
# regexp: "shell uname -m"
# replace: "KERNEL_ARCH"
#- name: choose the right kernel release (replace string) (bcm43430a1)
# replace:
# dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
# backup: no
# regexp: "shell uname -r"
# replace: "KERNEL_RELEASE"
- name: install new firmware (bcm43436b0)
copy:
src: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/brcmfmac43436-sdio.bin
dest: /usr/lib/firmware/brcm/brcmfmac43436-sdio.bin
follow: true
- name: make firmware patch (bcm43430a1)
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make && make install-firmware"
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make"
args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
#- 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: 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
# copy:
# src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
# dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin
# follow: true
- name: copy 43430-sdio as 43436s-sdio for the special 43430/1 /2
copy:
src: /usr/lib/firmware/brcm/brcmfmac43430-sdio.bin
dest: /usr/lib/firmware/brcm/brcmfmac43436s-sdio.bin
follow: true
#- name: Delete the firmware blob to avoid it crashing
# file:
# state: absent
# path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
- name: Delete the firmware blob to avoid it crashing
file:
state: absent
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.clm_blob
#- name: Delete the RPiZW firmware blob to avoid it crashing
# file:
# state: absent
# path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob
- name: Delete the RPiZW firmware blob to avoid it crashing
file:
state: absent
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,model-zero-w.clm_blob
#- name: Delete the RPi3 firmware blob to avoid it crashing
# file:
# state: absent
# path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.clm_blob
- name: Delete the RPi3 firmware blob to avoid it crashing
file:
state: absent
path: /usr/lib/firmware/brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.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"
@ -415,10 +316,9 @@
path: /usr/local/share/pwnagotchi/
state: directory
# Install go-1.20.6
- name: Install go-1.21
unarchive:
src: https://go.dev/dl/go1.21.1.linux-arm64.tar.gz
src: https://go.dev/dl/go1.21.3.linux-arm64.tar.gz
dest: /usr/local
remote_src: yes
register: golang
@ -495,6 +395,8 @@
if ! /opt/vc/bin/tvservice -s | egrep 'HDMI|DVI'; then
/opt/vc/bin/tvservice -o
fi
rfkill unblock all
- name: create /etc/pwnagotchi folder
file:
@ -561,6 +463,12 @@
regexp: '(.*)$'
line: '\1 modules-load=dwc2,g_ether'
- name: rfkill unblock all at boot
lineinfile:
dest: /boot/cmdline.txt
insertafter: EOF
line: "systemd.restore_state=0 rfkill.default_state=1"
- name: Add pwnlog alias
lineinfile:
dest: /home/pi/.bashrc
@ -628,10 +536,25 @@
when: removed.changed
- name: apt clean
shell: "apt clean"
shell: "apt-get clean"
args:
executable: /bin/bash
- name: remove /root/go folder
file:
state: absent
path: /root/go
- name: remove /usr/local/go folder
file:
state: absent
path: /usr/local/go
- name: remove pip cache
file:
state: absent
path: /root/.cache/pip
- name: remove dependencies that are no longer required
apt:
autoremove: yes