Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Feb 11th, 2005, 10:08 AM   #1
killcity44
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 killcity44 is on a distinguished road
Exclamation login script

Hey, can somebody show me how to setup a database for usernames and passwords as if I want to add a new user, I have to add to the code etc. Is there a way I can verify the username and password if they were contained in an extrenal file, preferably a password protected database. thanks
killcity44 is offline   Reply With Quote
Old Feb 13th, 2005, 6:43 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Well, looks like you'll have to write all that code yourself the hard way, in binary file handling mode. I've done a similar thing recently for a website. With things like this there is no other option - other methods (i.e. sequential and random) don't let you change the data before it's written to disk. My system works by opening the file, containing sets of usernames and password delimited in some way, using characters that won't occur in either the username or password (e.g. chr(255)). It then loads them into an array, and searches through it when checking the username and password. It's harder to code, but quicker and more efficient in the long run.
Also, if you have your data stored in a byte array before being written to disk, you can encrypt it yourself (I use the ready-made Blowfish algorithm - a quick Google will dig it up).
An alternative is to use an external database. However most databases that could be easily interfaced, like Access and MySQL, stress that they are not designed for holding things likes passwords, as they are not guaranteeably secure. Part of the advantage of writing a "one-off" system yourself is that, even if people get hold of the file, they won't necessarily know how to read it, especially if you use the all-purpose ".dat" extension!
There are probably ActiveX things out there that will do it for you, but if you write your own method, you'll know exactly how secure it is.
Rory is offline   Reply With Quote
Old Feb 13th, 2005, 9:11 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Does it work yet, Rory, or are you still fiddling? That login thingy needs to work, damnit!
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Feb 14th, 2005, 2:39 PM   #4
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
err...
Some of us sleep at 2 in the morning you know!
Rory is offline   Reply With Quote
Old Feb 16th, 2005, 7:54 PM   #5
Cipher
Hobbyist Programmer
 
Cipher's Avatar
 
Join Date: Feb 2005
Location: /home/cipher
Posts: 123
Rep Power: 4 Cipher is on a distinguished road
Send a message via AIM to Cipher Send a message via MSN to Cipher
Ok you can use VB to store the usernames.
and passes
Using the SaveSetting (function, method, ah, I get them confused)
It will save it to the Registry.

Private sub Form1_Click
SaveSetting (Login,Logins,Passanduser,Text1.Text)
End Sub
This will save Text1's Text in it's text field to the windows registry.

You can call the setting later with GetSetting.
using those fields again.
__________________
And there was much rejoicing... Yay....
Cipher is offline   Reply With Quote
Old Feb 21st, 2005, 7:55 AM   #6
killcity44
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 killcity44 is on a distinguished road
im quite new to this prgramming business. I currently hava database that stores the passwords but the password is validated against the list index of each username. the passwords are obtained via a databar and the passwords are in a table e.g administratorpass: password davepass: dave. the password the user enters in the password box is validated using the text box containing the text exported from the database. but i have to add more code for each user. by the way, the password boxes are on the login form but are beyond the borders. i cant use any other components as this is in college and they have restricted acion to everything. if somebody could upload some code i would be chuffed.

thanks
killcity44 is offline   Reply With Quote
Old Feb 21st, 2005, 7:57 AM   #7
killcity44
Newbie
 
Join Date: Feb 2005
Posts: 18
Rep Power: 0 killcity44 is on a distinguished road
oh yea, because of the way the college has restricted everything that registry trick doesnt work, but i can see how it would work
killcity44 is offline   Reply With Quote
Old Feb 24th, 2005, 8:30 PM   #8
jstevenhall
Newbie
 
Join Date: Feb 2005
Posts: 7
Rep Power: 0 jstevenhall is on a distinguished road
Couldn't you connect to a notepad file rather than an access database, or have you got to?

Jamie
jstevenhall is offline   Reply With Quote
Old Feb 25th, 2005, 10:44 AM   #9
Cipher
Hobbyist Programmer
 
Cipher's Avatar
 
Join Date: Feb 2005
Location: /home/cipher
Posts: 123
Rep Power: 4 Cipher is on a distinguished road
Send a message via AIM to Cipher Send a message via MSN to Cipher
registry restricted eh...That sucks..
__________________
And there was much rejoicing... Yay....
Cipher is offline   Reply With Quote
Old Feb 27th, 2005, 7:55 AM   #10
jstevenhall
Newbie
 
Join Date: Feb 2005
Posts: 7
Rep Power: 0 jstevenhall is on a distinguished road
I just remember i had exactly what you were looking for on my laptop, however i sent my laptop off about a week ago to get repaired because i spilt tea on the keyboard Lol.

Jamie
jstevenhall is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:48 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC