Computing.Net > Forums > Programming > login process not secure

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

login process not secure

Reply to Message Icon

Name: lee123abc
Date: September 23, 2008 at 09:02:17 Pacific
OS: win xp 5.1.2600
CPU/Ram: 3mhz/2 gig
Product: dell
Comment:

Hi, can anyone tell me why this login is messed up? If you type a space instead of the username and a space instead of the password, it lets you through!!! I dont understand where the error is. Cheers

echo off
cls
set password=123
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:login_name_password
:enter_username
cls
set login_name=
set /p login_name=Enter Login Name...
cls
:enter_password
set login_password=
set /p login_password=Enter password...
cls
echo.
echo You entered (%login_name%)
echo (%login_password%)
echo.
set login_accept=
set /p login_accept=To accept entries enter '1' or any other key to start over...
if '1' == '%login_accept%' (
goto login_process
) else (
goto login_name_password
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:login_process
if /i '%username%' equ '%login_name%' (
goto login_process_password
) else (
goto login_process_error1
)
:login_process_password
if /i '%password%' equ '%login_password%' (
goto login_passed
) else (
goto login_process_error2
)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:login_process_error1
cls
echo.
echo You have typed in an incorrect Login Name. Please try again...
set login_name=
set /p login_name=Enter Login Name...
goto login_process
:login_process_error2
cls
echo.
echo You have typed in an incorrect Password. Please try again...
set login_password=
set /p login_password=Enter password...
goto login_process
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:login_passed
cls
echo.
echo Login process complete.
pause
pause



Sponsored Link
Ads by Google

Response Number 1
Name: toast (by NoIdea)
Date: September 24, 2008 at 01:07:09 Pacific
Reply:

Here is a batch that works you will have to take some ideas and change things:-

@echo off
color 1A
set tries=4
:top
cls
set /a tries=%tries% -1
if %tries%==1 (
goto :last
)
echo.
echo.
echo You have %tries% attempts.
echo.
echo.
SET Choice=
SET /P Choice= Enter Password (no spaces):-^>
cls
IF /I '%Choice%'=='?Your password here?' (
GOTO :sdown
) else (
GOTO :next
)
:next
echo.
echo.
echo You have entered "%choice%" this is incorrect
echo %date% - %time% >>D:\IntLog.txt
echo %choice% >>D:\IntLog.txt
echo. >> D:\IntLog.txt
echo.
@ping -n 4 127.0.0.1>nul
cls
GOTO :top
:last
echo.
echo.
echo You have %tries% attempt left.
echo.
echo.
SET Choice=
SET /P Choice= Enter Password (no spaces):-^>
cls
IF /I '%Choice%'=='?Your password here?' (
GOTO :sdown
) else (
GOTO :next1
)
:next1
echo.
echo.
echo You have entered "%choice%" this is incorrect
echo %date% - %time% >>D:\IntLog.txt
echo %choice% >>D:\IntLog.txt
echo. >> D:\IntLog.txt
echo.
@ping -n 4 127.0.0.1>nul
cls
echo.
echo.
echo PASSWORD IS NOT VALID.
echo.
echo GO TO Mr SMITHERS AND ASK FOR PASSWORD
@ping -n 4 127.0.0.1>nul
GOTO :eof
:sdown
echo.
echo.
echo Don't worry Internet Explorer is starting
start "" "C:\Program Files\Internet Explorer\iexplore.exe" http://www.google.co.uk/
cls
::End


0

Response Number 2
Name: lee123abc
Date: September 24, 2008 at 01:42:34 Pacific
Reply:

Thank you NoIdea, I will take a look at that and let you know the outcome!


0

Response Number 3
Name: toast (by NoIdea)
Date: September 24, 2008 at 03:01:45 Pacific
Reply:

You are most welcome


0

Response Number 4
Name: FishMonger
Date: September 24, 2008 at 08:29:17 Pacific
Reply:

Batch script / secure login

By definition that would be an oxymoron!


0

Response Number 5
Name: lee123abc
Date: September 24, 2008 at 08:41:02 Pacific
Reply:

I KNOW WHAT YOU MEAN!!!
Try this out though...
NB ** run this batch from command prompt otherwise it WONT work ***
Type 'login username 123' and enter.
It seems harder to crack than any other method so far.

@ECHO OFF
CLS
:USERNAME
IF /I "%USERNAME%" == "%1" (
GOTO PASSWORD
) ELSE (
GOTO ERROR
)
:PASSWORD
IF "%2" == "123" (
ECHO WELCOME %USERNAME%
ECHO YOU ARE NOW LOGGED ON...
PAUSE
GOTO END
) ELSE (
GOTO ERROR
)
:ERROR
ECHO YOU TYPED INCORRECT USERNAME/PASSWORD.
ECHO PLEASE TRY AGAIN.
GOTO END
:END


0

Related Posts

See More



Response Number 6
Name: FishMonger
Date: September 24, 2008 at 08:57:14 Pacific
Reply:

The only people that can't crack that in under 2 seconds would be ones that don't know about the type or more command or a text editor, i.e those that have never used a computer.


0

Response Number 7
Name: FishMonger
Date: September 24, 2008 at 09:03:21 Pacific
Reply:

If you want a secure login, you need to use encrypted passwords that are stored in database.

Putting the password into a batch file is utterly useless/pointless.


0

Response Number 8
Name: lee123abc
Date: September 24, 2008 at 09:04:37 Pacific
Reply:

ok, point proved.

Time to learn VB then?!!!


0

Response Number 9
Name: lee123abc
Date: September 24, 2008 at 09:09:28 Pacific
Reply:

I did try learning Microsoft Access... but it never worked, so I gave up on that. I do see that anyone can just edit the bat file and get the password! Anyway, it was just a simple idea that I wanted to do for a colleague that wanted a bat file for something.
I suppose I may have gone overboard with the login bit.


0

Response Number 10
Name: FishMonger
Date: September 24, 2008 at 09:09:44 Pacific
Reply:

Time to learn one or more of the following.

VB, Perl, Python, C, C#, C++, etc


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: login process not secure

Password Protect Folder...Secure? www.computing.net/answers/programming/password-protect-foldersecure/8891.html

Check for file existance on server www.computing.net/answers/programming/check-for-file-existance-on-server/16291.html

VBScript Website Login help www.computing.net/answers/programming/vbscript-website-login-help/16675.html