Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 07-13-2004, 02:49 PM
Elder's Avatar
Elder Elder is offline
Registered User
 
Join Date: May 2004
Posts: 2
Basic automated login script (BigBand 12k)

#$language = "VBScript"
#$interface = "1.0"

' This program is an automated login script for the
' BigBand (formerly ADC) Cuda 12000. It cycles through
' your logins and then sets timeout on the session to 0
' so your session will not be terminated due to inactivity.
' It can easily be modified to work for Cisco logins or
' for multiple types of equipment that require different username/
' password syntax as well.
' Written by Elder

Sub main
Dim login
Set text = crt.Screen
crt.Screen.Synchronous = True

'#########################################
'#Depending on if you come in via telnet
'#or via shell you may need to add a delay
'#for the CLI to load.
'#########################################

' text.WaitForString "root>", 5
login = "root>"
' MsgBox "Script paused for CLI to have time to load."

'#########################################
'# This section is for Cuda 12K logins.
'# It will try the root passwords for all
'# possible default password
'# configurations.
'#########################################

If text.WaitForString (login, 10) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & vbCr
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & VbCr
End If
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & vbCr
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & vbCr
End If
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & VbCr
End If
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & VbCr
End If
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & VbCr
End If
If text.WaitForString (login, 2) Then
text.Send "en root" & VbCr
text.WaitForString ":",1
text.Send "******" & VbCr
End If
End If
text.Send "set timeout 0" & VbCr
crt.Screen.Synchronous = False
Exit Sub
End If
End Sub
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:48 AM.