mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
Merge branch 'jayofelony:master' into master
This commit is contained in:
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1,4 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: jayofelony
|
||||
custom: https://tikkie.me/pay/dubcto94hnskg539kar0
|
@ -1,67 +0,0 @@
|
||||
# For more options and information see
|
||||
# http://rptl.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
# Additional overlays and parameters are documented
|
||||
# /boot/overlays/README
|
||||
|
||||
# Automatically load overlays for detected cameras
|
||||
camera_auto_detect=1
|
||||
|
||||
# Automatically load overlays for detected DSI displays
|
||||
display_auto_detect=1
|
||||
|
||||
# Automatically load initramfs files, if found
|
||||
auto_initramfs=1
|
||||
|
||||
# Enable DRM VC4 V3D driver
|
||||
dtoverlay=vc4-kms-v3d
|
||||
max_framebuffers=2
|
||||
|
||||
# Don't have the firmware create an initial video= setting in cmdline.txt.
|
||||
# Use the kernel's default instead.
|
||||
disable_fw_kms_setup=1
|
||||
|
||||
# Run in 64-bit mode
|
||||
arm_64bit=0
|
||||
|
||||
# Disable compensation for displays with overscan
|
||||
disable_overscan=1
|
||||
|
||||
# Run as fast as firmware / board allows
|
||||
arm_boost=1
|
||||
|
||||
[cm4]
|
||||
# Enable host mode on the 2711 built-in XHCI USB controller.
|
||||
# This line should be removed if the legacy DWC2 controller is required
|
||||
# (e.g. for USB device mode) or if USB support is not required.
|
||||
otg_mode=1
|
||||
|
||||
[all]
|
||||
dtoverlay=dwc2
|
||||
dtparam=i2c1=on
|
||||
dtparam=i2c_arm=on
|
||||
dtparam=spi=on
|
||||
gpu_mem=1
|
||||
dtoverlay=dwc2
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi0]
|
||||
dtoverlay=spi1-3cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi3]
|
||||
dtoverlay=spi1-3cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi4]
|
||||
dtoverlay=spi1-3cs
|
||||
#dtoverlay=disable-wifi
|
@ -1,70 +0,0 @@
|
||||
# For more options and information see
|
||||
# http://rptl.io/configtxt
|
||||
# Some settings may impact device functionality. See link above for details
|
||||
|
||||
# Uncomment some or all of these to enable the optional hardware interfaces
|
||||
#dtparam=i2c_arm=on
|
||||
#dtparam=i2s=on
|
||||
#dtparam=spi=on
|
||||
|
||||
# Enable audio (loads snd_bcm2835)
|
||||
dtparam=audio=on
|
||||
|
||||
# Additional overlays and parameters are documented
|
||||
# /boot/firmware/overlays/README
|
||||
|
||||
# Automatically load overlays for detected cameras
|
||||
camera_auto_detect=1
|
||||
|
||||
# Automatically load overlays for detected DSI displays
|
||||
display_auto_detect=1
|
||||
|
||||
# Automatically load initramfs files, if found
|
||||
auto_initramfs=1
|
||||
|
||||
# Enable DRM VC4 V3D driver
|
||||
dtoverlay=vc4-kms-v3d
|
||||
max_framebuffers=2
|
||||
|
||||
# Don't have the firmware create an initial video= setting in cmdline.txt.
|
||||
# Use the kernel's default instead.
|
||||
disable_fw_kms_setup=1
|
||||
|
||||
# Run in 64-bit mode
|
||||
arm_64bit=1
|
||||
|
||||
# Disable compensation for displays with overscan
|
||||
disable_overscan=1
|
||||
|
||||
# Run as fast as firmware / board allows
|
||||
arm_boost=1
|
||||
|
||||
[cm4]
|
||||
# Enable host mode on the 2711 built-in XHCI USB controller.
|
||||
# This line should be removed if the legacy DWC2 controller is required
|
||||
# (e.g. for USB device mode) or if USB support is not required.
|
||||
otg_mode=1
|
||||
|
||||
[all]
|
||||
dtparam=i2c1=on
|
||||
dtparam=i2c_arm=on
|
||||
dtparam=spi=on
|
||||
gpu_mem=1
|
||||
dtoverlay=dwc2
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi0]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi3]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi4]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi5]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
@ -123,6 +123,7 @@
|
||||
- libc-ares-dev
|
||||
- libc6-dev
|
||||
- libcpuinfo-dev
|
||||
- libcurl4-openssl-dev
|
||||
- libdbus-1-dev
|
||||
- libdbus-glib-1-dev
|
||||
- libeigen3-dev
|
||||
@ -206,6 +207,30 @@
|
||||
state: present
|
||||
when: hostname.changed
|
||||
|
||||
- name: setup /boot/config.txt
|
||||
blockinfile:
|
||||
path: /boot/config.txt
|
||||
insertafter: EOF
|
||||
block: |
|
||||
dtparam=i2c1=on
|
||||
dtparam=i2c_arm=on
|
||||
dtparam=spi=on
|
||||
gpu_mem=1
|
||||
dtoverlay=dwc2
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi0]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi3]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi4]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
- name: Create custom plugin directory
|
||||
file:
|
||||
path: '{{ pwnagotchi.custom_plugin_dir }}'
|
||||
@ -264,6 +289,24 @@
|
||||
dest: /usr/local/lib/libpcap.so.0.8
|
||||
state: link
|
||||
|
||||
# install latest hcxtools
|
||||
|
||||
- name: clone hcxtools
|
||||
git:
|
||||
repo: https://github.com/ZerBea/hcxtools.git
|
||||
dest: /usr/local/src/hcxtools
|
||||
|
||||
- name: install hcxtools
|
||||
shell: "make && make install"
|
||||
args:
|
||||
executable: /bin/bash
|
||||
chdir: /usr/local/src/hcxtools
|
||||
|
||||
- name: remove hcxtools directory
|
||||
file:
|
||||
state: absent
|
||||
path: /usr/local/src/hcxtools
|
||||
|
||||
###############################################################
|
||||
# Install nexmon to fix wireless scanning (takes 2.5G of space)
|
||||
###############################################################
|
||||
|
@ -211,6 +211,34 @@
|
||||
regexp: '(.*)$'
|
||||
line: '\1 modules-load=dwc2,g_ether'
|
||||
|
||||
- name: setup /boot/firmware/config.txt
|
||||
blockinfile:
|
||||
path: /boot/firmware/config.txt
|
||||
insertafter: EOF
|
||||
block: |
|
||||
dtparam=i2c1=on
|
||||
dtparam=i2c_arm=on
|
||||
dtparam=spi=on
|
||||
gpu_mem=1
|
||||
dtoverlay=dwc2
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi0]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi3]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi4]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
[pi5]
|
||||
dtoverlay=spi0-0cs
|
||||
#dtoverlay=disable-wifi
|
||||
|
||||
- name: change hostname
|
||||
lineinfile:
|
||||
dest: /etc/hostname
|
||||
|
@ -14,8 +14,9 @@ class GPIOButtons(plugins.Plugin):
|
||||
self.running = False
|
||||
self.ports = {}
|
||||
self.commands = None
|
||||
self.options = dict()
|
||||
|
||||
def runCommand(self, channel):
|
||||
def runcommand(self, channel):
|
||||
command = self.ports[channel]
|
||||
logging.info(f"Button Pressed! Running command: {command}")
|
||||
process = subprocess.Popen(command, shell=True, stdin=None, stdout=open("/dev/null", "w"), stderr=None,
|
||||
@ -35,7 +36,7 @@ class GPIOButtons(plugins.Plugin):
|
||||
gpio = int(gpio)
|
||||
self.ports[gpio] = command
|
||||
GPIO.setup(gpio, GPIO.IN, GPIO.PUD_UP)
|
||||
GPIO.add_event_detect(gpio, GPIO.FALLING, callback=self.runCommand, bouncetime=600)
|
||||
GPIO.add_event_detect(gpio, GPIO.FALLING, callback=self.runcommand, bouncetime=600)
|
||||
# set pimoroni display hat mini LED off/dim
|
||||
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
|
||||
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
|
||||
|
@ -89,7 +89,7 @@ class Grid(plugins.Plugin):
|
||||
logging.debug("checking pcap's")
|
||||
config = agent.config()
|
||||
|
||||
pcap_files = glob.glob(os.path.join(agent.config()['bettercap']['handshakes'], "*.pcap"))
|
||||
pcap_files = glob.glob(os.path.join(config['bettercap']['handshakes'], "*.pcap"))
|
||||
num_networks = len(pcap_files)
|
||||
reported = self.report.data_field_or('reported', default=[])
|
||||
num_reported = len(reported)
|
||||
|
@ -18,12 +18,14 @@ def systemd_dropin(name, content):
|
||||
|
||||
systemctl("daemon-reload")
|
||||
|
||||
|
||||
def systemctl(command, unit=None):
|
||||
if unit:
|
||||
os.system("/bin/systemctl %s %s" % (command, unit))
|
||||
else:
|
||||
os.system("/bin/systemctl %s" % command)
|
||||
|
||||
|
||||
def run_task(name, options):
|
||||
task_service_name = "switcher-%s-task.service" % name
|
||||
# save all the commands to a shell script
|
||||
@ -57,7 +59,7 @@ def run_task(name, options):
|
||||
""" % (name, task_service_name, name))
|
||||
|
||||
if 'reboot' in options and options['reboot']:
|
||||
# create a indication file!
|
||||
# create an indication file!
|
||||
# if this file is set, we want the switcher-tasks to run
|
||||
open('/root/.switcher', 'a').close()
|
||||
|
||||
@ -98,6 +100,7 @@ def run_task(name, options):
|
||||
systemctl("daemon-reload")
|
||||
systemctl("start", task_service_name)
|
||||
|
||||
|
||||
class Switcher(plugins.Plugin):
|
||||
__author__ = '33197631+dadav@users.noreply.github.com'
|
||||
__version__ = '0.0.1'
|
||||
|
@ -10,13 +10,17 @@ class Widget(object):
|
||||
def draw(self, canvas, drawer):
|
||||
raise Exception("not implemented")
|
||||
|
||||
|
||||
# canvas.paste: https://pillow.readthedocs.io/en/stable/reference/Image.html#PIL.Image.Image.paste
|
||||
# takes mask variable, to identify color system. (not used for pwnagotchi yet)
|
||||
# Pwn should use "1" since its mainly black or white displays.
|
||||
class Bitmap(Widget):
|
||||
def __init__(self, path, xy, color=0):
|
||||
super().__init__(xy, color)
|
||||
self.image = Image.open(path)
|
||||
|
||||
def draw(self, canvas, drawer):
|
||||
if self.color = 0xFF:
|
||||
self.image = ImageOps.invert(self.image)
|
||||
canvas.paste(self.image, self.xy)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user