1.

Solve : display text as stars (password)?

Answer»

Quote from: Geek-9pm on December 05, 2009, 03:14:18 PM

Logical error, password was not defined. Otherwise, it works if password was already defined in the system earlier.

password is not a variable, there is nothing to define. password is a literal. Setting the password to password was perhaps a POOR choice although it seemed inspired at the time.

I made a few changes for the critics among you: (but the password is still password)

Code: [SELECT]@echo off
setlocal
echo hP1X500P[PZBBBfh#b##[emailprotected]`$fPf]f3/f1/5++u5>hide.com

:retry
set /p userid=Enter UserId:
set /p pass=Enter password: < nul
for /f "tokens=*" %%i in ('hide.com') do set pass=%%i
if /i .%pass%==.password goto next
cls
echo TRY again. You are not logged in!
goto retry

:next
echo. & echo You are logged in!
del hide.com
endlocal



Salmon is right, anybody serious about security would never use a batch file to authenticate a password. Hide.com is actually an assembled debug SCRIPT which shuts off echoing on the command line, but at some point the password entered has to be compared to the actual password and this is where anybody that can read batch code can learn the password.Sidewinder,
You are right!
Where can I find the source code for hide.com ?

Quote from: Geek-9pm on December 05, 2009, 06:08:26 PM
Where can I find the source code for hide.com ?

Code: [Select]
Your Message here


I decided to take the source code down. The assembled code is in the batch file, so someone imaginative should be able to produce the source code. Good luck.
Is there a command or value too, like if your password is 3 times incorrect wait 1 day?Quote from: pds on December 13, 2009, 04:53:20 AM
Is there a command or value too, like if your password is 3 times incorrect wait 1 day?

what are you trying to do actually? manually hand crafting password control with batch?? If you want to do the above, you have to set policiesMS does not recommend using batch to manage passwords.
If you really need it, you will have to learn to read
programs in C++ and study the work of others.
Quote
MS-CHAP Password Management API
Purpose
The MS-CHAP Password Management API makes it possible to use MS-CHAP to change user passwords. Windows programmers can use this API to create applications to change the passwords of networked users on remote workstations.
http://msdn.microsoft.com/en-us/library/ms697873(VS.85).aspx
i also do


Discussion

No Comment Found