Jump to content

Hashing passwords to match WHMCS hash.


techguy

Recommended Posts

Hi There,

 

I'm working on a PHP script for logging into a WHMCS controlled DirectAdmin panel.

 

I need to know how to hash the user password so as to be able to compare to the hash in the DB for authorization.

 

Just wondering what algorithm is used for hashing the passwords. It seems the hashes are stored in the format:

 

<32Bit hash here>:<5 characters>

 

Any ideas? Would this be restricted information?

 

Regards.

Link to comment
Share on other sites

  • 1 month later...
It's an MD5 hash isn't it?

 

Yes, it is.

 

The value in the database is created in a way similar to this:

 

$password = 'your_password';
$salt = 'pVeJP';

$hash = md5($salt.$password).':'.$salt;

 

The value in the database is $hash. I don't know, how the $salt is generated (it should be random, I think).

Edited by tadeck
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated