View Single Post
  #214  
Old 04-26-2005, 02:04 PM
Till Till is offline
 
Join Date: May 2002
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, to take this one step further. The login doesn't work well either, it logs me in, but I am not taken back to the gallery.

In reference to the following hack:
https://vborg.vbsupport.ru/showthrea...2&page=1&pp=15

First off, a small correction:

bridge/vbulletin30.inc.php

Replace all instances of "VB_BD_HOST" with "VB_DB_HOST".

So here is my modification:

bridge/vbulletin30.inc.php

#1
Find:
PHP Code:
 define('VB_WEB_PATH''/forum/'); 
Add underneath:
PHP Code:
 define('VB_DOC_ROOT'$_SERVER['DOCUMENT_ROOT'].'/forum'); 
Of course you have to modify the path, this works in my example.

#2
Find "function udb_login()" and replace its contents with the following:

PHP Code:
function udb_login_page($url)
{
    $bbuserid   = (int) ((isset($_COOKIE['bbuserid']) && !empty($_COOKIE['bbuserid']))?$_COOKIE['bbuserid']:0);
    $bbpassword = (string) $_COOKIE['bbpassword'];
    $bbusername = (string) '';
    $db_conn = mysql_connect(VB_DB_HOST, VB_DB_USERNAME, VB_DB_PASSWORD) OR die('vbbridge: No connection.');
    mysql_select_db(VB_DB_NAME, $db_conn) OR die ('vbbridge: No such database.');
    $query = "select username from ". VB_USER_TABLE ." where userid = $userid";
    if($rawdb = @mysql_query($query)){
        if(mysql_num_rows($rawdb) > 0){
            $array = mysql_fetch_array($rawdb);
            $bbusername=$array['username'];
            mysql_free_result($rawdb);
        }
    }
    mysql_close($db_conn);
    if(empty($bbusername)){
?>
<html>
<head>
<script type="text/javascript" src="<?php echo VB_WEB_PATH?>clientscript/vbulletin_md5.js"></script>
</head>
<body>
<form action="<?php echo VB_WEB_PATH?>login.php" method="post" onsubmit="md5hash(vb_login_password,vb_login_md5password);">
<span class="sectionheader">Username:</span>
<input type="text" class="button" name="vb_login_username" id="navbar_username" size="15" accesskey="u" tabindex="1" value="username" onfocus="if (this.value == 'username') this.value = '';" /><br/>
<span class="sectionheader">Password:&nbsp;</span>
<input type="password" class="button" name="vb_login_password" size="15" accesskey="p" tabindex="2" /><br/>
<input type="checkbox" name="cookieuser" value="1" tabindex="3" id="cb_cookieuser_navbar" accesskey="c" checked="checked" />
<span class="sectionheader">Remember Me</span><br/>
<input name="submit" type="submit" class="button" accesskey="s" tabindex="4" title="Log In" value="Log In" />
<input type="hidden" name="do" value="login" />
<input type="hidden" name="forceredirect" value="1" />
<input type="hidden" name="url" value="URL_TO_YOUR_GALLERY_HERE">
<input type="hidden" name="vb_login_md5password" />
</form>
</body>
</html>
<?php
    
}else{
        
udb_redirect('index.php');
    }
    
// hard exit
    
exit;
}
Make sure you replace URL_TO_YOUR_GALLERY_HERE in the code snippet. You can make it more pretty by including CSS and so on, and so on. This is quite dirty. But it works.

Cheers,
Till
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01221 seconds
  • Memory Usage 1,784KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete