1月9

Discuz程序出现严重漏洞 众多论坛今天被黑[附解决方案]

| |
23:38    易思网络 上海易思网络科技   From: 本站原创 不指定
Discuz程序出现严重漏洞 众多论坛被黑[附解决方案]
今天对于国内的论坛站长来说绝对是黑色的一天,包含环球网在内的大量使用Discuz程序各个版本的论坛集体被黑,Discuz论坛问题版霎时哭声震天.

被黑页面只有一行字“Hacked by ring04h, just for fun! ”,目前Discuz已经给出了事件解决方法,如您的论坛出现被黑的问题,请下载bug修正程序clear.zip,解压后上传到论坛根目录执行即可。

链接地址
http://www.discuz.net/thread-1183991-1-1.html


附修正程序源代码:


define('IN_DISCUZ', TRUE);
define('DISCUZ_ROOT', './');

$PHP_SELF = htmlspecialchars($_SERVER['PHP_SELF'] ? $_SERVER['PHP_SELF'] : $_SERVER['SCRIPT_NAME']);
$boardurl = htmlspecialchars('http://'.$_SERVER['HTTP_HOST'].preg_replace("/\/+(api|archiver|wap)?\/*$/i", '', substr($PHP_SELF, 0, strrpos($PHP_SELF, '/'))).'/');

require_once DISCUZ_ROOT.'./config.inc.php';
require_once DISCUZ_ROOT.'./include/db_mysql.class.php';

$db = new dbstuff;
$db->connect($dbhost, $dbuser, $dbpw, $dbname, $pconnect, true, $dbcharset);

$db->query("UPDATE {$tablepre}settings SET value='' WHERE variable='seohead'");

dir_clear('./forumdata/cache');

function dir_clear($dir) {
if($directory = dir($dir)) {
  while($entry = $directory->read()) {
   $filename = $dir.'/'.$entry;
   if(is_file($filename)) {
    @unlink($filename);
   }
  }
  @touch($dir.'/index.htm');
  $directory->close();
}
}

header('location: '.$boardurl);

?>

阅读(23831) | 评论(0) | 引用(0)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]