Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #1  
Old 03-20-2007, 02:44 PM
wakti wakti is offline
Registered User
 
Join Date: Jan 2007
Posts: 10
simple script question

I have multiple scriptsthat I use to login into different routers. Some of these routers share the same password. I was wondering if anyone had a sample script where they are defining all their passwords in one vbs file and including that file in the login scripts and calling the variable from the password vbs file. thank you!
Reply With Quote
  #2  
Old 03-20-2007, 03:54 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Hello Wakti,

I haven't seen any scripts which do what I think you're asking for, but I'd like to make sure I understand what you're wanting, and what your goal is.
Quote:
defining all their passwords in one vbs file
You would like all passwords for all routers in one VBS file?
Quote:
and including that file in the login scripts and calling the variable from the password vbs file
Are you thinking along the lines of #include in the C programming language?

What is the basic goal that the password file will help you achieve (e.g.: password consolidation, better security, etc.)?

What would your password file look like, and how would you know which password belongs to which router?

How are you currently running the multiple scripts that log onto different routers - are they scripts SecureCRT runs, or do the scripts run SecureCRT?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #3  
Old 03-20-2007, 04:01 PM
wakti wakti is offline
Registered User
 
Join Date: Jan 2007
Posts: 10
Currently I use the following scripts in securecrt:

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


Sub Main

crt.Screen.Synchronous = True

crt.Screen.WaitForString "%"

crt.Screen.Send "telnet 10.162.39.44" & vbCr

crt.Screen.WaitForString "Username:"

crt.Screen.Send "wakti" & vbCr

crt.Screen.WaitForString "Password:"

crt.Screen.Send "password" & vbCr



End Sub


I would to be able to have a file that contains my passwords, example:
password.vbs:

$router1 = passworda
$router2 = passwordb

and call it

crt.Screen.Send "password" & vbCr
crt.Screen.Send "$router1" & vbCr
Reply With Quote
  #4  
Old 03-20-2007, 04:27 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
Thanks wakti, that helps.

I'm not sure how exactly to include the password VBScript into the script that's running, but it probably requires reading all of the password VBS file and then running the statements with ExecuteGlobal. Perhaps a VBScript guru out there has an example.

There may be an easier way.

If you could read the password file into an array and then access the passwords through the array, would this help you?

If you have a file of the format $router1 = passworda, etc., how would you know which router (1..n) 10.162.39.44 would be, and consequently which password to use?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #5  
Old 03-20-2007, 11:01 PM
wakti wakti is offline
Registered User
 
Join Date: Jan 2007
Posts: 10
I was thinking it would load the entire file of passwords and call the $router1 value when I connect using the router1 script.
Reply With Quote
  #6  
Old 03-22-2007, 05:34 PM
miked's Avatar
miked miked is offline
Registered User
 
Join Date: Feb 2004
Posts: 2,040
wakti,

I can see how including the file would be ideal in many situations. There is a forum post on our website which contains an example of including VBScript files in your CRT VBScript:
http://forums.vandyke.com/showthread...=executeglobal
Here is another example:
http://www.source-code.biz/snippets/vbscript/5.htm
Would it be helpful for you if SecureCRT had an option to keep a cache or a dictionary of keys and passwords that you could read, instead of having to include the VBScript, or do you think the examples above will help you meet your goal?
__________________
Mike
VanDyke Software
Technical Support
[http://www.vandyke.com/support]
Reply With Quote
  #7  
Old 03-23-2007, 02:59 PM
wakti wakti is offline
Registered User
 
Join Date: Jan 2007
Posts: 10
Quote:
Originally Posted by miked
wakti,

I can see how including the file would be ideal in many situations. There is a forum post on our website which contains an example of including VBScript files in your CRT VBScript:
http://forums.vandyke.com/showthread...=executeglobal
Here is another example:
http://www.source-code.biz/snippets/vbscript/5.htm
I would take a look. thank you!

Would it be helpful for you if SecureCRT had an option to keep a cache or a dictionary of keys and passwords that you could read, instead of having to include the VBScript, or do you think the examples above will help you meet your goal?
That would be great if Securecrt would do this.
Reply With Quote
  #8  
Old 03-26-2007, 10:09 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Wakti,

I have added this forum post to our features request database so see if a method to store all the user names with their password/key pair can be added to SecureCRT.

If this is added, a post will be made here. If you would prefer to be contacted via email, please send us a message.
__________________
Thanks,

Teresa

Teresa Nygren
Reply With Quote
  #9  
Old 04-02-2007, 05:33 PM
wakti wakti is offline
Registered User
 
Join Date: Jan 2007
Posts: 10
I have subscribed to this forum, so a post here will be fine. Thank you!
Reply With Quote
  #10  
Old 06-18-2008, 05:45 PM
wakti wakti is offline
Registered User
 
Join Date: Jan 2007
Posts: 10
I wanted to check and see if this will be include in the beta that is going to be released tomorrow. Thanks!
Reply With Quote
  #11  
Old 06-19-2008, 07:19 AM
tnygren's Avatar
tnygren tnygren is offline
Registered User
 
Join Date: May 2005
Posts: 1,408
Hi Wakti,

This feature is not part of the SecureCRT 6.1 release.

However, it is still under consideration for other future releases.

We will definitely make a post here if this option is included in any future release to let you know.
__________________
Thanks,

Teresa

Teresa Nygren
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 08:15 AM.