From 18a41f3e292f41dfd0150e068c031ec04348646c Mon Sep 17 00:00:00 2001 From: Lorenzo Milesi Date: Tue, 29 Oct 2019 08:32:55 +0100 Subject: [PATCH] Fix eth0 connection check for MANU mode Issue #460 - Originally noted by @ZeroCool-Dade https://github.com/evilsocket/pwnagotchi/commit/a78a4b0b3e5cfbdfea481e140e6c02e0bdb1f72d#commitcomment-35683998 Signed-off-by: Lorenzo Milesi --- builder/pwnagotchi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/builder/pwnagotchi.yml b/builder/pwnagotchi.yml index daa9070..31dd7e9 100644 --- a/builder/pwnagotchi.yml +++ b/builder/pwnagotchi.yml @@ -304,7 +304,7 @@ # blink 10 times to signal ready state /usr/bin/bootblink 10 & # start a detached screen session with bettercap - if [[ $(ifconfig | grep usb0 | grep RUNNING) ]] || [[ $(cat /sys/class/net/eth0/carrier) ]]; then + 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 rm /root/.pwnagotchi-auto @@ -323,7 +323,7 @@ content: | #!/usr/bin/env bash /usr/bin/monstart - if [[ $(ifconfig | grep usb0 | grep RUNNING) ]] || [[ $(cat /sys/class/net/eth0/carrier) ]]; then + 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