Follow us on Twitter!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Sunday, April 20, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 33
Guests Online: 30
Members Online: 3

Registered Members: 82843
Newest Member: hx47
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

better batch log in help


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 14-05-06 20:33
sorry if this sounds bumb but i was trying to make a batch log in file which needs both a username and password but it didnt work this is what i had,

@echo off
color 1B
::find "username" userthenpass.bat | sort
goto username
:start
SET /P prompt=Please enter your username:
ECHO.
IF /I '%prompt%'=='%username%' GOTO solution
cls
echo that is not a registered username
Pause
cls
goto start
exit
:username
SET username= hello
goto start
:solution
cls
echo welcome hello, please put in your password before you can continue

::find "password" userthenpass.bat | sort
goto password
:start
SET /P prompt=Please enter your password:
ECHO.
IF /I '%prompt%'=='%password%' GOTO solution
cls
echo wrong password
Pause
cls
goto start
exit
:password
SET password= hello
goto start
:solution
cls
echo welcome hello, you are now sucsessfuly logged in!

any help would be greatly appreciated.
Author

RE: better batch log in help

bl4ckc4t
Member

Your avatar

Posts: 591
Location: /etc/
Joined: 07.03.06
Rank:
Wiseman
Posted on 14-05-06 21:07
MaW wrote:
sorry if this sounds bumb but i was trying to make a batch log in file which needs both a username and password but it didnt work this is what i had,

@echo off
color 1B
::find "username" userthenpass.bat | sort
goto username
:start
SET /P prompt=Please enter your username:
ECHO.
IF /I '%prompt%'=='%username%' GOTO solution
cls
echo that is not a registered username
Pause
cls
goto start
exit
:username
SET username= hello
goto start
:solution
cls
echo welcome hello, please put in your password before you can continue

::find "password" userthenpass.bat | sort
goto password
:start
SET /P prompt=Please enter your password:
ECHO.
IF /I '%prompt%'=='%password%' GOTO solution
cls
echo wrong password
Pause
cls
goto start
exit
:password
SET password= hello
goto start
:solution
cls
echo welcome hello, you are now sucsessfuly logged in!

any help would be greatly appreciated.


My advise - Batch doesnt do too well for a password login. People just right-click then click edit and they can see whats inside.
Number 2 - Find doesnt work very well anymore. What you want is something like

Code
@echo off
color 4F
goto username

:start
SET /P prompt=Please enter your name:
ECHO.
IF /I '%prompt%'=='%username%' GOTO pass
cls
echo Sorry, the username you gave was incorrect!
Pause
cls
goto start


:username
SET username=hello
goto start

:pass
SET pass=pass
goto password

:password
SET /P prompt=Please enter your password:
ECHO.
IF /I '%prompt%'=='%pass%' GOTO solution
cls
echo Sorry, the password you gave was incorrect!
Pause
cls
goto start

:solution
cls
echo Correct Login and Pass
pause
cls
exit




I tried this and it works. Build off of this. (sorry for butchering your code, S_M, But I had to for the sake of my sanity)

Bl4ckC4t




Edited by bl4ckc4t on 14-05-06 21:08
Author

RE: better batch log in help

SySTeM
Member

Your avatar

Posts: 1524
Location: England, UK
Joined: 27.07.05
Rank:
HBH Guru
Posted on 14-05-06 21:12
Lol, don't worry blackcat


img138.imageshack.us/img138/6527/sig2ak1.jpg
www.hellboundhackers.org/sig/r/2783.png

http://www.elites0ft.com/