mirror of
https://github.com/jayofelony/pwnagotchi.git
synced 2025-07-01 18:37:27 -04:00
fix: fixed, refactored and centralized launchers logic (closes #473)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user