Skip to content

Instantly share code, notes, and snippets.

Last active January 1, 2016 08:29
What would you like to do?
set timeout 20
set name [lindex $argv 0]
set user [lindex $argv 1]
set password [lindex $argv 2]
spawn telnet $name
expect "login: "
send "$user\n"
expect "Password: "
send "$password\n"
expect "$ "
send "monitor/trafficMtr/summary wanId 1\n"
expect "Percentage of this Month's Limit"
expect "$ "
send "exit\n"
expect eof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment