[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

VBscript to mask password when using Juniper nclauncher.exe

Posted on 2011-09-20
5
Medium Priority
?
935 Views
Last Modified: 2012-05-12
Hi,

Im looking for a VBscript that masks password to be used with Junipers nclauncher.exe.
Till now I have a batch file that pickes up the user name, then the realm url etc. using nclauncher.exe.
The password is empty so user need to type it in, but the problem is thats in clear text and that is not good.
I was hoping to use a VBscript that promts the user to type the password, but masks it, then use it in the nclauncher.exe filed Password:

nclauncher [-url Url] [-u username] [-p password] [-r realm]

Hope this is possible or if there is an other solution even better?

fjebja
0
Comment
Question by:Bjarte Fjelland
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 65

Expert Comment

by:RobSampson
ID: 36570415
Hi, perhaps something like this would work?

Run it with
cscript RunNCLauncher.vbs

We could could make the more static parameters get passed as arguments to the script if you wanted to.

Regards,

Rob.
Set objPassword = CreateObject("ScriptPW.Password") 

WScript.StdOut.Write "Enter your URL: "
strURL = WScript.StdIn.ReadLine
WScript.StdOut.Write "Enter your username: "
strUsername = WScript.StdIn.ReadLine
WScript.StdOut.Write "Please enter your password: "
strPassword = objPassword.GetPassword() 
WScript.StdOut.Write "Enter your realm: "
strRealm = WScript.StdIn.ReadLine

strCommand = "nclauncher -url " strUrl & " -u " & strUsername & " -p " & strPassword & " -r " & strRealm
Set objShell = CreateObject("WScript.Shell")
objShell.Run strCommand, 1, False

Open in new window

0
 
LVL 1

Author Comment

by:Bjarte Fjelland
ID: 36576388
Hi Rob,

Great and thank you, thats what Im looking for.
I just added '&' after -url "
strCommand = "nclauncher -url " & strUrl & " -u " & strUsername & " -p " & strPassword & " -r " & strRealm

Is it possible to only use users password?
put the URL in the script, same with realm, fetch the username from windows.

Hope Im not asking to mutch?
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 2000 total points
ID: 36577275
OK, that's easy.  We just change the parameters at the top to be hardcoded instead of input boxes.

Rob.
Set objPassword = CreateObject("ScriptPW.Password") 
Set objNetwork = CreateObject("WScript.Network")

strURL = "http://10.0.0.1"
strUsername = objNetwork.UserName
WScript.StdOut.Write "Please enter your password: "
strPassword = objPassword.GetPassword() 
strRealm = "yourealm"

strCommand = "nclauncher -url " & strUrl & " -u " & strUsername & " -p " & strPassword & " -r " & strRealm
Set objShell = CreateObject("WScript.Shell")
objShell.Run strCommand, 1, False

Open in new window

0
 
LVL 1

Author Closing Comment

by:Bjarte Fjelland
ID: 36583158
Yes, thats it!
Thank you so much!
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 36583936
No problem.

Rob.
0

Featured Post

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question