Code: Select all
@echo off
setlocal enabledelayedexpansion
set chars=q w e r t y u i o p a s d f g h j k l z x c v b n m 1 2 3 4 5 6 7 8 9 0
:input
cls
echo input password:
if defined display echo %display%
choice /c "!chars: =!" >nul
if not %errorlevel%==37 (
for /f "tokens=%errorlevel%" %%a in ("%chars%") do set input=%%a
set password=%password%%input%
set display=%display%*
goto input
) else (
echo your password is: %password%
pause
)
exit
A-Z and 0-9 are all used. What can be used to create a fallthrough for CHOICE?