1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15:
set timeout 15 spawn telnet $target set timeout 5 expect { "login: " {send $AUTOUSER\r; exp_continue} "ssword: " {send $PASSWORD\r; exp_continue} {$->} {} default {send_log -- "GARBAGE OR CANNOT CONNECT\n"; exit } } set timeout 15 # grab_stats