Windows Command Line – Password function

Here is a little password function if you need it. Be aware that it is very slow, don’t type too fast. 😉 It’s more a concept than a tool you can work with.

Just Enter your password and hit ALT+222 (on your numblock) to terminate.

@echo off
setLocal EnableDelayedExpansion

set allchar=Þ1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
set pw=

echo Please enter password SLOWLY and terminate with ALT+222
choice /C %allchar% /CS >nul
set cint=%errorlevel%
set /a cint-=1
set pw=%pw%!allchar:~%cint%,1!
if %cint% neq 0 goto pwloop

set pw=%pw:~0,-1%
echo %pw%
set pw=

Here a picture for proof of concept