Home / Microsoft / Microsoft DOS / Input hiding (different from password hiding)
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 ... 5  All - (Bottom) Print
Author Topic: Input hiding (different from password hiding)  (Read 8453 times)
Helpmeh
Topic Starter
Egghead



Thanked: 117
Posts: 3,608

Experience: Experienced
OS: Windows XP


Roar.

1
« on: April 16, 2009, 03:08:19 PM »

In batch, a user will be entering a password to allow them access, but I want it so someone looking over their shoulder can't see the password (sortof like...not sort of like, exactly like password masking in VB)...

I saw this a while ago, but I can't find it anymore  :-\.

I can use a 3rd party program, but it has to be a very small file size (as small as possible!)
« Last Edit: April 22, 2009, 07:16:17 PM by Helpmeh » IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
macdad-
Expert



Thanked: 39
Posts: 2,520


LoneWolf's Circuits
« Reply #1 on: April 16, 2009, 08:04:03 PM »

Here  ;)
IP logged

If you dont know DOS, you dont know Windows...

Thats why Bill Gates created the Windows NT Family.
Prince_
Beginner



Thanked: 5
Posts: 63


« Reply #2 on: April 17, 2009, 06:51:19 AM »

Code: [Select]
@echo off & setlocal        %CheckPWD {s11ss@bbs.cn-dos.net 2008-12-12}%

echo Password:
call :CheckPWD p1 123456 *
echo.
if errorlevel 1 (echo %p1% - No) else (echo %p1% - Yes)

echo.

echo Password:
call :CheckPWD p2 123456
if errorlevel 1 (echo %p2% - No) else (echo %p2% - Yes)

pause & goto :eof






:CheckPWD
setlocal & if "%~2"=="" exit /b 1

for /f "tokens=1 delims=:" %%a in ('findstr /nrc:"^e100 B7 2A 80" "%~f0"') do set /a n=%%a-1
more /e +%n%<"%~f0" | debug>nul

if "%~3"=="" x>nul
if "%~3" neq "" set c=%~3 & call set "c=%%c:~0,1%%"
if "%~3" neq "" x %c%

for /f %%a in ('x -o') do set "p=%%a"

endlocal & set "%~1=%p%" & del x.com & if "%~2"=="%p%" (exit /b 0) else (exit /b 1)

e100 B7 2A 80 3E 80 00 00 74 22 80 3E 80 00 02 75 06
e110 8A 3E 82 00 EB 15 83 E0 00 8E D8 80 3E 00 02 00
e120 74 6A BA 01 02 B4 09 CD 21 EB 61 83 E6 00 8E C6
e130 80 E4 00 CD 16 8A D8 80 FB 1B 75 08 26 80 26 00
e140 02 00 EB 48 80 FB 0D 74 37 80 FB 08 75 1A 83 FE
e150 00 74 DD B2 08 B4 02 CD 21 B2 20 B4 02 CD 21 B2
e160 08 B4 02 CD 21 4E EB C8 80 FB 21 72 C3 80 FB 7E
e170 77 BE 8A D7 B4 02 CD 21 26 88 9C 01 02 46 EB B0
e180 26 C6 84 01 02 24 26 C6 06 00 02 24 B8 00 4C CD
e190 21
nx.com
rcx
91
w
q
IP logged
Helpmeh
Topic Starter
Egghead



Thanked: 117
Posts: 3,608

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #3 on: April 18, 2009, 02:34:44 PM »

Here  ;)
Thanks macdad, but I'm afraid that won't work (or I don't know how it could work). What I happens is the user enter's their username, then their password. If the username and password don't match a line in a file, then the user tries again, or gives up...Is there a way that it can MASK the input (like in visual basic), instead of doing it letter by letter?
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
macdad-
Expert



Thanked: 39
Posts: 2,520


LoneWolf's Circuits
« Reply #4 on: April 18, 2009, 03:22:40 PM »

I believe it may be possible in VBScript.
IP logged

If you dont know DOS, you dont know Windows...

Thats why Bill Gates created the Windows NT Family.
Helpmeh
Topic Starter
Egghead



Thanked: 117
Posts: 3,608

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #5 on: April 18, 2009, 04:16:12 PM »

I believe it may be possible in VBScript.
I know absolutely nothing (usefull) in VBScript...can you show me how to/make it?
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
macdad-
Expert



Thanked: 39
Posts: 2,520


LoneWolf's Circuits
« Reply #6 on: April 18, 2009, 04:37:11 PM »

I'm not knowledgeable in VBScript either.   :P

I think Ghostdog is good with it though.

IP logged

If you dont know DOS, you dont know Windows...

Thats why Bill Gates created the Windows NT Family.
Helpmeh
Topic Starter
Egghead



Thanked: 117
Posts: 3,608

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #7 on: April 18, 2009, 04:51:28 PM »

I'm not knowledgeable in VBScript either.   :P

I think Ghostdog is good with it though.


So, should I post this in "Computer Programming"?
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
macdad-
Expert



Thanked: 39
Posts: 2,520


LoneWolf's Circuits
« Reply #8 on: April 18, 2009, 04:57:49 PM »

Your decision.
IP logged

If you dont know DOS, you dont know Windows...

Thats why Bill Gates created the Windows NT Family.
Helpmeh
Topic Starter
Egghead



Thanked: 117
Posts: 3,608

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #9 on: April 18, 2009, 05:04:05 PM »

Your decision.
Just did. Thanks for your help macdad-!
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
Reno
Hopeful



Thanked: 32
Posts: 323




« Reply #10 on: April 18, 2009, 10:51:39 PM »

I'm not knowledgeable in VBScript either.   :P

I think Ghostdog is good with it though.
ghostdog will only suggest you:
- installs gawk, see my sig
- if you are able to download stuffs, you can use sed (check my sig for link).
- if you want to do programming/batching on windows, get a real programming language.
- Switch to *nix then.
-there are abundance of tools out there you can use. the unix Find command , which is ported to windows makes this kind of task seem trivial.
- and many more
IP logged
Geek-9pm
Sage



Thanked: 373
Posts: 8,930

Computer: Specs
Experience: Expert
OS: Windows XP


Geek After Dark

Geek 9pm blog
« Reply #11 on: April 18, 2009, 11:03:59 PM »

That looks very hard to do.  What is the ovjective?
You want the user to type in a passwrod at a prompt from inside a batrch?
The input must not have echo or just *** maybe?
The batch file can retrieve the password from some place the average user would not guess. Right?
IP logged

gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #12 on: April 19, 2009, 02:39:08 AM »

ghostdog will only suggest you:
for your info, i do give solutions in vbscript sometimes. see here.

Quote
- Switch to *nix then.
don't put words in my mouth.
as for your other comment, i can only say, I advocate using right tools for the job ->> productivity.

@helpmeh, see your other post and also here


IP logged

Dias de verano
Guest
« Reply #13 on: April 19, 2009, 02:57:37 AM »

ghostdog will only suggest you:
- installs gawk, see my sig
- if you are able to download stuffs, you can use sed (check my sig for link).
- if you want to do programming/batching on windows, get a real programming language.
- Switch to *nix then.
-there are abundance of tools out there you can use. the unix Find command , which is ported to windows makes this kind of task seem trivial.
- and many more

He surpassed himself in the other thread about this topic started by Helpmeh, by posting a link to Experts Exchange (plus the inevitable Perl script)

gawk, or dawk?


IP logged
gh0std0g74
Apprentice



Thanked: 37
Posts: 590


« Reply #14 on: April 19, 2009, 03:17:58 AM »

He surpassed himself in the other thread about this topic started by Helpmeh, by posting a link to Experts Exchange (plus the inevitable Perl script)

gawk, or dawk?



so do you have a problem with that? or are you purposely being irritating? take a hike. (or take your medicine if you haven't)
IP logged

Pages: [1] 2 3 ... 5  All - (Top) Print 
Home / Microsoft / Microsoft DOS / Input hiding (different from password hiding) « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.123 seconds with 20 queries.