Raised This Month: $ Target: $400
 0% 

loading users with md5 passwords


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
remain
Member
Join Date: Aug 2004
Old 09-15-2004 , 16:23   loading users with md5 passwords
Reply With Quote #1

I have users.ini with all users passwords are md5 encrypted.

I edited the admin.sma and implement the md5 password check. But there is an error that i couldn't fix.
On the getAccess function i changed the code like below:

Code:
 if (index != -1) {

// i added
    new hash[34]   
    md5(password, hash)
    log_amx("Login: ^"%s %s %s^"",hash,password,g_aPassword[index])
//

    if (g_aFlags[index] & FLAG_NOPASS){
      result |= 8
      new sflags[32]
      get_flags(g_aAccess[index],sflags,31)
      set_user_flags(id,g_aAccess[index])
      log_amx("Login: ^"%s<%d><%s><>^" became an admin (account ^"%s^") (access ^"%s^") (address ^"%s^")",
        name,get_user_userid(id),authid,g_aName[index] ,sflags,ip)
    }

// i changed
else if (equal(hash,g_aPassword[index])) {
//

    result |= 12 
      set_user_flags(id,g_aAccess[index])
      new sflags[32]
      get_flags(g_aAccess[index],sflags,31)
      log_amx("Login: ^"%s<%d><%s><>^" became an admin (account ^"%s^") (access ^"%s^") (address ^"%s^")",
        name,get_user_userid(id),authid,g_aName[index] ,sflags,ip)
    }
When i tried to connect, on the server console the password fron csusers.ini, the password given and the md5 password is written on the console.
The line written on console is:

Code:
L 09/15/2004 - 23:08:26: [admin.amxx] Login: "a029d0df84eb5549c641e04a9ef389e5 mypass a029d0df84eb5549c641e04a9ef389e"
The first field is md5 of the given password, the second one is the password given and the third one is the password from csusers.ini. The problem is that the third one is 1 character short. I tried some fix on the code but i couldn't fix the error.

Where can be the problem?

Thanks
remain is offline
 



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


All times are GMT -4. The time now is 17:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode