Raised This Month: $51 Target: $400
 12% 

IPB on SM


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 01-04-2015 , 17:28   IPB on SM
Reply With Quote #1

I need players registering in my direct forum of the game.

But I am having a problem in generating passwords.

The password scheme of IPB is as follows:

https://www.invisionpower.com/suppor...n-ipboard-r130

But even I generating MD5 do not succeed.

I searched here in the forum and found a stock of generating MD5, still does not work.

Can someone help me?

Thanks.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-04-2015 , 22:19   Re: IPB on SM
Reply With Quote #2

Well, that's weird! Comapre MD5 pass generated with PHP and SP.

#edit
I've tested that MD5 function for SP. It doesn't work properly.

Last edited by LambdaLambda; 01-04-2015 at 22:52.
LambdaLambda is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 01-05-2015 , 10:22   Re: IPB on SM
Reply With Quote #3

I try with Sslice hash but IPBOARD dont password...

STRING to MD5 by Sslice:

PHP Code:
// MD5 Routine from sslice :D

stock MD5String(const String:str[], String:output[], maxlen)
{
    
decl x[2];
    
decl buf[4];
    
decl input[64];
    new 
iii;
    
    new 
len strlen(str);
    
    
// MD5Init
    
x[0] = x[1] = 0;
    
buf[0] = 0x67452301;
    
buf[1] = 0xefcdab89;
    
buf[2] = 0x98badcfe;
    
buf[3] = 0x10325476;
    
    
// MD5Update
    
new in[16];

    
in[14] = x[0];
    
in[15] = x[1];
    
    new 
mdi = (x[0] >>> 3) & 0x3F;
    
    if ((
x[0] + (len << 3)) < x[0])
    {
        
x[1] += 1;
    }
    
    
x[0] += len << 3;
    
x[1] += len >>> 29;
    
    new 
0;
    while (
len--)
    {
        
input[mdi] = str[c];
        
mdi += 1;
        
+= 1;
        
        if (
mdi == 0x40)
        {
            for (
0ii 016; ++iii += 4)
            {
                
in[i] = (input[ii 3] << 24) | (input[ii 2] << 16) | (input[ii 1] << 8) | input[ii];
            }
            
// Transform
            
MD5Transform(bufin);
            
            
mdi 0;
        }
    }
    
    
// MD5Final
    
new padding[64] = {
        
0x800x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00,
        
0x000x000x000x000x000x000x000x00
    
};
    new 
inx[16];
    
inx[14] = x[0];
    
inx[15] = x[1];
    
    
mdi = (x[0] >>> 3) & 0x3F;
    
    
len = (mdi 56) ? (56 mdi) : (120 mdi);
    
in[14] = x[0];
    
in[15] = x[1];
    
    
mdi = (x[0] >>> 3) & 0x3F;
    
    if ((
x[0] + (len << 3)) < x[0])
    {
        
x[1] += 1;
    }
    
    
x[0] += len << 3;
    
x[1] += len >>> 29;
    
    
0;
    while (
len--)
    {
        
input[mdi] = padding[c];
        
mdi += 1;
        
+= 1;
        
        if (
mdi == 0x40)
        {
            for (
0ii 016; ++iii += 4)
            {
                
in[i] = (input[ii 3] << 24) | (input[ii 2] << 16) | (input[ii 1] << 8) | input[ii];
            }
            
// Transform
            
MD5Transform(bufin);
            
            
mdi 0;
        }
    }
    
    for (
0ii 014; ++iii += 4)
    {
        
inx[i] = (input[ii 3] << 24) | (input[ii 2] << 16) | (input[ii 1] << 8) | input[ii];
    }
    
MD5Transform(bufinx);
    
    new 
digest[16];
    for (
0ii 04; ++iii += 4)
    {
        
digest[ii] = (buf[i]) & 0xFF;
        
digest[ii 1] = (buf[i] >>> 8) & 0xFF;
        
digest[ii 2] = (buf[i] >>> 16) & 0xFF;
        
digest[ii 3] = (buf[i] >>> 24) & 0xFF;
    }
    
    
FormatEx(outputmaxlen"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
        
digest[0], digest[1], digest[2], digest[3], digest[4], digest[5], digest[6], digest[7],
        
digest[8], digest[9], digest[10], digest[11], digest[12], digest[13], digest[14], digest[15]);
}

stock MD5Transform_FF(&a, &b, &c, &dxsac)
{
    
+= (((b) & (c)) | ((~b) & (d))) + ac;
    
= (((a) << (s)) | ((a) >>> (32-(s))));
    
+= b;
}

stock MD5Transform_GG(&a, &b, &c, &dxsac)
{
    
+= (((b) & (d)) | ((c) & (~d))) + ac;
    
= (((a) << (s)) | ((a) >>> (32-(s))));
    
+= b;
}

stock MD5Transform_HH(&a, &b, &c, &dxsac)
{
    
+= ((b) ^ (c) ^ (d)) + ac;
    
= (((a) << (s)) | ((a) >>> (32-(s))));
    
+= b;
}

stock MD5Transform_II(&a, &b, &c, &dxsac)
{
    
+= ((c) ^ ((b) | (~d))) + ac;
    
= (((a) << (s)) | ((a) >>> (32-(s))));
    
+= b;
}

stock MD5Transform(buf[], in[])
{
    new 
buf[0];
    new 
buf[1];
    new 
buf[2];
    new 
buf[3];
    
    
MD5Transform_FF(abcdin[0], 70xd76aa478);
    
MD5Transform_FF(dabcin[1], 120xe8c7b756);
    
MD5Transform_FF(cdabin[2], 170x242070db);
    
MD5Transform_FF(bcdain[3], 220xc1bdceee);
    
MD5Transform_FF(abcdin[4], 70xf57c0faf);
    
MD5Transform_FF(dabcin[5], 120x4787c62a);
    
MD5Transform_FF(cdabin[6], 170xa8304613);
    
MD5Transform_FF(bcdain[7], 220xfd469501);
    
MD5Transform_FF(abcdin[8], 70x698098d8);
    
MD5Transform_FF(dabcin[9], 120x8b44f7af);
    
MD5Transform_FF(cdabin[10], 170xffff5bb1);
    
MD5Transform_FF(bcdain[11], 220x895cd7be);
    
MD5Transform_FF(abcdin[12], 70x6b901122);
    
MD5Transform_FF(dabcin[13], 120xfd987193);
    
MD5Transform_FF(cdabin[14], 170xa679438e);
    
MD5Transform_FF(bcdain[15], 220x49b40821);
    
    
MD5Transform_GG(abcdin[1], 50xf61e2562);
    
MD5Transform_GG(dabcin[6], 90xc040b340);
    
MD5Transform_GG(cdabin[11], 140x265e5a51);
    
MD5Transform_GG(bcdain[0], 200xe9b6c7aa);
    
MD5Transform_GG(abcdin[5], 50xd62f105d);
    
MD5Transform_GG(dabcin[10], 90x02441453);
    
MD5Transform_GG(cdabin[15], 140xd8a1e681);
    
MD5Transform_GG(bcdain[4], 200xe7d3fbc8);
    
MD5Transform_GG(abcdin[9], 50x21e1cde6);
    
MD5Transform_GG(dabcin[14], 90xc33707d6);
    
MD5Transform_GG(cdabin[3], 140xf4d50d87);
    
MD5Transform_GG(bcdain[8], 200x455a14ed);
    
MD5Transform_GG(abcdin[13], 50xa9e3e905);
    
MD5Transform_GG(dabcin[2], 90xfcefa3f8);
    
MD5Transform_GG(cdabin[7], 140x676f02d9);
    
MD5Transform_GG(bcdain[12], 200x8d2a4c8a);
    
    
MD5Transform_HH(abcdin[5], 40xfffa3942);
    
MD5Transform_HH(dabcin[8], 110x8771f681);
    
MD5Transform_HH(cdabin[11], 160x6d9d6122);
    
MD5Transform_HH(bcdain[14], 230xfde5380c);
    
MD5Transform_HH(abcdin[1], 40xa4beea44);
    
MD5Transform_HH(dabcin[4], 110x4bdecfa9);
    
MD5Transform_HH(cdabin[7], 160xf6bb4b60);
    
MD5Transform_HH(bcdain[10], 230xbebfbc70);
    
MD5Transform_HH(abcdin[13], 40x289b7ec6);
    
MD5Transform_HH(dabcin[0], 110xeaa127fa);
    
MD5Transform_HH(cdabin[3], 160xd4ef3085);
    
MD5Transform_HH(bcdain[6], 230x04881d05);
    
MD5Transform_HH(abcdin[9], 40xd9d4d039);
    
MD5Transform_HH(dabcin[12], 110xe6db99e5);
    
MD5Transform_HH(cdabin[15], 160x1fa27cf8);
    
MD5Transform_HH(bcdain[2], 230xc4ac5665);

    
MD5Transform_II(abcdin[0], 60xf4292244);
    
MD5Transform_II(dabcin[7], 100x432aff97);
    
MD5Transform_II(cdabin[14], 150xab9423a7);
    
MD5Transform_II(bcdain[5], 210xfc93a039);
    
MD5Transform_II(abcdin[12], 60x655b59c3);
    
MD5Transform_II(dabcin[3], 100x8f0ccc92);
    
MD5Transform_II(cdabin[10], 150xffeff47d);
    
MD5Transform_II(bcdain[1], 210x85845dd1);
    
MD5Transform_II(abcdin[8], 60x6fa87e4f);
    
MD5Transform_II(dabcin[15], 100xfe2ce6e0);
    
MD5Transform_II(cdabin[6], 150xa3014314);
    
MD5Transform_II(bcdain[13], 210x4e0811a1);
    
MD5Transform_II(abcdin[4], 60xf7537e82);
    
MD5Transform_II(dabcin[11], 100xbd3af235);
    
MD5Transform_II(cdabin[2], 150x2ad7d2bb);
    
MD5Transform_II(bcdain[9], 210xeb86d391);
    
    
buf[0] += a;
    
buf[1] += b;
    
buf[2] += c;
    
buf[3] += d;

Thanks for helo=p
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
API
Veteran Member
Join Date: May 2006
Old 01-05-2015 , 12:13   Re: IPB on SM
Reply With Quote #4

I know very little about IPB but I know a thing or two about PHP and security hashes. IPB (most likely) uses a salt which is why you are getting different results.
__________________

Last edited by API; 01-05-2015 at 12:13.
API is offline
Send a message via AIM to API
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 01-05-2015 , 12:49   Re: IPB on SM
Reply With Quote #5

Any idea how i do this password?

Thanks for help.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM
rodrigo286 is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-05-2015 , 13:33   Re: IPB on SM
Reply With Quote #6

Quote:
Originally Posted by pimpinjuice View Post
I know very little about IPB but I know a thing or two about PHP and security hashes. IPB (most likely) uses a salt which is why you are getting different results.
No. Salt is assigned to members randomly. I have generated password in MD5 and Salt i took from my own database, and both - generated with IPB script, and script I used - are the same.

However, that function on SP you're using isn't correct. You can either request someone to create new MD5 function, or use PHP/JS function thats gonna be called by the server.
LambdaLambda is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 01-05-2015 , 13:43   Re: IPB on SM
Reply With Quote #7

I would then have to access the PHP, run the PHP Script in IPBoard to generate the password?

You have no idea how to do this with SM?

Extension?

New MD5 function, with salt?

Thanks.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM

Last edited by rodrigo286; 01-05-2015 at 13:46.
rodrigo286 is offline
LambdaLambda
AlliedModders Donor
Join Date: Oct 2010
Location: London
Old 01-05-2015 , 14:13   Re: IPB on SM
Reply With Quote #8

Quote:
Where:
$hash is the value stored in the database column members_pass_hash.
$salt is the value stored in the database column members_pass_salt.
$password is the plaintext password.
The salt, is a string of 5 random characters including letters, numbers and symbols (specifically, ASCII characters 33-126, excluding 92). You can easily generate a salt using the IPSMember::generatePasswordSalt() method.
So if you want to create new account, then generating random 5 sumbols would do the job. Then using these 5 characters and text-password you could generate MD5 password (using algorithm you have posted in your first post). After you do that, simply do query that will fill up "members_pass_salt" field with these 5 symbols you generated and "members_pass_hash" with md5 result. You don't have to use IPB's script, you can easily create simple PHP script that would take your details such member id, password, and salt with GET. For security reasons, I would also comapre IP addresses; So you would create new member's record firstly, and you would use the PHP script only to update the password and SALT code. Then, to make sure that nobody else would use this script after, you would compare client's IP adress that runs the script, with IP address of person who have generated the record. Hope you got me.

Last edited by LambdaLambda; 01-05-2015 at 15:16.
LambdaLambda is offline
rodrigo286
Veteran Member
Join Date: Sep 2010
Location: Brazil, São Paulo
Old 01-05-2015 , 16:12   Re: IPB on SM
Reply With Quote #9

Initial Password:

PHP Code:
TextBIGPIN
MD5 Hash
1d866dfd69e01ddda87c4aff3698104d 

Salt:

PHP Code:
TextABC12 

Initial Password + Salt:

PHP Code:
TextBIGPINABC12
MD5 Hash
6ddbbb2cc77ead41da74f998fdf2fb32 
Final Password:

PHP Code:
Password

MD5 Hash6ddbbb2cc77ead41da74f998fdf2fb32
Salt
ABC12
Key
: ? 
Do not get it right.

Thanks.
__________________
My Plugins | VIEW HERE | I accept private requests, send me a PM.
Buy respawn | Uber Recall | Grenade drop | Damage Supperssor
Meet the Medic | Disguise Expert | Crazy Jet

CZSBrasil TEAM

Last edited by rodrigo286; 01-05-2015 at 16:13.
rodrigo286 is offline
Reply



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 20:11.


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