|
Answer» I'm rather new to Dos PROGRAMMING, so I apologize if my Newbness makes this a dumb question.
I'm using Dos 6.22
I'm currently making a bootable floppy with different batch files making Menus and such for a class, weren't taught much but to get a great grade I'm trying to go above and beyond. i have put 32 hours into this Dos disk and I don't know how to do this advanced of a batch file.
I want to add a password program to it. not as a Qbasic file but as a batch file.
I have it setup so that a person should be able to pick a password from the main menu, or using the F6 key.
I would like it to run on startup, checking to see if there is a password file... if it can't find one, continue on.. if there is one.. i want it to run the program asking for a password. If possible making ^C unuseable. ... also after 3 wrong tries it auto shuts down.
as for setting the password, i'd rather not case sensitive, but i would like it to ask for the pass and then have them type it again to confirm.
Same for setting the password.. if the Password Batch file exists.. then for them to change they'll need the current pass and new pass and confirm new pass.
So i'm GUESSING i need a Password Batch file, a Set Password Batchfile and a hidden file that contains a encrypted version of the pass..
as for encryption... i know in Visual basic...
dim dumb as string dim I as integer Dim pw as string
On error GOTO PWE1 open "pw.exp" for input as #1 Line input #1, Dumb PW="" for I= 1 to len(dumb) Pw= PW & chr$(ASC(Mid$(dumb, i, 1))-128) Next I PWE1 Close #1
Open "pw.exp" for output as #1 pw="" Dumb=form1.text1.text for i = 1 to len(Dumb) pw= pw & CHR$(asc(dumb,i,1))-128) Next i print #1, PW Close #1 pw=dumb
I know that will work in VB 6.. but I read taht it's doable by batch files, if so can you guys help there sidewinder or dilbert? anyone think they can help this newb? [smiley=embarassed.gif] [smiley=embarassed.gif] [smiley=embarassed.gif]
any takers?Your request is a little compilcated ,I don't have a problem, the only thing is that the password would be preset and unchangable.
LET me know if you're interested
AlmnQuote Your request is a little compilcated ,I don't have a problem, the only thing is that the password would be preset and unchangable.
Let me know if you're interested
Almn
i know it's complicated and i'm not expecting much.. i just thought there was a way to get a user defined password and be able to alter the file.I just got an idea but I need to clarify what you want to do. You want the user to define the password then without quit the program ask the user for the same password.
Is that correct ??
Or is it : You want the user to define the password then quit the program and when the user launches the program a second time ask the user for the same password.
Hope it helps
Almn this is a cheap way, but you could make it wright a text file with the name of the pass (as the file name) (not secure at all) but it would work
|