Q_Q Posted November 20, 2008 Share Posted November 20, 2008 ei ... i from malaysia... my english is bad ... sry ar ... ei ... @echo offcolor BTitle Password Testerset tries=10:topclsset /a tries=%tries% -1if %tries%==0 (goto penalty)Echo You have %tries% attempts left.::Note: the above part is optional, as it will show the user how many attempts they have left until the penalty action takes place.Echo Please Enter Password To Proceedset /p password=if %password%==abc (start C:\PROGRA~1\Garena\garena.exe) else (goto top)goto top:penaltyei ... i wan ask is wat command is for dun display tat password when i typing ...where should i change for my coding ? coz when i run tat bat but what i type will showing ...help me pls ... thx ... Link to comment Share on other sites More sharing options...
jaclaz Posted November 20, 2008 Share Posted November 20, 2008 If I get it right, you are asking for a way to type a paasword without it being "echoed" to console. This is possible in pure "batch" files, but it is NOT recommended, see here for some ideas:http://www.geocities.com/leopignataro86/batchfiles/There are workarounds, in .vbs, depending on the system you want to run it:http://www.robvanderwoude.com/wshexamples_i.html#IEDialogshttp://www.robvanderwoude.com/files/ielogin2_vbs.txtOr using third party apps, like (as an example - good as it works both on 9x/Me and NT based systems):Wizard's Apprentice:http://wizapp.sourceforge.net/http://wizapp.sourceforge.net/manual.html(Editbox HIDDEN)or - more specific - EditV32:http://www.westmesatech.com/http://www.westmesatech.com/editv.htmljaclaz Link to comment Share on other sites More sharing options...
Mijzelf Posted November 21, 2008 Share Posted November 21, 2008 Maybe you can use ANSI escape sequences to set the foreground and background color the same. Link to comment Share on other sites More sharing options...
jaclaz Posted November 21, 2008 Share Posted November 21, 2008 Maybe you can use ANSI escape sequences to set the foreground and background color the same.Sure, but the actual point why it is NOT recommended is that you have a plain text file (the .bat or .cmd) with the password written in plain text. My 4 years old nephew would probably be able to break it in less time that it takes to say "ANSI escape sequences" jaclaz Link to comment Share on other sites More sharing options...
Q_Q Posted November 26, 2008 Author Share Posted November 26, 2008 em ... thx .... haiz .... i head y my english bad ....i should study hard ... haha Link to comment Share on other sites More sharing options...
Mijzelf Posted November 29, 2008 Share Posted November 29, 2008 Sure, but the actual point why it is NOT recommended is that you have a plain text file (the .bat or .cmd) with the password written in plain text.echo %password% | md5sum -c password.md5if errorlevel goto penalty Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now