Like you already know, websites have certain special chars for passwords, like stars and circles.
Could this be possible in a batch file, on the following one:?
If this is not possible, if you type it in, could you just see nothing?
set pass=
set /p pass=Enter your password:
if {%pass%}=={} goto :begin
set authenticated=
for /f "tokens=*" %%a in (pass.txt) do (
if {%%a}=={%pass%} set authenticated=true
)
if not defined authenticated (echo Invalid password & goto :begin)
But i need to get this in it:
for /f "delims=" %%i in ('cscript /nologo GetPwd.vbs')
HOW!
Another alternative is my editenv command-line tool:
https://github.com/Bill-Stewart/editenv/
editenv --maskinput --prompt "Password: " PWD
Note that this doesn't provide security, as (in this example) the content of the PWD
environment variable is clear-text. Still, it does provide input masking in cases where this might be useful.
[Old obsolete answer]
Another alternative is my EditV32 (x86) or EditV64 (x64) command-line tools. For example:
editv32 -m -p "Password: " PWD
-m means "masked input" and -p is the prompt. The user's input is stored in the PWD environment variable. You can get it here: