mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Fixing Makefile and ansible playbook
Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com> Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
@ -3,7 +3,8 @@
|
||||
"name": "pwnagotchi",
|
||||
"type": "arm-image",
|
||||
"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": "sha256:bf982e56b0374712d93e185780d121e3f5c3d5e33052a95f72f9aed468d58fa7"
|
||||
"iso_checksum": "sha256:bf982e56b0374712d93e185780d121e3f5c3d5e33052a95f72f9aed468d58fa7",
|
||||
"target_image_size": 9368709120
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
|
@ -137,21 +137,6 @@
|
||||
- libnetfilter-queue-dev
|
||||
|
||||
tasks:
|
||||
- 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
|
||||
apt:
|
||||
deb: /usr/local/src/libpcap*
|
||||
args: allow-downgrades
|
||||
register: libpcap
|
||||
|
||||
- name: change hostname
|
||||
hostname:
|
||||
name: "{{pwnagotchi.hostname}}"
|
||||
@ -173,13 +158,6 @@
|
||||
line: 'ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap'
|
||||
state: present
|
||||
|
||||
- name: add firmware packages to hold
|
||||
dpkg_selections:
|
||||
name: "{{ item }}"
|
||||
selection: hold
|
||||
with_items: "{{ packages.apt.hold }}"
|
||||
when: libpcap.changed
|
||||
|
||||
- name: update apt package cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
@ -202,7 +180,7 @@
|
||||
- name: configure dphys-swapfile
|
||||
file:
|
||||
path: /etc/dphys-swapfile
|
||||
content: "CONF_SWAPSIZE=2048"
|
||||
content: "CONF_SWAPSIZE=1024"
|
||||
|
||||
- name: clone papirus repository
|
||||
git:
|
||||
@ -337,7 +315,7 @@
|
||||
|
||||
- name: clone bettercap caplets
|
||||
git:
|
||||
repo: https://github.com/bettercap/caplets.git
|
||||
repo: https://github.com/jayofelony/caplets.git
|
||||
dest: /tmp/caplets
|
||||
register: capletsgit
|
||||
|
||||
@ -414,19 +392,13 @@
|
||||
executable: /bin/bash
|
||||
chdir: /usr/local/src/nexmon/
|
||||
|
||||
- name: choose kernel
|
||||
shell: "uname -r"
|
||||
register: kernel
|
||||
|
||||
- name: copy modified driver
|
||||
copy:
|
||||
src: /usr/local/src/nexmon/patches/driver/brcmfmac_6.1.y-nexmon/brcmfmac.ko
|
||||
dest: "/lib/modules/{{ kernel.stdout }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
||||
dest: "/lib/modules/{{ ansible_kernel }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
|
||||
|
||||
- name: ensure depmod runs on reboot to load modified driver (brcmfmac)
|
||||
lineinfile:
|
||||
dest: /etc/rc.local
|
||||
line: "/sbin/depmod -a"
|
||||
- name: "Update kernel modules"
|
||||
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
|
||||
@ -551,6 +523,28 @@
|
||||
apt:
|
||||
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
|
||||
apt:
|
||||
deb: /usr/local/src/libpcap*
|
||||
args: allow-downgrades
|
||||
register: libpcap
|
||||
|
||||
- name: add firmware packages to hold
|
||||
dpkg_selections:
|
||||
name: "{{ item }}"
|
||||
selection: hold
|
||||
with_items: "{{ packages.apt.hold }}"
|
||||
when: libpcap.changed
|
||||
|
||||
- name: enable services
|
||||
systemd:
|
||||
name: "{{ item }}"
|
||||
|
Reference in New Issue
Block a user