Merge remote-tracking branch 'Snuf/master' into pwnagotchi-torch

# Conflicts:
#	bin/pwnagotchi
#	builder/data/usr/bin/pwnlib
#	pwnagotchi/ai/__init__.py
This commit is contained in:
Jeroen Oudshoorn
2023-07-24 21:20:37 +02:00
19 changed files with 670 additions and 41 deletions

View File

@ -25,20 +25,27 @@ reload_brcm() {
if ! modprobe -r brcmfmac; then
return 1
fi
sleep 1
if ! modprobe brcmfmac; then
return 1
fi
sleep 2
iw dev wlan0 set power_save off
return 0
}
# starts mon0
start_monitor_interface() {
airmon-ng start wlan0
iw dev wlan0 set power_save off
iw phy "$(iw phy | head -1 | cut -d" " -f2)" interface add mon0 type monitor
sleep 2
ifconfig wlan0 down
ifconfig mon0 up
}
# stops mon0
stop_monitor_interface() {
airmon-ng stop wlan0
ifconfig mon0 down && iw dev mon0 del
}
# returns 0 if the specificed network interface is up
@ -67,12 +74,12 @@ is_auto_mode() {
# if usb0 is up, we're in MANU
if is_interface_up usb0; then
return 1
return 0
fi
# if eth0 is up (for other boards), we're in MANU
if is_interface_up eth0; then
return 1
return 0
fi
# no override, but none of the interfaces is up -> AUTO