Page 1 of 1

How to dynamically escape % symbols?

Posted: 04 Apr 2024 15:53
by SIMMS7400
Hi All -

We have automation passwords that need to be encrypted for our financial applications. We have a password generator/randomizer that we use. When % symbols are present, we need to remember to always escape them, however, a lot of the folks forget to do that.

Let's say I have a string : O*!)v5ib0&73d(KGQ&A%

Is there a way to write code to automatically escape that making it : O*!)v5ib0&73d(KGQ&A%%

?

Haven't found a way yet.

Re: How to dynamically escape % symbols?

Posted: 06 Apr 2024 19:18
by Squashman
Jeb's MagicEcho might help
viewtopic.php?t=6446

Re: How to dynamically escape % symbols?

Posted: 08 Apr 2024 01:33
by jeb
SIMMS7400 wrote:
04 Apr 2024 15:53
We have automation passwords that need to be encrypted for our financial applications. We have a password generator/randomizer that we use. When % symbols are present, we need to remember to always escape them, however, a lot of the folks forget to do that.
Without further description of the involved batch files this can't be answered.

Where is the password stored, in the batch file itself, in a config file, is it read by set /p ???

Re: How to dynamically escape % symbols?

Posted: 08 Apr 2024 16:35
by SIMMS7400
jeb wrote:
08 Apr 2024 01:33
SIMMS7400 wrote:
04 Apr 2024 15:53
We have automation passwords that need to be encrypted for our financial applications. We have a password generator/randomizer that we use. When % symbols are present, we need to remember to always escape them, however, a lot of the folks forget to do that.
Without further description of the involved batch files this can't be answered.

Where is the password stored, in the batch file itself, in a config file, is it read by set /p ???
Hi Jeb - it's a user prompt. The user enters it and it's stored via set /p.

Thank you!

Re: How to dynamically escape % symbols?

Posted: 10 Apr 2024 08:16
by Sponge Belly
Hi SIMMS7400,

You may want to read the Mask Password with Asterisk topic. ;)

- SB