#! /usr/pkg/bin/expect -f # cisco connect script # Scott Presnell, srp@tworoads.net, Wed Jan 2 08:15:22 PST 2002 # $Id: cisco,v 1.1 2002/01/02 16:15:44 root Exp root $ set CINTR \003 ;# ^C set CSUSP \032 ;# ^Z set timeout 10 spawn telnet [name|IP of yoru cisco675] expect "User Access Verification" { sleep 1 expect Password: { send "[your password]\r" } } expect cbos> {send "show uptime\r"} expect cbos> {send "show int eth0\r"} expect cbos> {send "show int wan0\r"} expect cbos> {send "stats eth0\r"} expect cbos> {send "stats wan0\r"} expect cbos> {send "stats wan0-0\r"} expect cbos> {send "exit\r"} close
Scott Presnell
Last modified: Friday, March 22, 2002 13:21 PST