代码如下 复制代码
-1 || strpos($name,'%00') > -1 || strpos($name,'/') > -1) {
echo '特征 '.$path.'
'; flush(); ob_flush();
} else {
if(!preg_match($exs,$name)) continue;
if(filesize($path) > 10000000) continue;
$fp = fopen($path,'r');
$code = fread($fp,filesize($path));
fclose($fp);
if(empty($code)) continue;
foreach($matches as $matche) {
$array = array();
preg_match($matche,$code,$array);
if(!$array) continue;
if(strpos($array[0],\x24\x74\x68\x69\x73\x2d\x3e)) continue;
$len = strlen($array[0]);
if($len > 10 && $len echo '特征 '.$path.'
';
flush(); ob_flush(); break;
}
}
unset($code,$array);
}
}
closedir($handle);
return true;
}
function strdir($str) { return str_replace(array('\\','//','//'),array('/','/','/'),chop($str)); }
echo '';
echo '路径:
';
echo '后缀:
';
echo '操作:
';
echo '';
if(file_exists($_post['dir']) && $_post['exs']) {
$dir = strdir($_post['dir'].'/');
$exs = '/('.str_replace('.','\\.',$_post['exs']).')/i';
echo antivirus($dir,$exs,$matches) ? '扫描完毕
' : '扫描中断
';
}
?>
http://www.bkjia.com/phpjc/632838.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/632838.htmltecharticle本文章来给大家介绍一个php webshell扫描后门木马实例程序,这个可以扫描你网站上的木马程序哦,这个给大家找网站木马提供了很大的方便...
