Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :main
- @echo off
- cls
- color a
- TITLE Bautista Project
- mode CON: COLS=80 lines=20
- setlocal EnableDelayedExpansion
- @echo %date%
- @echo _____________________________
- @echo ^| ^|
- @echo ^| Authentication required ^|
- @echo +_____________________________+
- @echo.
- set usr=
- set /p usr=Username:
- if not defined usr goto main
- set pwd=
- set /p pwd=Password:
- if not defined pwd goto failed
- for /f "tokens=* delims=" %%a in (file.txt) do (
- set _usr=!_pwd!
- set _pwd=%%a
- )
- if %usr%==!_usr! (
- if %pwd%==!_pwd! (
- goto success
- ) else (
- goto failed
- )
- ) else (
- goto failed
- )
- :success
- echo.
- echo Access granted
- pause>nul
- call menu.bat
- :failed
- echo.
- echo Access denied
- pause>nul
- goto main
- pause>nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement