Update build for Pi 5 users

Version 2.7.8
This commit is contained in:
Jeroen Oudshoorn
2024-01-24 10:24:01 +01:00
parent dde6fa4c2a
commit 7aacf9fb44
7 changed files with 26 additions and 24 deletions

View File

@ -283,12 +283,16 @@
args: args:
executable: /bin/bash executable: /bin/bash
chdir: /usr/local/src/nexmon/ chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ kernel.full_pi5 }}"
- name: make firmware patch (bcm43455c0) - name: make firmware patch (bcm43455c0)
shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make" shell: "source ./setup_env.sh && cd /usr/local/src/nexmon/patches/bcm43455c0/7_45_206/nexmon/ && make"
args: args:
executable: /bin/bash executable: /bin/bash
chdir: /usr/local/src/nexmon/ chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ kernel.full_pi5 }}"
- name: install new firmware (bcm43455c0) - name: install new firmware (bcm43455c0)
copy: copy:
@ -301,6 +305,8 @@
args: args:
executable: /bin/bash executable: /bin/bash
chdir: /usr/local/src/nexmon/ chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ kernel.full_pi5 }}"
- name: install new firmware (bcm43436b0) - name: install new firmware (bcm43436b0)
copy: copy:
@ -313,6 +319,8 @@
args: args:
executable: /bin/bash executable: /bin/bash
chdir: /usr/local/src/nexmon/ chdir: /usr/local/src/nexmon/
environment:
QEMU_UNAME: "{{ kernel.full_pi5 }}"
- name: install new firmware (bcm43430a1) - name: install new firmware (bcm43430a1)
copy: copy:
@ -350,34 +358,25 @@
copy: copy:
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko" src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko" dest: "/usr/lib/modules/{{ kernel.full }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
environment:
- name: clone nexmon repository QEMU_UNAME: "{{ kernel.full }}"
git:
repo: https://github.com/DrSchottky/nexmon.git
dest: /usr/local/src/nexmon
- name: make firmware
shell: "source ./setup_env.sh && make"
args:
executable: /bin/bash
chdir: /usr/local/src/nexmon/
- name: make firmware patch (bcm43455c0)
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: copy modified driver, RPi5 - name: copy modified driver, RPi5
copy: copy:
src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko" src: "/usr/local/src/nexmon/patches/driver/brcmfmac_{{ kernel.min }}.y-nexmon/brcmfmac.ko"
dest: "/usr/lib/modules/{{ kernel.full_pi5 }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko" dest: "/usr/lib/modules/{{ kernel.full_pi5 }}/kernel/drivers/net/wireless/broadcom/brcm80211/brcmfmac/brcmfmac.ko"
environment:
QEMU_UNAME: "{{ kernel.full_pi5 }}"
- name: load brcmfmac drivers - name: load brcmfmac drivers
command: "/sbin/depmod {{ kernel.full }}" command: "/sbin/depmod {{ kernel.full }}"
environment:
QEMU_UNAME: "{{ kernel.full }}"
- name: load brcmfmac drivers - name: load brcmfmac drivers
command: "/sbin/depmod {{ kernel.full_pi5 }}" command: "/sbin/depmod {{ kernel.full_pi5 }}"
environment:
QEMU_UNAME: "{{ kernel.full_pi5 }}"
# 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

View File

@ -1 +1 @@
__version__ = '2.7.7' __version__ = '2.7.8'

View File

@ -92,7 +92,7 @@ def update_data(last_session):
'build': "Pwnagotchi-Torch by Jayofelony", 'build': "Pwnagotchi-Torch by Jayofelony",
'plugins': enabled, 'plugins': enabled,
'language': language, 'language': language,
'bettercap': subprocess.getoutput("bettercap -version").split(".\n\n")[1], 'bettercap': subprocess.getoutput("bettercap -version"),
'opwngrid': subprocess.getoutput("pwngrid -version") 'opwngrid': subprocess.getoutput("pwngrid -version")
} }

View File

@ -199,7 +199,7 @@ def list_plugins(args, config, pattern='*'):
available_not_installed = set(available.keys()) - set(installed.keys()) available_not_installed = set(available.keys()) - set(installed.keys())
max_len_list = available_and_installed if args.installed else available_not_installed max_len_list = available_and_installed if args.installed else available_not_installed
max_len = max(map(len, max_len_list)) max_len = max(map(len, max_len_list)) if max_len_list else 0
header = line.format(name='Plugin', width=max_len, version='Version', enabled='Active', status='Status') header = line.format(name='Plugin', width=max_len, version='Version', enabled='Active', status='Status')
line_length = max(max_len, len('Plugin')) + len(header) - len('Plugin') - 12 # lol line_length = max(max_len, len('Plugin')) + len(header) - len('Plugin') - 12 # lol

View File

@ -19,6 +19,10 @@ class AircrackOnly(plugins.Plugin):
def __init__(self): def __init__(self):
self.text_to_set = "" self.text_to_set = ""
self.options = dict()
def on_ready(self):
return
def on_loaded(self): def on_loaded(self):
logging.info("aircrackonly plugin loaded") logging.info("aircrackonly plugin loaded")

View File

@ -130,7 +130,7 @@ def install(display, update):
source_path = "%s-%s" % (source_path, update['available']) source_path = "%s-%s" % (source_path, update['available'])
# setup.py is going to install data files for us # setup.py is going to install data files for us
os.system("cd %s && pip3 install . --no-cache-dir --break-system-packages" % source_path) os.system("cd %s && pip3 install . --break-system-packages" % source_path)
return True return True

View File

@ -131,6 +131,7 @@ class Wigle(plugins.Plugin):
""" """
Called in manual mode when there's internet connectivity Called in manual mode when there's internet connectivity
""" """
global pcap_filename
if not self.ready or self.lock.locked(): if not self.ready or self.lock.locked():
return return
@ -143,7 +144,7 @@ class Wigle(plugins.Plugin):
all_files = os.listdir(handshake_dir) all_files = os.listdir(handshake_dir)
all_gps_files = [os.path.join(handshake_dir, filename) all_gps_files = [os.path.join(handshake_dir, filename)
for filename in all_files for filename in all_files
if filename.endswith('.gps.json') or filename.endswith('.paw-gps.json') or filename.endswith('.geo.json')] if filename.endswith('.gps.json') or filename.endswith('.geo.json')]
all_gps_files = remove_whitelisted(all_gps_files, config['main']['whitelist']) all_gps_files = remove_whitelisted(all_gps_files, config['main']['whitelist'])
new_gps_files = set(all_gps_files) - set(reported) - set(self.skip) new_gps_files = set(all_gps_files) - set(reported) - set(self.skip)
@ -154,8 +155,6 @@ class Wigle(plugins.Plugin):
for gps_file in new_gps_files: for gps_file in new_gps_files:
if gps_file.endswith('.gps.json'): if gps_file.endswith('.gps.json'):
pcap_filename = gps_file.replace('.gps.json', '.pcap') pcap_filename = gps_file.replace('.gps.json', '.pcap')
if gps_file.endswith('.paw-gps.json'):
pcap_filename = gps_file.replace('.paw-gps.json', '.pcap')
if gps_file.endswith('.geo.json'): if gps_file.endswith('.geo.json'):
pcap_filename = gps_file.replace('.geo.json', '.pcap') pcap_filename = gps_file.replace('.geo.json', '.pcap')
if not os.path.exists(pcap_filename): if not os.path.exists(pcap_filename):