hide user input.
Moderator: DosItHelp
hide user input.
How do i hide user input. This is for password field. I don want the password to be visible. I tried searchin in google. Couldn find any
Re: hide user input.
☺
Wait, let me guess your next question.... How do I encrypt/decrypt passwords ?
http://www.dostips.com/forum/viewtopic.php?f=3&t=1226&start=15&hilit=encrypt
Welcome to DosTips " "
Code: Select all
>nul set /p myvar=[promptString]
http://www.dostips.com/forum/viewtopic.php?f=3&t=1226&start=15&hilit=encrypt
Welcome to DosTips " "
Re: hide user input.
Thanks for d response. Am sorry its not working :(. It is fine even if i can mask it with "*"... Pls Help
Re: hide user input.
[promptString] IS YOUR input
You've never used the set /? command before, have u ?
You've never used the set /? command before, have u ?
Re: hide user input.
i don want others to see my what i type. That is my question
Re: hide user input.
☺
Ok, I'm sorry, it apparently don't work from a batch
I couldn't find a working solution with set, but there is always the choice command.
That's a bit tricky though, you would have to use a loop..
something like:
An external app would be better though I don't know any
Ok, I'm sorry, it apparently don't work from a batch
I couldn't find a working solution with set, but there is always the choice command.
That's a bit tricky though, you would have to use a loop..
something like:
Code: Select all
set input=
:loop
>nul CHOICE /c:abcdefghi.........
set input=%input%%errorlevel%
if /i ["input"] neq ["659872"] goto :loop
An external app would be better though I don't know any
Last edited by Ed Dyreen on 30 Jun 2011 04:24, edited 1 time in total.
Re: hide user input.
Thanks , I have been tryin to find it Can you please help ASAP
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: hide user input.
Yes its call Autocom.exe (InputBox)
Re: hide user input.
Last edited by Ed Dyreen on 30 Jun 2011 04:47, edited 1 time in total.
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: hide user input.
Hooray for shameless advertising. Now make sure to integrate Ed's batch macros for optimum speed and performance. http://scriptingpros.com/viewforum.php?f=152
@Ed
Cleptography - Cleptography (key stealing) or executable modification of some popular mail systems.
Ed Dyreen wrote:this is what cleo means:
@Ed
Cleptography - Cleptography (key stealing) or executable modification of some popular mail systems.
Re: hide user input.
☺
Euh cleo, best not advertise beta products to our friends...
An alpha is on the way
Euh cleo, best not advertise beta products to our friends...
An alpha is on the way
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: hide user input.
Ed Dyreen wrote:☺
Euh cleo, best not advertise beta products to our friends...
An alpha is on the way
You are absolutely correct I just checked v1 and realized inputbox had not been built yet.
@arjun2988
I put this together real quick for you as an example. This will show you masked input boxes, and an example of RC4 encryption.
http://www.scriptingpros.com/scripts/cleptography/PasswordExample.zip
I use this same method if I want to encrypt my batch files instead of compiling them into useless exe's that dump the source into the temp directory. I just include the encryption tool along with my script. Encrypt a password to decrypt the script, and I end up with a batch file that looks like this.
Code: Select all
3E73E01A529AF309F5015A50967158C4A3151CC19F6F6A078E47147455688AD99EE9B2F3675306D3535345A64058E52FC67FAD7F75E2B155CEFA0
C187CFB1F05EB2A09C614DEE4D687E65F9B2766EA9504C49FAC81CC434EF1622EE43F3C3C3AD625D9CECA11FAEDB372BBA0FE651F1891492743108855A39A4651769F06DA39019310
4FD86506F1D44386C59F16EE75E27FBBB1A3F0E326AF87242E581A
Run it through the decrypt app and execute the batch script.
Good luck
If you are on an XP machine you can use a combo of batch / vbs. This method apparently will not work on later versions or rather you would need scriptpw.dll to run it.
GetPwd.bat
Code: Select all
@echo off
:: GetPwd.cmd - Get password with no echo.
<nul: set /p passwd=Password:
for /f "delims=" %%i in ('cscript /nologo GetPwd.vbs') do set passwd=%%i
echo.
:: This bit's just to prove we have the password.
echo %passwd%
GetPwd.vbs
Code: Select all
Set oScriptPW = CreateObject("ScriptPW.Password")
strPassword = oScriptPW.GetPassword()
Wscript.StdOut.WriteLine strPassword
You could also check here: http://www.computerhope.com/forum/index.php?topic=69496.0
Re: hide user input.
Cleptography wrote:Ed Dyreen wrote:☺
Euh cleo, best not advertise beta products to our friends...
An alpha is on the way
You are absolutely correct I just checked v1 and realized inputbox had not been built yet.
@arjun2988
I put this together real quick for you as an example. This will show you masked input boxes, and an example of RC4 encryption.
http://www.scriptingpros.com/scripts/cleptography/PasswordExample.zip
I use this same method if I want to encrypt my batch files instead of compiling them into useless exe's that dump the source into the temp directory. I just include the encryption tool along with my script. Encrypt a password to decrypt the script, and I end up with a batch file that looks like this.Code: Select all
3E73E01A529AF309F5015A50967158C4A3151CC19F6F6A078E47147455688AD99EE9B2F3675306D3535345A64058E52FC67FAD7F75E2B155CEFA0
C187CFB1F05EB2A09C614DEE4D687E65F9B2766EA9504C49FAC81CC434EF1622EE43F3C3C3AD625D9CECA11FAEDB372BBA0FE651F1891492743108855A39A4651769F06DA39019310
4FD86506F1D44386C59F16EE75E27FBBB1A3F0E326AF87242E581A
Run it through the decrypt app and execute the batch script.
Good luck
If you are on an XP machine you can use a combo of batch / vbs. This method apparently will not work on later versions or rather you would need scriptpw.dll to run it.
GetPwd.batCode: Select all
@echo off
:: GetPwd.cmd - Get password with no echo.
<nul: set /p passwd=Password:
for /f "delims=" %%i in ('cscript /nologo GetPwd.vbs') do set passwd=%%i
echo.
:: This bit's just to prove we have the password.
echo %passwd%
GetPwd.vbsCode: Select all
Set oScriptPW = CreateObject("ScriptPW.Password")
strPassword = oScriptPW.GetPassword()
Wscript.StdOut.WriteLine strPassword
You could also check here: http://www.computerhope.com/forum/index.php?topic=69496.0
Not many people have XP these days, and who would even want to use a method only compatible with a single operating system?
-
- Posts: 287
- Joined: 16 Mar 2011 19:17
- Location: scriptingpros.com
- Contact:
Re: hide user input.
nitt wrote:Not many people have XP these days, and who would even want to use a method only compatible with a single operating system?
Who the hell knows.