Professional Documents
Culture Documents
router
# $language = VBScript
# $interface = 1.0
This states that the script is synchronous with the screen
crt.Screen.Synchronous = True
This sends a Carriage Return to the screen
crt.Screen.Send vbCr
We now tell the script to wait until it sees ssword:
crt.Screen.WaitForString ssword:
Now that it sees that, send the characters VtYpAsS (vty
password) and a carriage return
crt.Screen.Send VtYpAsS & vbCr
We now have to wait for the > prompt
crt.Screen.WaitForString >
Now send out enable and a Carriage Return
crt.Screen.Send enable & vbCr
We now tell the script to wait until it sees ssword:
crt.Screen.WaitForString ssword:
Now that it sees that, send the characters LeVeL15 (enable
password) and a carriage return
crt.Screen.Send LeVeL15 & vbCr
Another simple script to show the ip interface status
# $language = VBScript
# $interface = 1.0
crt.Screen.Synchronous = True
crt.Screen.Send vbCr
Collin
http://packetpros.com/securecrt-scripting/
crt.Screen.WaitForString #
crt.Screen.Send show ip int brief & vbCr
Helpful Hints
Once your logged in via your scripts, set the line terminal
length to 0 (IOS only)
objSc.WaitForString#,2
objSc.Send terminal length 0 & vbCr
If you dont, you will have to WaitForString - and then send a
carriage return. With terminal length 0, the command will scroll
through the entire list, never requiring a carriage return or
space. At the very end, set your terminal length back to 80.
objSc.WaitForString#,2
objSc.Send terminal length 80 & vbCr
For CatOS
objSc.WaitForString )
objSc.Send set length 0 & vbCr
The set length 0 is for the current session only, so you will not
have to set it back before the script ends.
Keyboard Mapping
Ive found that its easiest to modify the ini le for the session.
For example I want to use a specic keyboard mapping with a
Collin
http://packetpros.com/securecrt-scripting/
http://packetpros.com/securecrt-scripting/
Collin
http://packetpros.com/securecrt-scripting/