<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: index.inc.php 78 2012-04-16 10:02:02Z wangbin $ */ (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) && exit('Access Denied'); if (file_exists(DISCUZ_ROOT . './data/plugindata/tools.lang.php')) { include DISCUZ_ROOT . './data/plugindata/tools.lang.php'; } else { loadcache('pluginlanguage_template'); loadcache('pluginlanguage_script'); $scriptlang['tools'] = $_G['cache']['pluginlanguage_script']['tools']; } $toolslang = $scriptlang['tools']; define(TOOLS_ROOT, dirname(__FILE__) . '/'); require_once TOOLS_ROOT . './function/tools.func.php'; $mes = cplang('discuz_message'); showtipss($toolslang['index_direction_tips'], $id = 'tips', $display = TRUE, $mes);
* $Id: file_php.inc.php 79 2012-04-16 10:06:12Z wangbin $ */ (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) && exit('Access Denied'); if (submitcheck('templatesubmit') || submitcheck('attsubmit') || submitcheck('staticsubmit') || submitcheck('othersubmit')) { $filelist = ''; if ($_GET['templatesubmit']) { findfile('./template', array('php')); } elseif ($_GET['attsubmit']) { findfile('./data/attachment', array('php')); } elseif ($_GET['staticsubmit']) { findfile('./static', array('php')); } elseif ($_GET['othersubmit']) { findfile('./data', array('php'), array('attachment', 'template', 'threadcache', 'request', 'cache', 'log', 'plugindata')); } } showformheader("plugins&cp=file_php&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}"); showtipss($toolslang['file_phptip']); showtableheaders($toolslang['file_php']); showsubmit('templatesubmit', 'submit', $toolslang['template_php']); showsubmit('attsubmit', 'submit', $toolslang['attachment_php']); showsubmit('staticsubmit', 'submit', $toolslang['static_php']); showsubmit('othersubmit', 'submit', $toolslang['other_php']); showtablefooter(); if (is_array($filelist) && count($filelist) > 0) { showtableheader($toolslang['file_php_result']); showsubtitle(array('', $toolslang['file_path'])); foreach ($filelist as $value) { showtablerow('', array(), array('', realpath($value))); } showtablefooter(); }
$authkey = substr(md5($_SERVER['SERVER_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $dbhost . $dbuser . $dbpw . $dbname . $username . $password . $pconnect . substr($timestamp, 0, 8)), 8, 6) . random(10); DB::update('common_setting', array('svalue' => $authkey), "skey = 'authkey'"); } elseif ($value == 'my_sitekey' && $xver >= 2) { require_once DISCUZ_ROOT . '/api/manyou/Manyou.php'; $cloudClient = new Discuz_Cloud_Client(); $res = $cloudClient->resetKey(); if (!$res) { $cpmessage .= $toolslang['mykeyerror']; } else { $sId = $res['sId']; $sKey = $res['sKey']; DB::query("REPLACE INTO " . DB::table('common_setting') . " (`skey`, `svalue`)\n \t\t\t\t\t\tVALUES ('my_siteid', '{$sId}'), ('my_sitekey', '{$sKey}'), ('cloud_status', '1')"); } } } updatecache('setting'); cpmsg($toolslang['changekey_update'] . $cpmessage, "action=plugins&cp=file_changekey&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}", 'succeed'); } loaducenter(); showformheader("plugins&cp=file_changekey&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}"); showtipss($toolslang['changekey_tips']); showtableheaders($toolslang['changekey']); $uckey = substr(UC_KEY, 0, 5) . '**********'; $config_authkey = substr($_config['security']['authkey'], 0, 5) . '**********'; $setting_authkey = substr($_G[setting][authkey], 0, 5) . '**********'; $my_sitekey = substr($_G[setting][my_sitekey], 0, 5) . '**********'; showtablerow('', '', $toolslang['nowuc_key'] . ' : ' . $uckey); showtablerow('', '', $toolslang['nowconfig_authkey'] . ' : ' . $config_authkey); showtablerow('', '', $toolslang['nowmy_sitekey'] . ' : ' . $my_sitekey); showsubmit('keysubmit', $toolslang['changekey']); showtablefooter();
$data = DB::fetch_first("SELECT MAX(pid) as maxpid,MIN(pid) as minpid,count(pid) as count FROM " . $posttable['p']); $maxpid = $data['maxpid']; $minpid = $data['minpid']; $countpid = $data['count']; $maxposttableid = DB::result_first("SELECT MAX(posttableid) FROM " . DB::table('forum_thread')); $allposttalbe = array('forum_post'); $i = 1; while ($i <= $maxposttableid) { $allposttalbe[] = 'forum_post_' . $i; $i++; } loadcache('threadtableids'); foreach ($_G['cache']['threadtableids'] as $value) { $allthreadtalbe[] = 'forum_thread_' . $value; } showtipss($toolslang['cleardbtips']); if (submitcheck('clearpostsubmit', 1)) { $id = getmaxmin(getposttable('primary'), 'pid'); if ($_G['gp_start'] == 0) { $_G['gp_start'] = $id['min']; } $start = $_G['gp_start']; $end = $_G['gp_start'] + $rpp; $posttable = getposttable('primary'); $query = DB::query("SELECT pid,tid FROM " . DB::table($posttable) . " WHERE pid >= {$start} AND pid < {$end}"); //note while ($post = DB::fetch($query)) { $tid = DB::result_first("SELECT tid FROM " . DB::table('forum_thread') . " WHERE tid='" . $post['tid'] . "'"); foreach ($allthreadtalbe as $value) { $tid = $tid || DB::result_first("SELECT tid FROM " . DB::table($value) . " WHERE tid='" . $post['tid'] . "'"); }
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: index.inc.php 78 2012-04-16 10:02:02Z wangbin $ */ (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) && exit('Access Denied'); if(file_exists(DISCUZ_ROOT.'./data/plugindata/tools.lang.php')){ include DISCUZ_ROOT.'./data/plugindata/tools.lang.php'; } else { loadcache('pluginlanguage_template'); loadcache('pluginlanguage_script'); $scriptlang['tools'] = $_G['cache']['pluginlanguage_script']['tools']; } error_reporting(7); $toolslang = $scriptlang['tools']; define(TOOLS_ROOT, dirname(__FILE__).'/'); define(TOOLS_HTTP_URL, $_G[siteurl].'source/plugin/tools/'); require_once TOOLS_ROOT.'./function/tools.func.php'; $mes = $toolslang['tools_php_direction_tips']; showtipss($toolslang['tools_php'], $id = 'tips', $display = TRUE, $mes); echo '<p align="center"><a href="'.TOOLS_HTTP_URL.'tools.php" target="_ablank"><img src="'.TOOLS_HTTP_URL.'template/images/tools.gif" /></a></p>'; ?>
$rule2 = $rule['sec']; searchkeyword($rule2, './', 1, array('attachment', 'template'), 1); } if (is_array($check) && count($check) > 0) { showtableheader($toolslang['file_result'] . "<font color=red>{$rule2}</font>"); showsubtitle(array('', $toolslang['file_realpath'], $toolslang['file_hackresult'])); foreach ($check as $key => $value) { if ($value) { showtablerow('', array(), array('', $key, $value)); } } showtablefooter(); } else { cpmsg($toolslang['nocheck'], "action=plugins&cp=file_hack&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}", 'error'); } } showformheader("plugins&cp=file_hack&pmod=safe&operation={$operation}&do={$do}&identifier={$identifier}"); showtipss($toolslang['file_hacktip']); showtableheaders($toolslang['file_hack']); foreach ($rule as $key => $value) { showsubmit($key . 'hacksubmit', 'submit', $value); } showtablefooter(); if (is_array($filelist) && count($filelist) > 0) { showtableheader($toolslang['file_php_result']); showsubtitle(array('', $toolslang['file_path'])); foreach ($filelist as $value) { showtablerow('', array(), array('', realpath($value))); } showtablefooter(); }
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: clean_att.inc.php 79 2012-04-16 10:06:12Z wangbin $ */ (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) && exit('Access Denied'); showtipss($toolslang['clearatt']); if (submitcheck('att_clean_submit')) { if (count($_G['gp_attarray']) <= 0) { cpmsg($toolslang['clearatt_noselect'], NULL, 'error'); } else { foreach ($_G['gp_attarray'] as $value) { @unlink(DISCUZ_ROOT . '/data/attachment/' . $value); @unlink(DISCUZ_ROOT . '/data/attachment/' . $value . '.thumb.jpg'); } cpmsg($toolslang['clearatt_done'], "action=plugins&operation={$operation}&do={$do}&identifier={$identifier}&pmod=maintain&cp=clean_att", 'succeed'); } } if (submitcheck('att_submit')) { set_time_limit(0); if (function_exists(ini_set)) { ini_set('memory_limit', '256M'); } $dlist = array(); $dir = $_G['gp_dira']; $mod = preg_match('/(album|forum|portal)/im', $dir, $match); $mod = $match[0]; $att = '';
* * $Id: aboutucenter.inc.php 79 2012-04-16 10:06:12Z wangbin $ */ (!defined('IN_DISCUZ') || !defined('IN_ADMINCP')) && exit('Access Denied'); $mod = in_array($_GET['mod'], array('synusername', 'clrnotice', 'synuid', 'clrfeed', 'pm', 'avator')) ? $_GET['mod'] : 'clrnotice'; @(include_once DISCUZ_ROOT . './config/config_ucenter.php'); if (!defined('UC_DBUSER')) { cpmsg($toolslang['uc_config_no_exist'], '', 'error'); } elseif (UC_DBHOST != $_G[config][db][1][dbhost]) { cpmsg($toolslang['uc_config_no_db'], '', 'error'); } $ppp = 100; $page = max(1, intval($_GET['page'])); $startlimit = ($page - 1) * $ppp; if (in_array($mod, array('synusername', 'clrnotice', 'synuid', 'clrfeed', 'avator'))) { showtipss($toolslang[$mod . '_tip']); } $step = intval($_GET['step']); if ($_GET['' . $mod . '_submit'] || $step > 0) { if ($mod == 'synusername') { $step = intval($_GET['step']); $perpage = 1000; $count = isset($_GET['count']) ? $_GET['count'] : DB::result_first('SELECT count(uid) FROM ' . UC_DBTABLEPRE . 'members'); $query = DB::query('SELECT uid,username FROM ' . UC_DBTABLEPRE . 'members limit ' . $step * $perpage . ',' . $perpage); while ($row = DB::fetch($query)) { //print_r($row);exit; //DB::update('common_member',array('username' => daddslashes($row['username'])),'uid='.$row['uid']); //DB::update('forum_thread',array('author' => daddslashes($row['username'])),'authorid='.$row['uid']); $tables = array('common_block' => array('id' => 'uid', 'name' => 'username'), 'common_invite' => array('id' => 'fuid', 'name' => 'fusername'), 'common_member' => array('id' => 'uid', 'name' => 'username'), 'common_member_security' => array('id' => 'uid', 'name' => 'username'), 'common_mytask' => array('id' => 'uid', 'name' => 'username'), 'common_report' => array('id' => 'uid', 'name' => 'username'), 'forum_thread' => array('id' => 'authorid', 'name' => 'author'), 'forum_post' => array('id' => 'authorid', 'name' => 'author'), 'forum_activityapply' => array('id' => 'uid', 'name' => 'username'), 'forum_groupuser' => array('id' => 'uid', 'name' => 'username'), 'forum_pollvoter' => array('id' => 'uid', 'name' => 'username'), 'forum_postcomment' => array('id' => 'authorid', 'name' => 'author'), 'forum_ratelog' => array('id' => 'uid', 'name' => 'username'), 'home_album' => array('id' => 'uid', 'name' => 'username'), 'home_blog' => array('id' => 'uid', 'name' => 'username'), 'home_clickuser' => array('id' => 'uid', 'name' => 'username'), 'home_docomment' => array('id' => 'uid', 'name' => 'username'), 'home_doing' => array('id' => 'uid', 'name' => 'username'), 'home_feed' => array('id' => 'uid', 'name' => 'username'), 'home_feed_app' => array('id' => 'uid', 'name' => 'username'), 'home_friend' => array('id' => 'fuid', 'name' => 'fusername'), 'home_friend_request' => array('id' => 'fuid', 'name' => 'fusername'), 'home_notification' => array('id' => 'authorid', 'name' => 'author'), 'home_pic' => array('id' => 'uid', 'name' => 'username'), 'home_poke' => array('id' => 'fromuid', 'name' => 'fromusername'), 'home_share' => array('id' => 'uid', 'name' => 'username'), 'home_show' => array('id' => 'uid', 'name' => 'username'), 'home_specialuser' => array('id' => 'uid', 'name' => 'username'), 'home_visitor' => array('id' => 'vuid', 'name' => 'vusername'), 'portal_article_title' => array('id' => 'uid', 'name' => 'username'), 'portal_comment' => array('id' => 'uid', 'name' => 'username'), 'portal_topic' => array('id' => 'uid', 'name' => 'username'), 'portal_topic_pic' => array('id' => 'uid', 'name' => 'username')); foreach ($tables as $table => $conf) { DB::query("UPDATE " . DB::table($table) . " SET `{$conf['name']}`='" . daddslashes($row['username']) . "' WHERE `{$conf['id']}`='{$row['uid']}'");