[HELP] vbulletin Database salt and md5 passwords menu

Shout-Out

User Tag List

Results 1 to 2 of 2
  1. #1
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [HELP] vbulletin Database salt and md5 passwords

    So im trying to create a simple login form in C# Everything works fine on getting the username,MD5(password) and salt from the database. Now my problem is how to make the compare from the password + salt inputed from my form.

    I know the login from vbulleting is made liek this
    Code:
    $vbulletin->userinfo['password'] != iif($password AND !$md5password, md5(md5($password) . $vbulletin->userinfo['salt']), '') AND
    $vbulletin->userinfo['password'] != iif($md5password, md5($md5password . $vbulletin->userinfo['salt']), '') AND
    $vbulletin->userinfo['password'] != iif($md5password_utf, md5($md5password_utf . $vbulletin->userinfo['salt']), '')
    Translated its this: $hash = md5(md5($password) . $salt);

    I tryed to use Hash Generator using plain text password + salt (taken from the database) and it never match. On insidepro they have there the md5(md5($pass).$salt) but the return is not the same as the hashed password from the database, even tho i used the exact same plain text password i used to loging in the vbulletin + the right salt taken from the database from the proper user.

    My login form in C# never also return a match, im loosing all hope on how to make this work.

    P.S - im not trying to use the admin password, i created a regular user and im trying to login using that user. couse i know the admin password have more then md5 + salt.


    Any help is really apreciated, thank you so much.


    Best Regards,
    GRB
    Stay Safe, Zero Latency, Play the Game!

    [HELP] vbulletin Database salt and md5 passwords
  2. #2
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    So after 3 days of search, research, more then 500 pages about the matter read, and fry my brains out heres the solution for this problem.
    If anyone ever have the same problem you can find here the answer.

    This was just to test if it created the exact same md5 hash as it was already in the vbulleting database.

    Code:
    static public string GetMd5Sum(string str)
            {
                //vBulletin uses UTF8 as strings, so you need to pass the user input string as UTF8 also
                Encoder enc = System.Text.Encoding.UTF8.GetEncoder();
    
                //Create a byte[] array to store the new UTF8 string
                byte[] utf8text = new byte[str.Length];
    
                //Pass the string to the byte[] array
                enc.GetBytes(str.ToCharArray(), 0, str.Length, utf8text , 0, true);
    
                //Hash the byte[] array with our UTF8 string inside
                MD5 md5 = new MD5CryptoServiceProvider();
                byte[] result = md5.ComputeHash(utf8text);
    
                //Build the final string by converting each byte
                //into hex and appending it to a StringBuilder
                StringBuilder sb = new StringBuilder();
                for (int i = 0; i < result.Length; i++)
                {
                    sb.Append(result[i].ToString("x2")); //x2 here so the outcome result is all in lowercase, couse vbulleting also stores all in lowercase
                }
    
                //And return it
                return sb.ToString();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                //Get the user input password as plain text
                string pass = textBox1.Text;
    
                //Here i provided the salt explicit that i took from the database
                string salt = "N1GOt=>2sdO@E34)PH1@N9m6yI#]3u";
    
                //Here we convert the plain text password into the first hash
                string p1 = GetMd5Sum(pass);
    
                //Here we add the salt to the previous hashed password
                string p2 = p1 + salt;
    
                //Here we hash again the previous hashed password + the salt string
                string final = GetMd5Sum(p2);
    
                //this was just to the test to see if it all works as intended
                MessageBox.Show(final);
            }
    Last edited by GRB; 06-30-2013 at 10:18 AM.

Similar Threads

  1. Help with Database
    By Phoenixklinge in forum World of Warcraft Emulator Servers
    Replies: 10
    Last Post: 12-18-2007, 05:42 PM
  2. [Help] Need map-pack and things...
    By Buxton in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 12-01-2007, 07:34 AM
  3. Need help editing itemcache.wdb and sword position
    By Kaiderai in forum World of Warcraft General
    Replies: 2
    Last Post: 09-06-2007, 05:28 PM
  4. I really am desperate for help regaurding my ports and real wow
    By vivec45 in forum World of Warcraft Emulator Servers
    Replies: 2
    Last Post: 08-31-2007, 05:11 PM
  5. PLZ HELP: grand masrshal shiv and grandmarshal shanker------->thunderfury
    By srpskagarda in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 03-08-2007, 04:38 PM
All times are GMT -5. The time now is 01:22 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search