Sample SecureCRT logon script in Python

Here is a very simple login script written in Python for SecureCRT.

# $language = “Python”
# $interface = “1.0”

### Basic Login Script
###############################################################################

def main():
crt.Screen.Synchronous = True

###    Send login and wait for Password prompt
crt.Screen.Send(“ADMIN\r”)
crt.Screen.WaitForString(“word:”)

###    Send the password
crt.Screen.Send(“PASSWORD\r”)

main()

Advertisements

About kwplat1

World renowned data networking professional affectionately known as The Tick

Posted on October 12, 2012, in Scripting and tagged , , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: