

InterviewSolution
1. |
Solve : Masking user input. (Batch+VBS)? |
Answer» I posted this in the MS-DOS section, but this STRAYS from batch, and I need more help. I need to mask the user's input, with an asterisk or a dot thing. I TRIED the other solutions, which accept 1 letter at a time, but that can't work because there can be over 30 possible passwords, listed in a file. Here is what I am trying to do, but hiding the password from prying eyes. why not start learning some other languages and using already made modules. eg Perl Ghostdog, you have to pay to see a solution on Experts Exchange! Even for the "free 7 day trial" you need a credit card, and I wouldn't bother. Unless you remember to cancel, they'll hit you for $12.95 per month. Googling for scripts and "solutions" , and passing them off as your own work, is all very well, if you do it with more care. Anyhow, I didn't get this via Googling, I wrote it myself, it shows the general principles. This sort of thing is, you may as well say, impossible in either batch or VBS. Qbasic / FreeBasic The calling batch could read the entered password from the text file, and then delete the file at once. Code: [Select]' password collector password$ = "" mask$ = "*" PRINT "Enter password : "; DO DO k$ = INKEY$ LOOP UNTIL k$ <> "" kval = ASC(k$) IF kval = 13 THEN EXIT DO ELSE PRINT mask$; password$ = password$ + k$ END IF LOOP OPEN "Password.txt" FOR OUTPUT AS #1 PRINT #1, password$ CLOSE #1 SYSTEMQuote from: Dias de verano on April 19, 2009, 02:42:58 AM Ghostdog, you have to pay to see a solution on Experts Exchange!don't think you need to pay. long ago i created a user with a valid email address without paying anything. however if the paying scheme is just recently implemented, then too bad. Quote Googling for scripts and "solutions" , and passing them off as your own work, is all very well, if you do it with more care.wow, I didn't say its my own work, did i? I am only helping providing him a link, just like everyone else is doing. Quote from: gh0std0g74 on April 19, 2009, 02:52:24 AM don't think you need to pay. You need to pay. Standard is $12.95 a month. Quote long ago i created a user with a valid email address without paying anything. however if the paying scheme is just recently implemented, then too bad. Yeah right. Like I really believe that! I've been aware of EE for at least 5 years, they are usually high up in Google searches for scripting solutions, and it has always been a pay site. Quote wow, I didn't say its my own work, did i? You didn't say otherwise. Quote I am only helping providing him a link, just like everyone else is doing. Not "everyone". Quote from: Dias de verano on April 19, 2009, 03:03:20 AM You need to pay. Standard is $12.95 a month.too bad. maybe the scheme for solution provider(free) is different than the one asking for solution. Quote Yeah right. Like I really believe that! I've been aware of EE for at least 5 years, they are usually high up in Google searches for scripting solutions, and it has always been a pay site.i am not paying. Period. |
|