2019-10-30 19:24:12 +01:00
|
|
|
#!/usr/bin/env bash
|
2019-10-31 12:56:27 +01:00
|
|
|
# start mon0
|
2019-10-30 19:24:12 +01:00
|
|
|
/usr/bin/monstart
|
2019-10-31 12:56:27 +01:00
|
|
|
|
|
|
|
# if usb0 or eth0 are up
|
2019-10-30 19:24:12 +01:00
|
|
|
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
|
|
|
|
/usr/bin/bettercap -no-colors -caplet pwnagotchi-auto -iface mon0
|
|
|
|
fi
|