mirror of https://github.com/hak5/shark-files.git
wait_for_link
don't blindly execute the payload, wait for a link first at leastpull/2/head
parent
49cbd4460d
commit
f3bf662795
|
@ -88,6 +88,10 @@ function parse_state() {
|
|||
}
|
||||
|
||||
case $1 in
|
||||
"LINKSETUP")
|
||||
parse_color "M"
|
||||
parse_pattern "SLOW"
|
||||
;;
|
||||
"SETUP")
|
||||
parse_color "M"
|
||||
parse_pattern "SOLID"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue