mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (pwnagotchi)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10" project-jdk-type="Python SDK" />
|
||||||
</project>
|
</project>
|
2
.idea/pwnagotchi.iml
generated
2
.idea/pwnagotchi.iml
generated
@ -4,7 +4,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="jdk" jdkName="Python 3.10" jdkType="Python SDK" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PyDocumentationSettings">
|
<component name="PyDocumentationSettings">
|
||||||
|
2
Makefile
2
Makefile
@ -55,7 +55,7 @@ $(PWN_RELEASE).img: $(SDIST) builder/pwnagotchi.json builder/pwnagotchi.yml $(sh
|
|||||||
sudo $(PACKER) plugins install github.com/solo-io/arm-image
|
sudo $(PACKER) plugins install github.com/solo-io/arm-image
|
||||||
cd builder && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json
|
cd builder && sudo $(UNSHARE) $(PACKER) build -var "pwn_hostname=$(PWN_HOSTNAME)" -var "pwn_version=$(PWN_VERSION)" pwnagotchi.json
|
||||||
sudo chown -R $$USER:$$USER builder/images
|
sudo chown -R $$USER:$$USER builder/images
|
||||||
mv builder/images ../../../../
|
mv builder/images/* ../../../
|
||||||
|
|
||||||
# If any of these files are updated, rebuild the checksums.
|
# If any of these files are updated, rebuild the checksums.
|
||||||
$(PWN_RELEASE).sha256: $(PWN_RELEASE).img
|
$(PWN_RELEASE).sha256: $(PWN_RELEASE).img
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
gather_facts: true
|
gather_facts: true
|
||||||
become: true
|
become: true
|
||||||
vars:
|
vars:
|
||||||
|
kernel:
|
||||||
|
min: "6.1"
|
||||||
|
full: "6.1.21-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) }}"
|
||||||
@ -62,7 +65,7 @@
|
|||||||
- libraspberrypi-dev
|
- libraspberrypi-dev
|
||||||
- libraspberrypi-doc
|
- libraspberrypi-doc
|
||||||
- libraspberrypi-bin
|
- libraspberrypi-bin
|
||||||
- golang
|
- ansible
|
||||||
install:
|
install:
|
||||||
- bluez
|
- bluez
|
||||||
- raspberrypi-kernel-headers
|
- raspberrypi-kernel-headers
|
||||||
@ -211,13 +214,13 @@
|
|||||||
dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
|
dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
|
||||||
backup: no
|
backup: no
|
||||||
regexp: "KERNEL_VERSION = .*$"
|
regexp: "KERNEL_VERSION = .*$"
|
||||||
replace: "KERNEL_VERSION = 6.1"
|
replace: "KERNEL_VERSION = {{ kernel.min }}"
|
||||||
|
|
||||||
- name: choose the right kernel release (variable) (bcm43436b0)
|
- name: choose the right kernel release (variable) (bcm43436b0)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
|
dest: /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/Makefile
|
||||||
insertafter: "DRIVER_FOLDER_NAME = .*$"
|
insertafter: "DRIVER_FOLDER_NAME = .*$"
|
||||||
line: "KERNEL_RELEASE = 6.1.21-v8+"
|
line: "KERNEL_RELEASE = {{ kernel.full }}"
|
||||||
|
|
||||||
- name: choose the right kernel release (replace string) (bcm43436b0)
|
- name: choose the right kernel release (replace string) (bcm43436b0)
|
||||||
replace:
|
replace:
|
||||||
@ -243,13 +246,13 @@
|
|||||||
dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
|
dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
|
||||||
backup: no
|
backup: no
|
||||||
regexp: "KERNEL_VERSION = .*$"
|
regexp: "KERNEL_VERSION = .*$"
|
||||||
replace: "KERNEL_VERSION = 6.1"
|
replace: "KERNEL_VERSION = {{ kernel.min }}"
|
||||||
|
|
||||||
- name: choose the right kernel release (variable) (bcm43430a1)
|
- name: choose the right kernel release (variable) (bcm43430a1)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
|
dest: /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/Makefile
|
||||||
insertafter: "DRIVER_FOLDER_NAME = .*$"
|
insertafter: "DRIVER_FOLDER_NAME = .*$"
|
||||||
line: "KERNEL_RELEASE = 6.1.21-v8+"
|
line: "KERNEL_RELEASE = {{ kernel.full }}"
|
||||||
|
|
||||||
- name: choose the right kernel release (replace string) (bcm43430a1)
|
- name: choose the right kernel release (replace string) (bcm43430a1)
|
||||||
replace:
|
replace:
|
||||||
@ -294,13 +297,13 @@
|
|||||||
dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
|
dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
|
||||||
backup: no
|
backup: no
|
||||||
regexp: "KERNEL_VERSION = .*$"
|
regexp: "KERNEL_VERSION = .*$"
|
||||||
replace: "KERNEL_VERSION = 6.1"
|
replace: "KERNEL_VERSION = {{ kernel.min }}"
|
||||||
|
|
||||||
- name: choose the right kernel release (variable) (bcm43455c0)
|
- name: choose the right kernel release (variable) (bcm43455c0)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
|
dest: /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/Makefile
|
||||||
insertafter: "DRIVER_FOLDER_NAME = .*$"
|
insertafter: "DRIVER_FOLDER_NAME = .*$"
|
||||||
line: "KERNEL_RELEASE = 6.1.21-v8+"
|
line: "KERNEL_RELEASE = {{ kernel.full }}"
|
||||||
|
|
||||||
- name: choose the right kernel release (replace string) (bcm43455c0)
|
- name: choose the right kernel release (replace string) (bcm43455c0)
|
||||||
replace:
|
replace:
|
||||||
@ -322,16 +325,16 @@
|
|||||||
|
|
||||||
- name: backup original driver
|
- name: backup original driver
|
||||||
copy:
|
copy:
|
||||||
src: /usr/lib/modules/6.1.21-v8+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz
|
src: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz"
|
||||||
dest: /usr/lib/modules/6.1.21-v8+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig
|
dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko.xz.orig"
|
||||||
|
|
||||||
- name: copy modified driver
|
- name: copy modified driver
|
||||||
copy:
|
copy:
|
||||||
src: /usr/local/src/nexmon/patches/driver/brcmfmac_6.1.y-nexmon/brcmfmac.ko
|
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
|
||||||
dest: /usr/lib/modules/6.1.21-v8+/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko
|
dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
||||||
|
|
||||||
- name : load brcmfmac drivers
|
- name : load brcmfmac drivers
|
||||||
command: "/sbin/depmod -A -b -F System.map 6.1.21-v8+"
|
command: "/sbin/depmod -a {{ kernel.full }}"
|
||||||
|
|
||||||
# To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation
|
# To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation
|
||||||
- name: Delete nexmon content & directory
|
- name: Delete nexmon content & directory
|
||||||
@ -339,7 +342,7 @@
|
|||||||
state: absent
|
state: absent
|
||||||
path: /usr/local/src/nexmon/
|
path: /usr/local/src/nexmon/
|
||||||
|
|
||||||
- name: Creates custom plugin directory
|
- name: Create custom plugin directory
|
||||||
file:
|
file:
|
||||||
path: /usr/local/share/pwnagotchi/custom-plugins/
|
path: /usr/local/share/pwnagotchi/custom-plugins/
|
||||||
state: directory
|
state: directory
|
||||||
@ -516,51 +519,13 @@
|
|||||||
regexp: '(.*)$'
|
regexp: '(.*)$'
|
||||||
line: '\1 modules-load=dwc2,g_ether'
|
line: '\1 modules-load=dwc2,g_ether'
|
||||||
|
|
||||||
- name: configure 01-motd
|
|
||||||
become_user: root
|
|
||||||
copy:
|
|
||||||
dest: /etc/update-motd.d/01-motd
|
|
||||||
content: |
|
|
||||||
#!/bin/sh
|
|
||||||
_hostname=$(hostname)
|
|
||||||
_version=$(cut -d"'" -f2 < /usr/local/lib/python3.9/dist-packages/pwnagotchi/_version.py)
|
|
||||||
echo
|
|
||||||
echo "(◕‿‿◕) $_hostname"
|
|
||||||
echo
|
|
||||||
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
|
|
||||||
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!"
|
|
||||||
echo
|
|
||||||
echo " I use oPwnGrid as my main API, you can check stats at https://opwngrid.xyz"
|
|
||||||
echo
|
|
||||||
echo " I'm managed by systemd. Here are some basic commands."
|
|
||||||
echo
|
|
||||||
echo " If you want to know what I'm doing, you can check my logs with the command"
|
|
||||||
echo " - pwnlog"
|
|
||||||
echo " - sudo pwnagotchi --version, to check the current version"
|
|
||||||
echo " - sudo pwnagotchi --donate, to see how you can donate to this project"
|
|
||||||
echo " - sudo pwnagotchi --check-update, to see if there is a new version available"
|
|
||||||
echo
|
|
||||||
echo " If you want to know if I'm running, you can use"
|
|
||||||
echo " systemctl status pwnagotchi"
|
|
||||||
echo
|
|
||||||
echo " You can restart me using"
|
|
||||||
echo " systemctl restart pwnagotchi"
|
|
||||||
echo
|
|
||||||
echo " You learn more about me at https://pwnagotchi.ai/"
|
|
||||||
when: hostname.changed
|
|
||||||
|
|
||||||
- name: Add pwnlog alias
|
- name: Add pwnlog alias
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /home/pi/.bashrc
|
dest: /home/pi/.bashrc
|
||||||
line: "\nalias pwnlog='tail -f -n300 /var/log/pwn*.log | sed --unbuffered \"s/,[[:digit:]]\\{3\\}\\]//g\" | cut -d \" \" -f 2-'"
|
line: "\nalias pwnlog='tail -f -n300 /var/log/pwn*.log | sed --unbuffered \"s/,[[:digit:]]\\{3\\}\\]//g\" | cut -d \" \" -f 2-'"
|
||||||
insertafter: EOF
|
insertafter: EOF
|
||||||
|
|
||||||
- name: Add pwnlog alias
|
- name: Add pwnver alias
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /home/pi/.bashrc
|
dest: /home/pi/.bashrc
|
||||||
line: "\nalias pwnver='python3 -c \"import pwnagotchi as p; print(p.__version__)\"'"
|
line: "\nalias pwnver='python3 -c \"import pwnagotchi as p; print(p.__version__)\"'"
|
||||||
|
@ -1 +1 @@
|
|||||||
__version__ = '2.4.3'
|
__version__ = '2.4.4'
|
||||||
|
Reference in New Issue
Block a user