fix: fixed, refactored and centralized launchers logic (closes #473)

This commit is contained in:
Simone Margaritelli
2019-10-31 14:14:13 +01:00
parent 96c617e152
commit 13064879e0
7 changed files with 77 additions and 40 deletions

View File

@ -1,15 +1,11 @@
#!/usr/bin/env bash
# start mon0
/usr/bin/monstart
source /usr/bin/pwnlib
# if usb0 or eth0 are up
if [[ $(ifconfig | grep usb0 | grep RUNNING) ]] || [[ !$(grep '1' /sys/class/net/eth0/carrier) ]]; then
# if override file exists, go into auto mode
if [ -f /root/.pwnagotchi-auto ]; then
/usr/bin/bettercap -no-colors -caplet pwnagotchi-auto -iface mon0
else
/usr/bin/bettercap -no-colors -caplet pwnagotchi-manual -iface mon0
fi
else
# start mon0
start_monitor_interface
if is_auto_mode; then
/usr/bin/bettercap -no-colors -caplet pwnagotchi-auto -iface mon0
else
/usr/bin/bettercap -no-colors -caplet pwnagotchi-manual -iface mon0
fi