Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Does anyone know how to write a login screen that shows up in cmd?

I am writing a program that makes it look like a hacking program and I need to start with a login.... access granted/denied and stuff please help

1 Answer

Relevance
  • 8 years ago
    Favorite Answer

    @echo off

    color e0

    :newadmin

    echo.

    echo.

    echo ////////////////////////////Login Setup Screen//////////////////////////////////

    echo.

    if exist c:\hidden\systemdata\*.txt goto userlogin

    echo.

    echo.

    echo This will set up your user name and password.

    echo.

    echo Only (A-Z) (a-z) (0-9) characters are supported.

    echo.

    echo.

    set /p newadminuser=Enter new username:

    echo. >> c:\hidden\systemdata\%newadminuser%

    attrib c:\hidden\systemdata\%newadminuser% +h

    echo.

    set /p newadminpass=Enter new password:

    echo. >> c:\hidden\systemdata\%newadminpass%

    attrib c:\hidden\systemdata\%newadminpass% +h

    echo.

    echo.

    set /p hint=Enter password hint:

    echo. %hint% >> c:\hidden\systemdata\hint.txt

    echo.

    echo.

    echo Login entries saved.

    echo.

    pause

    goto userlogin

    :userlogin

    cls

    color e0

    echo.

    echo.

    echo /////////////////////////////////Login Screen///////////////////////////////////

    echo.

    echo.

    echo.

    set /p loginname=username:

    if exist c:\hidden\systemdata\%loginname% goto userpass

    echo.

    echo %loginname% is not a valid username.

    pause

    cls

    goto userlogin

    :userpass

    cls

    color e0

    echo.

    echo.

    echo /////////////////////////////////Login Screen///////////////////////////////////

    echo.

    echo.

    echo.

    set /p loginpass=password:

    if exist c:\hidden\systemdata\%loginpass% goto porterdbs

    if not exist c:\hidden\systemdata\%loginpass% goto showhint

    :showhint

    echo.

    echo Password entered is incorrect.

    pause

    type c:\hidden\systemdata\hint.txt

    pause

    goto userpass

Still have questions? Get your answers by asking now.