vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   VB Session Hash (https://vborg.vbsupport.ru/showthread.php?t=146206)

clarke_kent 05-01-2007 04:19 PM

VB Session Hash
 
I am attempting to duplicate the session hash.


Is the following code correct for calculating the session hash?

Code:


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 07:39 PM

Anyone ?

Mistah Roth 06-04-2007 05:41 PM

I'm also trying to reproduce the sessionhash, I've gotten that the code that sets the SESSION_IDHASH is:

PHP Code:

    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 08:06 AM

There's a session table in the database :).

clarke_kent 06-05-2007 12:05 PM

Quote:

Originally Posted by Dismounted (Post 1261648)
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 02: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).


All times are GMT. The time now is 04:30 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01784 seconds
  • Memory Usage 1,724KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete