|
Warning: this is an htmlized version!
The original is across this link, and the conversion rules are here. |
#!/usr/bin/expect --
# (find-angg ".zshrc" "autopasswd")
source ~/.passwds.tcl
proc sendpasswd {passwd} { sleep 0.5; send $passwd\n }
set SUCURI sucuri.mat.puc-rio.br
set TWU angg.twu.net
eval spawn $argv
interact {
-o -nobuffer "edrx@${SUCURI}'s password: " { sendpasswd $passwd(puc) }
-nobuffer "edrx@${TWU}'s password: " { sendpasswd $passwd(twu) }
"\033\[H\033\[JConnection to sucuri.mat.puc-rio.br closed." {}
"\033\[H\033\[JConnection to angg.twu.net closed." {}
}