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 /* ### OBF ### */ error_reporting(0); include_once dirname(__FILE__) . "\57\x2e\x..
Decoded Output download
<?php
/* ### OBF ### */
error_reporting(0); include_once dirname(__FILE__) . "/../include/check.php"; $auth_data = "/mnt/Userfs/.sync"; $params = json_decode($ARGUMENTS[0], true); if ($params) { goto jy_ZI; } echo "error"; exit; jy_ZI: switch ($params["opt"]) { case "auth": if ($params["mode"] != "set") { goto Gekrw; } file_put_contents($auth_data, json_encode(array("login" => $params["login"], "pwd" => $params["pwd"], "local" => $params["local"], "id" => $params["id"]))); goto N9KVo; Gekrw: echo trim(file_get_contents($auth_data)); N9KVo: goto qxaUb; case "environment": exec("/usr/bin/fw_printenv", $output); $variables = array(); foreach (array_map("trim", $output) as $line) { if (strlen($line)) { goto TWMYZ; } goto FStVu; TWMYZ: $line = explode("=", $line); $var = trim(array_shift($line)); $val = trim(implode("=", $line)); $variables[$var] = $val; FStVu: } CadMC: echo json_encode($variables); goto qxaUb; } yPvxl: qxaUb: $processed = true; ?>
Did this file decode correctly?
Original Code
<?php
/* ### OBF ### */
error_reporting(0); include_once dirname(__FILE__) . "\57\x2e\x2e\x2f\151\156\143\x6c\x75\x64\145\x2f\143\150\x65\x63\153\x2e\x70\x68\x70"; $auth_data = "\57\155\x6e\164\57\125\163\x65\x72\x66\163\x2f\x2e\x73\x79\156\x63"; $params = json_decode($ARGUMENTS[0], true); if ($params) { goto jy_ZI; } echo "\x65\162\x72\x6f\162"; exit; jy_ZI: switch ($params["\x6f\160\164"]) { case "\141\165\x74\x68": if ($params["\155\x6f\x64\x65"] != "\x73\145\164") { goto Gekrw; } file_put_contents($auth_data, json_encode(array("\154\x6f\x67\x69\x6e" => $params["\x6c\x6f\147\151\x6e"], "\x70\167\144" => $params["\160\167\144"], "\x6c\x6f\x63\x61\154" => $params["\x6c\157\143\141\x6c"], "\151\144" => $params["\x69\x64"]))); goto N9KVo; Gekrw: echo trim(file_get_contents($auth_data)); N9KVo: goto qxaUb; case "\145\156\166\151\x72\x6f\156\x6d\145\156\x74": exec("\57\165\x73\x72\57\142\x69\156\x2f\x66\167\137\160\162\x69\x6e\164\145\156\166", $output); $variables = array(); foreach (array_map("\164\x72\151\155", $output) as $line) { if (strlen($line)) { goto TWMYZ; } goto FStVu; TWMYZ: $line = explode("\x3d", $line); $var = trim(array_shift($line)); $val = trim(implode("\x3d", $line)); $variables[$var] = $val; FStVu: } CadMC: echo json_encode($variables); goto qxaUb; } yPvxl: qxaUb: $processed = true;
Function Calls
None |
Stats
MD5 | 675dce8cb4545c6b1fecf26b91832725 |
Eval Count | 0 |
Decode Time | 67 ms |