diff --git a/usr/bin/LED b/usr/bin/LED index b20a51a..0c54d21 100755 --- a/usr/bin/LED +++ b/usr/bin/LED @@ -88,6 +88,10 @@ function parse_state() { } case $1 in + "LINKSETUP") + parse_color "M" + parse_pattern "SLOW" + ;; "SETUP") parse_color "M" parse_pattern "SOLID" diff --git a/usr/bin/shark_framework b/usr/bin/shark_framework index 33ed895..9648f23 100755 --- a/usr/bin/shark_framework +++ b/usr/bin/shark_framework @@ -98,6 +98,14 @@ function execute_upgrade() { } } +function wait_for_link() { + LED LINKSETUP + while mii-tool eth0 | grep -q 'eth0: no link'; do + sleep 1 + done + LED SETUP +} + function execute_payload() { $LOG "Executing PAYLOAD" @@ -155,6 +163,7 @@ function enter_attack_mode() { stop_http stop_ssh + wait_for_link execute_payload enter_idle_mode