Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / simple password verification

Author
Message
bibaleebu
19
Years of Service
User Offline
Joined: 5th Dec 2004
Location:
Posted: 10th Dec 2004 10:06
i was bored and decided to do this. I am just a noob so dont be expecting that much, I am still learning


woot for me.......hmm.....
bibaleebu
19
Years of Service
User Offline
Joined: 5th Dec 2004
Location:
Posted: 10th Dec 2004 11:10
this for dbpro


woot for me.......hmm.....
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 13th Dec 2004 00:54
this is really cool

good work!




The Nerd

wanna join Waggames?
then visit our site at : http://www.freewebs.com/waggames
my old forum name was: The Nerd
ZtEaLmAx
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sweden
Posted: 23rd Dec 2004 09:02
hi im trying to modifie it to create a file with the username that is entered if it doesnt exist this is what ive done but hmm, seems to get stuck i cant figure out what to do to make it work for ex:
Playername:
input "Playername: ",playername$
if file exist("playername$.inf")=1 then gosub password
open to write 1,"playername$.inf"

newpass:

cls
input "New Password: ",p1$
cls
input "Confirm Password: ",p2$
if p1$=p2$
open to write 1,"1.inf"
write string 1,p1$
close file 1
gosub welcome
endif

gosub newpass

password:
cls
open to read 2,"1.inf"
read string 2,p3$
close file 2
input "Enter Password: ",p4$
if p4$=p3$ then gosub welcome
print "Incorrect Password"
wait 2000
gosub password

welcome:

cls
print "Welcome!"
wait key
end

But it only creates a file named playername$.inf
Any ideas of what im doing wrong?

Galiem Vaelant
20
Years of Service
User Offline
Joined: 15th Aug 2004
Location:
Posted: 31st Dec 2004 09:59
What's to stop someone trying to get access without the password from just opening the .inf file and reading it, using notepad?

I'd suggest updating the code to write that into a pack file and password protect it, so that someone would need the source for the program to get into it. I can't remember how offhand, but there is a way to password protect pack files, and use the password automatically in your code, as pack files are basically just .zip files.

You have a memory like trying to catch water in a steel trap. - A friend
demons breath
21
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 31st Dec 2004 20:26 Edited at: 31st Dec 2004 20:26
@ztealmax or whatever.... you have

and

and then you read


the names are playername$.inf for the first two, and 1.inf for the reading function, so you aren't reading the file you are writing.


You would say something like:


and

for each of these I think.

I'm not sure - try it out, and if it works then thats good, and if it doesn't ask here again and someone more capable will answer.

Am I the only one here who's really confused?
http://db1games.topcities.com
(used to be demonsbreath)

Login to post a reply

Server time is: 2024-11-23 17:16:05
Your offset time is: 2024-11-23 17:16:05