Okay I'm not so good with C++ lol
Right now I'm trying to add an sql entry to a pass then rehash it
The problem I'm having is how to add the sql entry to the password.
It goes a little like this lol
That's the line is uses now to convert the entered password to md5. What I want to do now is add a "salt" to it for instance '1T&l' just a random group of 4 characters looking something like this
*******md5hash*******1T&l
The step to add that salt on there is what I'm having difficulty with... lol, it should be pretty simple but uhh... yah hehe
And after that I just want to rehash it putting it in another MD5_String();
Which I'm pretty sure I can do =p
Here's what I posted at eAthena lol, since what I'm trying to mod is eAthena's source. I thought posting it here too might help lol
Right now I'm trying to add an sql entry to a pass then rehash it
The problem I'm having is how to add the sql entry to the password.
It goes a little like this lol
Code:
MD5_String(account->passwd, user_password);
That's the line is uses now to convert the entered password to md5. What I want to do now is add a "salt" to it for instance '1T&l' just a random group of 4 characters looking something like this
*******md5hash*******1T&l
The step to add that salt on there is what I'm having difficulty with... lol, it should be pretty simple but uhh... yah hehe
And after that I just want to rehash it putting it in another MD5_String();
Which I'm pretty sure I can do =p
Here's what I posted at eAthena lol, since what I'm trying to mod is eAthena's source. I thought posting it here too might help lol
In what file is the password called at and where is the encoding to md5 at (the server gets the user's inputed password, md5's it, then compares it to the db entry).
I need to find this place so that I can change the password to be hash'ed from a single hashing to a salted hash then rehashed. This helps improve security substantially happy.gif
If you don't understand what I'm asking here's a break down:
// Pre-condition you have a registered password already salted and rehashed
You type in the login password
It converts it to md5 <== This is the location I'm looking for
Adds the salt
Rehashes
Compares database entry
Accepts or denies login
If someone could tell me where to find that, that would be awesome
**Edit**
Hmm wow I suck at C++ lol...
Anyone think they can walk me through it? It's at least worth a try for me to ask hehe
I think I found where but I'm not 100%
I'm messing with line:632'ish with that. I tried a couple of things but they all got errors compiling.
The first thing I tried was making a variable for the 'firsthash' which is the original coding of the line
Code:MD5_String(account._passwd,user_password);
I tried turning that into a variable and using it something like thist
Code:char firsthash = MD5_String(account->passwd,user_password); MD5_String(firsthash + account->salt,salt);
I have no idea if I'm remotely close to getting it lol
But now you can kind of see what I'm trying to accomplish, if it isn't that confusing lol
salt was declared in the login.h as a char and was added to the login info sql query (@ line 592) in login.c
I'm not even 100% if I have the correct query either, but I am relatively sure lol
My error is
error C2120: 'void' illegal with all types
And I've no idea what it means lol