zoukankan      html  css  js  c++  java
  • 织梦百度快照劫持注入代码防范

      织梦百度快照劫持注入代码防范及修正,很多站长做站的过程中,都碰过百度快照被劫持等问题,明明已经修复模板文件了,还是没有更新回正常的快照,以织梦系统为例,

      往往根目录/index.php也被植入恶意代码,把index.php替换以下代码:

       

    <?php
    if(!file_exists(dirname(__FILE__).'/data/common.inc.php'))
    {
    header('Location:install/index.php');
    exit();
    }
    require_once (dirname(__FILE__) . "/include/common.inc.php");
    require_once DEDEINC."/arc.partview.class.php";
    $GLOBALS['_arclistEnv'] = 'index';
    $row = $dsql->GetOne("Select * From `dede_homepageset`");
    $row['templet'] = MfTemplet($row['templet']);
    $pv = new PartView();
    $pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);
    $pv->Display();
    ?>
    

      然后在根目录删除:index.html文件即可

  • 相关阅读:
    Power of Cryptography
    Radar Installation
    Emag eht htiw Em Pleh
    Help Me with the Game
    89. Gray Code
    87. Scramble String
    86. Partition List
    85. Maximal Rectangle
    84. Largest Rectangle in Histogram
    82. Remove Duplicates from Sorted List II
  • 原文地址:https://www.cnblogs.com/68xi/p/11596355.html
Copyright © 2011-2022 走看看