Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 02-08-2006, 04:25 PM
RED_LINE RED_LINE is offline
 
Join Date: Jan 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default [ Help ] The Algorithm used with md5 passwords

Hello all,
iam working these days on php web application related to vBulletin , and so I needed to make a memberships system, But I don't want the visitors to register again .. ( I want to use the users registered in my forum )
So, i had some problems with the login system .. vBulletin doesn't use the usual md5 system .. I think it adds somethings to it .. i tried to figure out how it works .. but i couldn't really ..
so, please can anyone tell me how vBulletin trat the password since it's input by the user from the login box .. till it's stored in the database ?
and let's say .. that the user's password is aa .. and he is already typed it in the text-box .. and clicked the login button .. what steps will vBulletin take on the password to store it in the database ?

Thanks,
Reply With Quote
  #2  
Old 02-08-2006, 05:13 PM
tehste tehste is offline
 
Join Date: Feb 2004
Posts: 221
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by RED_LINE
Hello all,
iam working these days on php web application related to vBulletin , and so I needed to make a memberships system, But I don't want the visitors to register again .. ( I want to use the users registered in my forum )
So, i had some problems with the login system .. vBulletin doesn't use the usual md5 system .. I think it adds somethings to it .. i tried to figure out how it works .. but i couldn't really ..
so, please can anyone tell me how vBulletin trat the password since it's input by the user from the login box .. till it's stored in the database ?
and let's say .. that the user's password is aa .. and he is already typed it in the text-box .. and clicked the login button .. what steps will vBulletin take on the password to store it in the database ?

Thanks,
no one really knows... It's one of the many great mysteries of vbulletin!

I heard somewhere that it does a bazillion MD5 to uber encrypt a password!

i swear i unticked quote message and it quoted it still :S
Reply With Quote
  #3  
Old 02-08-2006, 05:27 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, it_s not difficutl:

PHP Code:
md5(md5($password) . $vbulletin->userinfo['salt']) 
just look into functions_login.php verify_authentication..
Reply With Quote
  #4  
Old 02-08-2006, 05:30 PM
RED_LINE RED_LINE is offline
 
Join Date: Jan 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So now way ? :tired:

ok .. just if i can use the vbuelltin functions to make the same steps on the password inputed by the user ..

I don't really care to know how it works .. I just need my script to work well !

Xenon :
Ok .. in fact I looked .. and Tried it

look this my phpmyadmin info :


my password on localhost is : aa
Iam using it sooo ok and it's aa Iam sure

so I wanted to see if this way iI found in the function would work or not .. :
PHP Code:
echo md5(md5("aaU^8")); 
and resulted :
PHP Code:
a00e63216d20556fcd5ec5ec5cd5d9e3 
as you can see .. it's not the same as the hash in phpmyadmin ..

thanks for trying to help
Reply With Quote
  #5  
Old 02-08-2006, 05:43 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

of course, as this is the wrong code, it should be:

PHP Code:
echo md5(md5("aa") . "U^8"); 
Reply With Quote
  #6  
Old 02-08-2006, 05:48 PM
RED_LINE RED_LINE is offline
 
Join Date: Jan 2004
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oops .. that wored

Thanks You

So, just if you have some time there .. what's the difference between what you wrote and what I've wrote .. ?

anyway .. Thanks ^_^

ooh .. I just now observed the difference ..

the salt is taken for the second md5 not the first ..

it's working so well .. thanks again
Reply With Quote
  #7  
Old 02-08-2006, 07:37 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you're welcome
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:34 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04020 seconds
  • Memory Usage 2,223KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete