mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Merge remote-tracking branch 'origin/pwnagotchi-torch' into pwnagotchi-torch
This commit is contained in:
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.11" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (pwnagotchi)" 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="jdk" jdkName="Python 3.11" jdkType="Python SDK" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PyDocumentationSettings">
|
<component name="PyDocumentationSettings">
|
||||||
|
@ -3,13 +3,11 @@
|
|||||||
{
|
{
|
||||||
"name": "pwnagotchi",
|
"name": "pwnagotchi",
|
||||||
"type": "arm-image",
|
"type": "arm-image",
|
||||||
"iso_urls": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz",
|
"iso_url": "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz",
|
||||||
"iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256",
|
"iso_checksum": "file:https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2023-05-03/2023-05-03-raspios-bullseye-arm64-lite.img.xz.sha256",
|
||||||
"target_image_size": 9368709120,
|
"target_image_size": 9368709120,
|
||||||
"qemu_binary": "qemu-aarch64-static",
|
"qemu_binary": "qemu-aarch64-static",
|
||||||
"qemu_args": [
|
"output_filename": "images/pwnagotchi-{{user `pwn_version`}}-arm64.img"
|
||||||
"-cpu", "cortex-a72"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"provisioners": [
|
"provisioners": [
|
||||||
|
@ -29,11 +29,8 @@
|
|||||||
- apt-daily.service
|
- apt-daily.service
|
||||||
- apt-daily-upgrade.timer
|
- apt-daily-upgrade.timer
|
||||||
- apt-daily-upgrade.service
|
- apt-daily-upgrade.service
|
||||||
- wpa_supplicant.service
|
|
||||||
- bluetooth.service
|
- bluetooth.service
|
||||||
- triggerhappy.service
|
|
||||||
- ifup@wlan0.service
|
- ifup@wlan0.service
|
||||||
- dnsmasq.service
|
|
||||||
packages:
|
packages:
|
||||||
bettercap:
|
bettercap:
|
||||||
# We will install bettercap from source
|
# We will install bettercap from source
|
||||||
@ -282,109 +279,6 @@
|
|||||||
remote_src: yes
|
remote_src: yes
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
# Install nexmon to fix wireless scanning (takes 2.5G of space)
|
|
||||||
- name: clone nexmon repository
|
|
||||||
git:
|
|
||||||
repo: https://github.com/jayofelony/nexmon.git
|
|
||||||
dest: /usr/local/src/nexmon
|
|
||||||
register: nexmongit
|
|
||||||
|
|
||||||
- name: make firmware
|
|
||||||
shell: "source ./setup_env.sh && make"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
# Raspberry Pi Zero 2w (chipset 43436b0)
|
|
||||||
|
|
||||||
- name: make firmware patch (bcm43436b0)
|
|
||||||
become_user: root
|
|
||||||
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: backup original firmware
|
|
||||||
become_user: root
|
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make backup-firmware"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
- name: install new firmware
|
|
||||||
become_user: root
|
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43436b0/9_88_4_65/nexmon/ && make install-firmware"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
# Raspberry Pi zero 2w (chipset 43430a1)
|
|
||||||
|
|
||||||
- name: make firmware patch (bcm43430a1)
|
|
||||||
become_user: root
|
|
||||||
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: backup original firmware
|
|
||||||
become_user: root
|
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make backup-firmware"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
- name: install new firmware
|
|
||||||
become_user: root
|
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43430a1/7_45_41_46/nexmon/ && make install-firmware"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
# Raspberry Pi 4
|
|
||||||
|
|
||||||
- name: make firmware patch (bcm43455c0)
|
|
||||||
become_user: root
|
|
||||||
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: backup original firmware
|
|
||||||
become_user: root
|
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make backup-firmware"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
- name: install new firmware
|
|
||||||
become_user: root
|
|
||||||
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make install-firmware"
|
|
||||||
args:
|
|
||||||
executable: /bin/bash
|
|
||||||
chdir: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
- name: Delete old driver
|
|
||||||
file:
|
|
||||||
state: absent
|
|
||||||
path: /lib/modules/{{ ansible_kernel }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
|
||||||
|
|
||||||
- name: copy modified driver
|
|
||||||
become_user: root
|
|
||||||
copy:
|
|
||||||
src: /usr/local/src/nexmon/patches/driver/brcmfmac_6.1.y-nexmon/brcmfmac.ko
|
|
||||||
dest: "/lib/modules/{{ ansible_kernel }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
|
||||||
|
|
||||||
- name: "Update kernel modules"
|
|
||||||
become_user: root
|
|
||||||
command: /sbin/depmod -a
|
|
||||||
|
|
||||||
# To shrink the final image, remove the nexmon directory (takes 2.5G of space) post build and installation
|
|
||||||
- name: Delete nexmon content & directory
|
|
||||||
file:
|
|
||||||
state: absent
|
|
||||||
path: /usr/local/src/nexmon/
|
|
||||||
|
|
||||||
- name: add HDMI powersave to rc.local
|
- name: add HDMI powersave to rc.local
|
||||||
blockinfile:
|
blockinfile:
|
||||||
path: /etc/rc.local
|
path: /etc/rc.local
|
||||||
@ -499,38 +393,6 @@
|
|||||||
apt:
|
apt:
|
||||||
autoremove: yes
|
autoremove: yes
|
||||||
|
|
||||||
- name: download old libpcap packages
|
|
||||||
get_url:
|
|
||||||
url: "http://ports.ubuntu.com/pool/main/libp/libpcap/{{ item }}"
|
|
||||||
dest: /usr/local/src/
|
|
||||||
with_items:
|
|
||||||
- libpcap0.8-dev_1.9.1-_arm64.deb
|
|
||||||
- libpcap0.8_1.9.1-3_arm64.deb
|
|
||||||
- libpcap-dev_1.9.1-3_arm64.deb
|
|
||||||
|
|
||||||
- name: install old libpcap packages
|
|
||||||
become_user: root
|
|
||||||
apt:
|
|
||||||
deb: /usr/local/src/libpcap*
|
|
||||||
args: allow-downgrades
|
|
||||||
register: libpcap
|
|
||||||
|
|
||||||
- name: add firmware packages to hold
|
|
||||||
become_user: root
|
|
||||||
dpkg_selections:
|
|
||||||
name: "{{ item }}"
|
|
||||||
selection: hold
|
|
||||||
with_items: "{{ packages.apt.hold }}"
|
|
||||||
when: libpcap.changed
|
|
||||||
|
|
||||||
- name: enable services
|
|
||||||
become_user: root
|
|
||||||
systemd:
|
|
||||||
name: "{{ item }}"
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
with_items: "{{ services.enable }}"
|
|
||||||
|
|
||||||
- name: disable unecessary services
|
- name: disable unecessary services
|
||||||
become_user: root
|
become_user: root
|
||||||
systemd:
|
systemd:
|
||||||
|
@ -35,11 +35,11 @@ def check(version, repo, native=True):
|
|||||||
if not native:
|
if not native:
|
||||||
info['url'] = "https://github.com/%s/archive/%s.zip" % (repo, latest['tag_name'])
|
info['url'] = "https://github.com/%s/archive/%s.zip" % (repo, latest['tag_name'])
|
||||||
else:
|
else:
|
||||||
# check if this release is compatible with arm6
|
# check if this release is compatible with armv8+
|
||||||
for asset in latest['assets']:
|
for asset in latest['assets']:
|
||||||
download_url = asset['browser_download_url']
|
download_url = asset['browser_download_url']
|
||||||
if download_url.endswith('.zip') and (
|
if download_url.endswith('.zip') and (
|
||||||
info['arch'] in download_url or (is_arm and 'armhf' in download_url)):
|
info['arch'] in download_url or (is_arm and 'arm64' in download_url)):
|
||||||
info['url'] = download_url
|
info['url'] = download_url
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user