Jump to content

Escape Password Strings


Recommended Posts

Hi All,

Am attempting to put together a quick front-end to enable the team here to access our UNIX boxes from PuTTY. We use a SSH gateway and bastion host arrangement, so to login to a server, you need to access the GW, then the bastion and finally the server. Obviously lots of typing of the same details is required and is obviously prone to error.

Have got something that works (simple GUI with hostname, username and password fields) however I need the password field to support all and any characters (we have quite a stiff password policy), so for instance Ev!lPassword.

If I hardcode the password in (for testing) I can get it to work by simply using Send() and escaping any random characters (eg Send("Ev{!}lPassword{ENTER}"), however this isn't how it is entered in the GUI so it doesn't work the same.

Have tried...

Send("Ev!lPassword" & "{ENTER}"), adding the raw flag and other permutations to try and get it to work, but without success.

Is there a way of escaping the entire string to then place into Send(), or is there some other mechanism to make this work (convert to ASCII and send the lot as an ASCII string for example). I suppose you could get it to iterate over the entire string, escaping specific chars, but that seems very kludgy to me.

Any ideas???

Thanks

Dan

Link to comment
Share on other sites

  • 8 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...