Skip to content

Instantly share code, notes, and snippets.

@TyeolRik
Last active June 1, 2020 13:03
Show Gist options
  • Save TyeolRik/4cc27e7a757bd30c9009e11a3ec52305 to your computer and use it in GitHub Desktop.
Save TyeolRik/4cc27e7a757bd30c9009e11a3ec52305 to your computer and use it in GitHub Desktop.
#!/bin/sh
sudo wget https://gist.githubusercontent.com/TyeolRik/61516b992e9188dc0ace842f3832dfe1/raw/c0221cbae3a8101d3f148ba5b615e713ef31ace1/auto.sh
sudo chmod 777 auto.sh
expect <<EOF
set timeout -1
spawn /auto.sh
expect {
"password: " {
send "test\r"
exp_continue
}
"password: " {
send "test\r"
exp_continue
}
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment