Log in

View Full Version : VB Session Hash


clarke_kent
05-01-2007, 05:19 PM
I am attempting to duplicate the session hash.


Is the following code correct for calculating the session hash?



md5(TIMENOW . SCRIPTPATH . SESSION_IDHASH . SESSION_HOST . vbrand(1, 1000000));




I understand the principals behind md5 hash, however I cannot figure out how VB compares sessions.

TIMENOW - I assume is the time the session is started, however is VB able to compare the hash as the time that the session is started is not logged in the DB.

vbrand - I assume is a VB php function that generates a random #, however again where is this # stored for the hash comparison.

SESSION_IDHASH - where / how is this calculated ?

I am writing a large webapp in Coldfusion. Currently I have 35,000 + users that need to have a login / pass generated for our new VB Forum (Got this part done), now I need to generate a session as our users login from a CF page. I just need to know how to create the session.

Any help / clarification would be appreciated. When I am finished this integration I will post a step by step process / tutorial.

clarke_kent
05-03-2007, 08:39 PM
Anyone ?

Mistah Roth
06-04-2007, 06:41 PM
I'm also trying to reproduce the sessionhash, I've gotten that the code that sets the SESSION_IDHASH is:

if (!defined('SESSION_IDHASH'))
{
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . $this->fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
}

But theres a lot of variables and I'm not sure where they come from.

Dismounted
06-05-2007, 09:06 AM
There's a session table in the database :).

clarke_kent
06-05-2007, 01:05 PM
There's a session table in the database :).

Yes I know, that is the reason I am asking how to calculate it so I can insert a session into the DB

Mistah Roth
06-13-2007, 03:16 PM
Likewise, what I'm trying to do is create the session on the non-vb page, insert it into the database, so when the user goes to the forum, he'll be logged in already (from the site login).