TransWikia.com

"read -s" equavalent for windows?

Super User Asked on December 13, 2021

In Linux you can type and store a value without displaying what you are typing by adding the -s argument to the read command.

Is there an equivalent command in Windows?

2 Answers

The following is an equivalent for just read without the -s flag. What you input will be displayed, as set does not support a flag equivalent of -s, but it's a starting point security-wise, as at least your secret won't be kept in your terminal history.

# set /P PASSWORD="> "
> secret

# echo %PASSWORD%
secret

Answered by Lucas Cimon on December 13, 2021

http://nurky.rf.gd/dl/conset.zip
Password is:broughtToYouByTheG00D0n3$
( Password is there to stop the provider from scanning the archive, just to point out)

After extracting, type:

conset /PH myValue=

Input something and hit enter. Now type this to see did it worked:

echo %myValue%

Good luck :)

Answered by user696300 on December 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP