1.

Solve : how to hide password?

Answer»

hi experts,
I have created a batchfile which take input from the user such as user name and password. At this time when the user type the user name and password it display on the window i would like to hide the password while the user TYPING it is it possible?Quote from: brough on July 10, 2008, 09:45:02 AM

hi experts,
I have created a batchfile which take input from the user such as user name and password. At this time when the user type the user name and password it display on the window i would like to hide the password while the user typing it is it possible?
LET's get this straight?
So when the user types there password in you want it to come up as ***** for example?Quote from: Jacob on July 10, 2008, 10:42:04 AM
Quote from: brough on July 10, 2008, 09:45:02 AM
hi experts,
I have created a batchfile which take input from the user such as user name and password. At this time when the user type the user name and password it display on the window i would like to hide the password while the user typing it is it possible?
Let's get this straight?
So when the user types there password in you want it to come up as ***** for example?

Yes that is correctQuote from: brough on July 10, 2008, 10:50:13 AM
Quote from: Jacob on July 10, 2008, 10:42:04 AM
Quote from: brough on July 10, 2008, 09:45:02 AM
hi experts,
I have created a batchfile which take input from the user such as user name and password. At this time when the user type the user name and password it display on the window i would like to hide the password while the user typing it is it possible?
Let's get this straight?
So when the user types there password in you want it to come up as ***** for example?

Yes that is correct
Weird things is, i was wondering the exact same thing, shame i cannot help you.
Lets hope somebody canTry this. It was posted online quite some time ago but I can't remember where it is.

Code: [Select]@echo off
SET REAL_PASS=password
SET REAL_LENGTH=********

echo e100 B4 00 CD 16 88 E0 B4 4C CD 21> %temp%.\\\\scan.com
for %%? in (rcx A w q) do echo %%?>> %temp%.\\\\scan.com
type %temp%.\\\\scan.com |DEBUG %temp%.\\\\scan.com > nul

:pre
for %%? in (pass length) do set user_%%?=

:loop
set input=
cls
echo Type password: %user_length%
if \\"%user_pass%\\"==\\"%real_pass%\\" goto granted
if \\"%user_length%\\"==\\"%real_length%\\" goto denied
call %temp%.\\\\scan.com
if errorlevel=2 if not errorlevel=3 set input=1
if errorlevel=3 if not errorlevel=4 set input=2
if errorlevel=4 if not errorlevel=5 set input=3
if errorlevel=5 if not errorlevel=6 set input=4
if errorlevel=6 if not errorlevel=7 set input=5
if errorlevel=7 if not errorlevel=8 set input=6
if errorlevel=8 if not errorlevel=9 set input=7
if errorlevel=9 if not errorlevel=10 set input=8
if errorlevel=10 if not errorlevel=11 set input=9
if errorlevel=11 if not errorlevel=12 set input=0
if errorlevel=30 if not errorlevel=31 set input=a
if errorlevel=48 if not errorlevel=49 set input=b
if errorlevel=46 if not errorlevel=47 set input=c
if errorlevel=32 if not errorlevel=33 set input=d
if errorlevel=18 if not errorlevel=19 set input=e
if errorlevel=33 if not errorlevel=34 set input=f
if errorlevel=34 if not errorlevel=35 set input=g
if errorlevel=35 if not errorlevel=36 set input=h
if errorlevel=23 if not errorlevel=24 set input=i
if errorlevel=36 if not errorlevel=37 set input=j
if errorlevel=37 if not errorlevel=38 set input=k
if errorlevel=38 if not errorlevel=39 set input=l
if errorlevel=50 if not errorlevel=51 set input=m
if errorlevel=49 if not errorlevel=50 set input=n
if errorlevel=24 if not errorlevel=25 set input=o
if errorlevel=25 if not errorlevel=26 set input=p
if errorlevel=16 if not errorlevel=17 set input=q
if errorlevel=19 if not errorlevel=20 set input=r
if errorlevel=31 if not errorlevel=32 set input=s
if errorlevel=20 if not errorlevel=21 set input=t
if errorlevel=22 if not errorlevel=23 set input=u
if errorlevel=47 if not errorlevel=48 set input=v
if errorlevel=17 if not errorlevel=18 set input=w
if errorlevel=45 if not errorlevel=46 set input=x
if errorlevel=21 if not errorlevel=22 set input=y
if errorlevel=44 if not errorlevel=45 set input=z
if errorlevel=71 if not errorlevel=72 set input=7
if errorlevel=72 if not errorlevel=73 set input=8
if errorlevel=73 if not errorlevel=74 set input=9
if errorlevel=75 if not errorlevel=76 set input=4
if errorlevel=76 if not errorlevel=77 set input=5
if errorlevel=77 if not errorlevel=78 set input=6
if errorlevel=79 if not errorlevel=80 set input=1
if errorlevel=80 if not errorlevel=81 set input=2
if errorlevel=81 if not errorlevel=82 set input=3
if errorlevel=82 if not errorlevel=83 set input=0
if \\"%input%\\"==\\"\\" goto loop
set user_length=*%user_length%
set user_pass=%user_pass%%input%
goto loop

:granted
echo Access granted.
goto pass_end

:denied
echo Access denied.
:: Uncomment following line in ORDER to keep asking user the password
:: GOTO PRE
goto pre
goto pass_end

:pass_end
for %%? in (pass length) do set user_%%?=
for %%? in (pass length) do set real_%%?=
del %temp%.\\\\scan.com
pausehalf WORKS, backspace doesn't work.
thanks anyway.You can try this magical batch file:

Code: [Select]@echo off
:retry
echo hP1X500P[PZBBBfh#b##[emailprotected]`$fPf]f3/f1/5++u5>in.com
set /p password=Enter password:<nul
for /f "tokens=*" %%i in ('in.com') do (
set password=%%i
)
if /i not %password%==password cls && goto retry
del in.com

PS. The password is password, but you can change it.

Quote from: SIDEWINDER on July 10, 2008, 03:56:21 PM
You can try this magical batch file:

Code: [Select]@echo off
:retry
echo hP1X500P[PZBBBfh#b##[emailprotected]`$fPf]f3/f1/5++u5>in.com
set /p password=Enter password:<nul
for /f "tokens=*" %%i in ('in.com') do (
set password=%%i
)
if /i not %password%==password cls && goto retry
del in.com

PS. The password is password, but you can change it.


Not bad.


Discussion

No Comment Found