Batch Secure Login+Register
Here is the code.By Mustafac
@echo off
IF EXIST Username.uf (
IF EXIST Password.uf (
Goto Login
)) ELSE (Goto Reg)
:Reg
Title Register
Echo REGISTERATION
Echo:
set /p U=Username:
set /p P=Password:
Echo %P%>password.uf
Echo %U%>username.uf
Echo Registeration Complete!
Echo Press any key
Pause>nul
:Login
cls
setlocal
set User2=
for /f "tokens=*" %%a in ('type username.uf 2^>NUL') do set User2=%%a
set Pass2=
for /f "tokens=*" %%a in ('type password.uf 2^>NUL') do set Pass2=%%a
:Loginp2
Title Log in
cls
Echo Log in
Echo:
set /p user= Username:
set /p pass= Password:
if /i %user% equ %User2% (
if /i %pass% equ %Pass2% (
goto W
)
) else (goto IC)
:IC
cls
echo The Password/Username was incorrect please try again
Echo:
Echo Press any key
Pause>nul
goto Login
:W
cls
Title Example
Echo Welcome to the example Program!
echo Press any key to exit!
Pause>nul