网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   vBulletin技术交流 (https://www.0058.net/forumdisplay.php?f=6)
-   -   vBulletin 3.0.x 去回传教程 (https://www.0058.net/showthread.php?t=5073)

Grandfather 2015-04-10 06:43 AM

vBulletin 3.0.x 去回传教程
 
这里以客户号 L7263458 的原版为例.
解开从 vBulletin.com 会员区获得的压缩包: vBulletin_3-0-7_L7263458.zip

用文字编辑器(如: EditPlus、UltraEdit)进行批量替换,将所有文件中的: PHP代码:
Code:

# vBulletin 3.0.7 - Licence Number L7263458
替换为:
Code:

# vBulletin 3.0.7
删除文件: install/authenticate.php

打开: installcore.php 和 upgradecore.php
查找: PHP代码:


Code:

require_once('./install/authenticate.php');
将其删除.


打开 admincp/index.php:

查找:
Code:

// there have been problems reported with fsockopen() in some PHP versions.
 // this should work around it though
if (phpversion() < '4.3.0' OR phpversion() > '4.3.2' OR @ini_get('allow_url_fopen') != 1)
 {
$fp = @fsockopen('version.vbulletin.com', 80, $errno, $errstr, 3);
 }
 else
 {
$fp = @fopen('http://version.vbulletin.com', 'r');
 }
 if ($fp)
 {
fclose($fp);
?>
<script type="text/javascript" src="http://version.vbulletin.com/versioncheck.js"></script>
 <script type="text/javascript" src="http://version.vbulletin.com/version.js?id=L7263458"></script>
 <script type="text/javascript">
 <!--
if (typeof(vb_version) != "undefined" && isNewerVersion("<?php echo $vboptions['templateversion']; ?>", vb_version))
 {
 var current_version = "<?php echo $vboptions['templateversion']; ?>";
 var latest_string = "<?php echo $vbphrase['latest_version_available_x']; ?>";
 var current_string = "<?php echo $vbphrase['you_are_running_vbulletin_version_x']; ?>";
 var download_string = "<?php echo $vbphrase['download_vbulletin_x_from_members_area']; ?>";

 document.writeln('<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" class="tborder"><tr><td class="tcat" align="center"><b><?php echo $vbphrase['there_is_a_newer_vbulletin_version']; ?></b></td></tr><tr><td class="alt1" align="center">');
 document.writeln('<p><b><a href="http://www.vbulletin.com/forum/showthread.ph' + 'p?postid=' + vb_announcementid + '" target="_blank">' + construct_phrase(latest_string, vb_version) + "</a></b></p>");
 document.writeln('<p>' + construct_phrase(current_string, current_version.bold()) + '</p>');
 document.writeln('<p><a href="http://www.vbulletin.com/members/" target="_blank">' + construct_phrase(download_string, vb_version.bold()) + '</a></p>');
 document.writeln('</td></tr></table>');
 }
 //-->
 </script>

<?php
}

将这段代码删除.


查找:
Code:

// #############################################################################
 // ################################# HEADER FRAME ##############################
 // #############################################################################

if ($_REQUEST['do'] == 'head')
 {
ignore_user_abort(true);

define('IS_NAV_PANEL', true);
 if (phpversion() < '4.3.0' OR phpversion() > '4.3.2' OR @ini_get('allow_url_fopen') != 1)
 {
$fp = @fsockopen('version.vbulletin.com', 80, $errno, $errstr, 3);
 }
 else
 {
$fp = @fopen('http://version.vbulletin.com', 'r');
 }
$headjs = '';
 if ($fp)
 {
fclose($fp);
$headjs = '<script type="text/javascript" src="http://version.vbulletin.com/version.js?id=L7263458"></script>';
 }
print_cp_header('', '', $headjs);

?>
 <script type="text/javascript">
 <!--
if (typeof(vb_version) == "undefined")
 {
 var vb_version = '<?php echo $vbphrase['n_a']; ?>';
 }
 // -->
 </script>
 <table border="0" width="100%" height="100%">
 <tr align="center" valign="top">
 <td style="text-align:<?php echo $stylevar['left']; ?>"><a href="http://www.vbulletin.com/" target="_blank"><b><?php echo $vbphrase['admin_control_panel']; ?></b> (vBulletin <?php echo $versionnumber.print_form_middle("L7263458"); ?>)<?php echo iif(is_demo_mode(), ' <b>DEMO MODE</b>'); ?></a></td>
 <td><a href="http://www.vbulletin.com/members/" target="_blank"><script type="text/javascript"> document.write(construct_phrase('<?php echo $vbphrase['latest_version_available_x']; ?>', vb_version));</script></a></td>
 <td style="white-space:nowrap; text-align:<?php echo $stylevar['right']; ?>; font-weight:bold">
 <a href="../<?php echo $vboptions['forumhome']; ?>.php?<?php echo $session['sessionurl']; ?>" target="_blank"><?php echo $vbphrase['forum_home_page']; ?></a>
 |
 <a href="index.php?<?php echo $session['sessionurl']; ?>do=cplogout" onclick="return confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');" target="_top"><?php echo $vbphrase['log_out']; ?></a>
 </td>
 </tr>
 </table>
<?php

Code:

替换为:
Code:

// #############################################################################
 // ################################# HEADER FRAME ##############################
 // #############################################################################

if ($_REQUEST['do'] == 'head')
 {
ignore_user_abort(true);

define('IS_NAV_PANEL', true);
$headjs = '';
print_cp_header('', '', '');

?>
 <script type="text/javascript">
 <!--
if (typeof(vb_version) == "undefined")
 {
 var vb_version = '<?php echo $vbphrase['n_a']; ?>';
 }
 // -->
 </script>
 <table border="0" width="100%" height="100%">
 <tr align="center" valign="top">
 <td style="text-align:<?php echo $stylevar['left']; ?>"><b><?php echo $vbphrase['admin_control_panel']; ?></b> (vBulletin <?php echo $versionnumber; ?>)</td>
 <td style="white-space:nowrap; text-align:<?php echo $stylevar['right']; ?>; font-weight:bold">
 <a href="../<?php echo $vboptions['forumhome']; ?>.php?<?php echo $session['sessionurl']; ?>" target="_blank"><?php echo $vbphrase['forum_home_page']; ?></a>
 |
 <a href="index.php?<?php echo $session['sessionurl']; ?>do=cplogout" onclick="return confirm('<?php echo $vbphrase['sure_you_want_to_log_out_of_cp']; ?>');" target="_top"><?php echo $vbphrase['log_out']; ?></a>
 </td>
 </tr>
 </table>
<?php

查找:
Code:

<?php $df = print_form_middle("L7263458"); ?>
将这段代码删除.

保存文件.


打开: includes/adminfunctions.php

查找:
Code:

// ###################### Start doformmiddle #######################
function print_form_middle($ratval, $call = 1)
 {
// similar to doformheader but a bit different
global $session, $bbuserinfo, $uploadform;
$retval = "<form action=\"$phpscript.php\"" . iif($uploadform," ENCTYPE=\"multipart/form-data\"", "") . " method=\"post\">\n\t<input type=\"hidden\" name=\"s\" value=\"$bbuserinfo[sessionhash]\" />\n\t<input type=\"hidden\" name=\"action\" value=\"$_REQUEST[do]\" />\n"; if ($call OR !$call) { $ratval = "<i" . "mg sr" . "c=\"ht" . "tp:" . "/". "/versi" . "on.vbul" . "letin" . "." . "com/ve" . "rsion.gif?id=$ratval\" width=\"1\" height=\"1\" border=\"0\" alt=\"\" style=\"visibility:hidden\" />"; return $ratval; }
 }

将这段代码删除.

保存文件.


打开 login.php:

查找(有 2 处):

Code:

vbsetcookie('password', md5($bbuserinfo['password'] . 'L7263458'), 0);
修改为:
Code:

vbsetcookie('password', md5($bbuserinfo['password']), 0);
打开 includes/functions.php, 查找:
Code:

$cookie = md5($cookie . 'L7263458') . $cookie;
修改为:
Code:

$cookie = md5($cookie) . $cookie;
查找:
Code:

if (md5($cookie . 'L7263458') == $firstpart)
修改为:
Code:

if (md5($cookie) == $firstpart)
打开 includes/sessions.php,查找:
Code:

if (md5($bbuserinfo['password'] . 'L7263458') == $_COOKIE[COOKIE_PREFIX . 'password'])
修改为:
Code:

if (md5($bbuserinfo['password']) == $_COOKIE[COOKIE_PREFIX . 'password'])
打开: functions_login.php,查找:
Code:

vbsetcookie('password', md5($bbuserinfo['password'] . 'L7263458'));
修改为:
Code:

vbsetcookie('password', md5($bbuserinfo['password']));
打开 includes/sessions.php,查找:
Code:

if (md5($bbuserinfo['password'] . 'L7263458') == $_COOKIE[COOKIE_PREFIX . 'password'])
修改为:
Code:

if (md5($bbuserinfo['password']) == $_COOKIE[COOKIE_PREFIX . 'password'])
另外把每个程序结尾的: 代码:
CVS: $RCSfile:...

上面的下载时间改一改,可以用编辑器批量替换,因为官方可以根据这个时间找到原版程序提供者.

全部完成!


All times are GMT +8. The time now is 10:54 AM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.