#1
|
|||
|
|||
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!
|
#2
|
||||
|
||||
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:
Quote:
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] |
#3
|
|||
|
|||
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 |
#4
|
||||
|
||||
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] |
#5
|
|||
|
|||
I was thinking it would load the entire file of passwords and call the $router1 value when I connect using the router1 script.
|
#6
|
||||
|
||||
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...=executeglobalHere is another example: http://www.source-code.biz/snippets/vbscript/5.htmWould 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] |
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
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 |
#9
|
|||
|
|||
I have subscribed to this forum, so a post here will be fine. Thank you!
|
#10
|
|||
|
|||
I wanted to check and see if this will be include in the beta that is going to be released tomorrow. Thanks!
|
#11
|
||||
|
||||
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 |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|