MRX.LAFuck the Rules!

自己制造Zblog的安全漏洞

为了方便采集入库的时候不过滤到HTML.

找到zb_system/function/c_system_common.php,注释掉1478到1514行,如下:
注意这是极不安全的做法,你也可以自己修改正则替换过滤掉指定内容.除非说你是封闭式站点才考虑如下注释方法

function FormatString($source, $para)
{
   /* 方便HTML入库
   if (strpos($para, ’[html-format]’) !== false) {
        $source = htmlspecialchars($source);
        //if (version_compare(PHP_VERSION, ’5.4.0′) >= 0) {
        //    $source = htmlspecialchars($source, (ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE), ”UTF-8”);
        //} else {
        //    $source = htmlspecialchars($source, ENT_COMPAT, ”UTF-8”);
        //}
    }
    if (strpos($para, ’[nohtml]’) !== false) {
        $source = preg_replace(”/<([^<>]*)>/si”, ”", $source);
        $source = str_replace(”<”, ”˂”, $source);
        $source = str_replace(”>”, ”˃”, $source);
    }
    if (strpos($para, ’[noscript]’) !== false) {
        $class  = new XssHtml($source);
        $source = trim($class->getHtml());
    }
    if (strpos($para, ’[enter]’) !== false) {
        $source = str_replace(”\r\n”, ”
“, $source);
        $source = str_replace(”\n”, ”
“, $source);
        $source = str_replace(”\r”, ”
“, $source);
        $source = preg_replace(”/(<br\/>)+/”, ”
“, $source);
    }
    if (strpos($para, ’[noenter]’) !== false) {
        $source = str_replace(”\r\n”, ”", $source);
        $source = str_replace(”\n”, ”", $source);
        $source = str_replace(”\r”, ”", $source);
    }
    if (strpos($para, ’[filename]’) !== false) {
        $source = str_replace(array(”/”, ”#”, ”$”, ”\\”, ”:”, ”?”, ”*”, ”\”", ”<”, ”>”, ”|”, ” ”), array(”"), $source);
    }
    if (strpos($para, ’[normalname]’) !== false) {
        $source = str_replace(array(”#”, ”$”, ”(”, ”)”, ”*”, ”+”, ”[”, ”]”, ”{”, ”}”, ”?”, ”\\”, ”^”, ”|”, ”:”, ”‘”, ”\”", ”;”, ”@”, ”~”, ”=”, ”%”, ”&”), array(”"), $source);
    }
    */
    return $source;
}

评论

  1. 软件的解压密码是什么?

  2. 什么软件?

  3. MultiDesk_8_0.chs

  4. 哪个是付费软件,我不能给你密码吧,而且也不贵,建议你去作者哪里购买,而且只需要10元,而且也非常非常好用,目前用过的Windows平台最好的远程管理软件.http://www.syvik.com/multidesk/download.cn.html

发表评论

填写下面的表单发表评论