Jump to content

How to calculate $_SESSION['upw']


jsemmanuel

Recommended Posts

I am designing a form which can be embeddable in a webpage and will take the customers directly to a server management panel. I want to be able to login to whmcs directly through this. (I tried passing to dologin.php?goto=mypage, but that does not seem to work.)

 

I am now trying to set

$_SESSION['loggedinstatus'] = 'true';

$_SESSION['uid'] = $login_uid;

$_SESSION['upw'] = $encpwd;

 

I figured out what the first two are for. How do I generate the upw?

 

I know the passwords are stored as md5hash:salt in the database, but on a normal login to whmcs, the upw does not match anything I try. Is the algorithm documented somewhere?

Link to comment
Share on other sites

I am designing a form which can be embeddable in a webpage and will take the customers directly to a server management panel. I want to be able to login to whmcs directly through this. (I tried passing to dologin.php?goto=mypage, but that does not seem to work.)

 

I am now trying to set

$_SESSION['loggedinstatus'] = 'true';

$_SESSION['uid'] = $login_uid;

$_SESSION['upw'] = $encpwd;

 

I figured out what the first two are for. How do I generate the upw?

 

I know the passwords are stored as md5hash:salt in the database, but on a normal login to whmcs, the upw does not match anything I try. Is the algorithm documented somewhere?

 

You have to use the api to encrypt and decrypt password:

 

http://wiki.whmcs.com/API:Encrypt_Password

http://wiki.whmcs.com/API:Decrypt_Password (don't think this works now the passwords are irreversible, however you shouldn't need this for what you want)

 

I don't think the salt is available for security reasons.

 

Ben

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