-2

Im a beginner and i have a question about how i can mask the users input.

this is my code:

:Password  
echo Password:  
set /p pw=   
if %pw% EQU valarmorgulis goto Main  
if not %pw% EQU valarmorgulis goto Password  
pause > nul

I want the inputs that the user types in to not be shown on screen.

can anyone help me with that?

Thanks in advance

DannyD
  • 1
  • 3
    This doesn't look to be something trivial ... but there are many other questions on here that answer your question: [1](https://stackoverflow.com/a/668455/6577822), [2](https://stackoverflow.com/a/665191/6577822), [3](https://stackoverflow.com/a/36292638/6577822) – fjoe Aug 28 '17 at 08:04
  • @LotPings Whoops my mistake. Sorry for my non-sense. Here's a snippet from ss64: `EQU will perform a numeric comparison where possible, if you need a string comparison use the == comparison operator.` I should said that instead. –  Aug 28 '17 at 10:08
  • I already looked into these topics, but i couldnt get any of the solutions posted there to work. As i said, im a beginner and dont know much about batch. Any easy solution for my problem? – DannyD Aug 28 '17 at 10:13
  • @LotPings I'm not sure how `cmd` processes `EQU` and `==`, I'm also not sure if ss64's information is misleading. But I agree with what you said. –  Aug 28 '17 at 10:29
  • @DannyD How about some external tools? –  Aug 28 '17 at 10:30
  • @SteveFest I didnt try any external tools. – DannyD Aug 28 '17 at 10:56

1 Answers1

0

Herbert Kleebauer wrote several tools for hidden input.
An early one only usable in 16/32bit environment with .com files.

This latter version uses certutil to decode the base64 encoded .exe file.

To be able to verify integrity source code is included.