Help how decode this code

Status
Not open for further replies.

nsalcedo

New Member
4
2012
0
0
Hi, how decode this code. Thanks
PHP:
$locale_file = TEMPLATEPATH."/languages/$locale.php"; if ( is_readable($locale_file) ) require_once($locale_file); if(function_exists('add_custom_background')) add_custom_background();  ${"\x47\x4c\x4f\x42AL\x53"}["hy\x6fq\x70rg\x66"]="\x72\x65\x74\x75rn";${"GL\x4f\x42A\x4c\x53"}["\x6a\x75hg\x70\x63\x76\x74\x6a\x69\x6a\x73"]="\x6c\x69\x63\x65\x6es\x69\x6e\x67\x5fse\x72\x76\x65\x72";${"\x47L\x4f\x42\x41LS"}["\x6bn\x6d\x70\x6e\x73\x6bc\x73\x79\x71\x6d"]="\x6ci\x63\x65\x6e\x73\x69\x6e\x67\x5fs\x74\x72\x69\x6eg";function check_key($license_input_fallback=false){${${"\x47\x4cO\x42A\x4c\x53"}["hy\x6f\x71\x70r\x67\x66"]}=false;$qtghpoddzc="\x72\x65\x74u\x72\x6e";if(!${${"\x47\x4cO\x42\x41L\x53"}["\x68y\x6f\x71\x70r\x67\x66"]}=get_option("lic\x65\x6es\x65\x5fk\x65y")){${"\x47L\x4f\x42A\x4cS"}["\x76\x72\x66m\x6d\x64\x6aitp"]="l\x69\x63\x65n\x73e_i\x6e\x70\x75\x74\x5f\x66\x61\x6clba\x63\x6b";if(${${"\x47\x4cO\x42\x41\x4cS"}["\x76rf\x6d\x6d\x64\x6aitp"]}){enter_license();}}return${$qtghpoddzc};}function enter_license(){global$licensing_server;if(isset($_POST["li\x63\x65\x6es\x65_\x6bey"])){${${"\x47L\x4f\x42A\x4cS"}["k\x6em\x70\x6e\x73\x6bc\x73yq\x6d"]}=trailingslashit(${${"GLO\x42\x41\x4cS"}["j\x75\x68\x67pc\x76tjij\x73"]})."?r\x65m\x6fte\x5fk\x65\x79_\x61u\x74h\x3d".base64_encode($_POST["\x6ci\x63\x65n\x73\x65\x5f\x6b\x65\x79"])."&r\x65m\x6ft\x65_s\x69t\x65\x3d".base64_encode(trailingslashit(site_url()));if(wp_remote_fopen(${${"\x47\x4c\x4f\x42A\x4c\x53"}["\x6b\x6em\x70\x6e\x73\x6bc\x73\x79\x71\x6d"]})==1){update_option("\x6cic\x65n\x73e_\x6bey",$_POST["lic\x65nse_\x6b\x65\x79"]);echo"A\x63\x74iv\x61te\x64\x21";echo"<scr\x69pt>\x64\x6f\x63\x75m\x65\x6e\x74\x2e\x6co\x63a\x74\x69on='/\x27;</\x73\x63r\x69pt>";}else{echo"<\x70\x3e\x53\x6f\x72ry the\x20\x6cice\x6e\x73\x65 \x6bey\x20y\x6fu \x65nte\x72\x65\x64\x20i\x73 i\x6e\x76\x61li\x64. Pl\x65a\x73e\x20\x74r\x79 ag\x61\x69n \x6fr c\x6f\x6et\x61\x63\x74 us\x20f\x6fr \x68el\x70 a\x74\x20\x73\x75\x70p\x6fr\x74\x40\x6da\x67\x61zin\x653\x2e\x63\x6f\x6d</\x70>";}}if(!check_key()){echo"\x3cf\x6frm\x20\x6d\x65\x74ho\x64\x3d\"post\"\x3e\n \x45\x6e\x74\x65\x72\x20lic\x65\x6ese ke\x79\x3a\x20\x3cin\x70\x75t\x20\x74\x79\x70\x65\x3d\x22\x74e\x78t\" \x6e\x61m\x65\x3d\x22l\x69ce\x6ese\x5f\x6b\x65\x79\x22\x20\x2f>\x20\x3c\x69npu\x74\x20ty\x70e\x3d\x22s\x75bmi\x74\" n\x61me\x3d\"\x76a\x6cid\x61te_\x6cicense\x5f\x6b\x65\x79\" v\x61\x6c\x75e=\x22A\x63\x74\x69vat\x65\x22 />\n </for\x6d\x3e\n <\x62r /> <\x66\x6fn\x74 co\x6c\x6f\x72\x3d\x22\x72\x65\x64\x22><b>\x4eew \x43us\x74\x6fme\x72s:</\x62> Your \x50aypal\x20e\x6d\x61\x69l \x69d\x20\x69\x73\x20\x79our \x4cic\x65\x6e\x73e\x20\x6b\x65\x79\x21<\x2f\x66ont><\x62\x72\x20/\x3e\n <\x66\x6fn\x74 \x63olo\x72\x3d\"bl\x61c\x6b\"><b>Exis\x74\x69\x6eg\x20\x43u\x73\x74\x6f\x6de\x72s:\x3c\x2f\x62\x3e\x20\x54o\x20r\x65q\x75est\x20t\x68\x65 \x6b\x65\x79\x2c\x20\x53e\x6e\x64\x20\x75\x73\x20\x61\x6e \x65ma\x69l on s\x61les@\x6d\x61g\x61zine\x33.com </f\x6f\x6e\x74\x3e\x3cb\x72\x20\x2f>\x20 ";}}${${"\x47\x4c\x4f\x42\x41\x4c\x53"}["\x6a\x75\x68\x67p\x63\x76t\x6ai\x6a\x73"]}="h\x74\x74\x70\x3a//ww\x77.m\x61g\x61z\x69\x6e\x653\x2e\x63\x6f\x6d/l\x69\x63ens\x65\x2f";if(!is_admin()){if(!check_key(true)){die();}}if(!function_exists("\x6ff\x5f\x69\x6eit")){if(STYLESHEETPATH==TEMPLATEPATH){define("O\x50\x54\x49\x4f\x4eS\x5f\x46\x52\x41\x4dEWORK_\x55R\x4c",TEMPLATEPATH."\x2fa\x64\x6d\x69n\x2f");define("\x4fPT\x49O\x4eS\x5f\x46R\x41\x4dEW\x4f\x52\x4b\x5fDIR\x45\x43TOR\x59",get_bloginfo("\x74\x65\x6dp\x6ca\x74e_dire\x63tory")."\x2fa\x64\x6d\x69\x6e/");}else{define("\x4fPT\x49\x4f\x4e\x53\x5fF\x52AME\x57O\x52\x4b_\x55\x52\x4c",STYLESHEETPATH."/\x61\x64\x6d\x69\x6e\x2f");define("\x4f\x50\x54\x49\x4fN\x53_\x46RAM\x45WO\x52\x4b\x5f\x44\x49RE\x43TO\x52\x59",get_bloginfo("\x73\x74y\x6ces\x68\x65et\x5f\x64ir\x65\x63\x74o\x72\x79")."/a\x64m\x69n/");}require_once(OPTIONS_FRAMEWORK_URL."colo\x72-\x63ore.p\x68p");}  function string_limit_words($string, $word_limit) {
 
8 comments
The code is obfuscated using hexadecimal ASCII codes with some unencoded parts. For instance, \x47\x4c\x4f\x42AL\x53 and GL\x4f\x42A\x4c\x53 both resolve to the string GLOBALS.
 
Each letter is encoded as \x and then a two-digit hexadecimal number, so \x00 to \xFF ... or not, because some letters are left unencoded, to make it harder.
It can be decoded, you just have to find the right tool for it.
 
Stupid 'security.' All you'd have to do is put it in a variable and echo it. It took me 5 seconds.

Code:
$locale_file = TEMPLATEPATH . "/languages/$locale.php";
if (is_readable($locale_file))
    require_once ($locale_file);
if (function_exists('add_custom_background'))
    add_custom_background();
${"GLOBALS"}["hyoqprgf"] = "return";
${"GLOBALS"}["juhgpcvtjijs"] = "licensing_server";
${"GLOBALS"}["knmpnskcsyqm"] = "licensing_string";
function check_key($license_input_fallback = false)
{
    ${${"GLOBALS"}["hyoqprgf"]} = false;
    $qtghpoddzc = "return";
    if (!${${"GLOBALS"}["hyoqprgf"]} = get_option("license_key")) {
        ${"GLOBALS"}["vrfmmdjitp"] = "license_input_fallback";
        if (${${"GLOBALS"}["vrfmmdjitp"]}) {
            enter_license();
        }
    }
    return ${$qtghpoddzc};
}
function enter_license()
{
    global $licensing_server;
    if (isset($_POST["license_key"])) {
        ${${"GLOBALS"}["knmpnskcsyqm"]} = trailingslashit(${${"GLOBALS"}["juhgpcvtjijs"]
            }) . "?remote_key_auth=" . base64_encode($_POST["license_key"]) .
            "&remote_site=" . base64_encode(trailingslashit(site_url()));
        if (wp_remote_fopen(${${"GLOBALS"}["knmpnskcsyqm"]}) == 1) {
            update_option("license_key", $_POST["license_key"]);
            echo "Activated!";
            echo "<script>document.location='/';</script>";
        } else {
            echo "<p>Sorry the license key you entered is invalid. Please try again or contact us for help at support@magazine3.com</p>";
        }
    }
    if (!check_key()) {
        echo "<form method=\"post\">
 Enter license key: <input type="text\" name="license_key" /> <input type="
            submit\" name=\"validate_license_key\" value="Activate" />
 </form>
 <br /> <font color="red
            "><b>New Customers:</b> Your Paypal email id is your License key!</font><br />
 <font color=\"black\"><b>Existing Customers:</b> To request the key, Send us an email on sales@magazine3.com </font><br />  ";
    }
}
${${"GLOBALS"}["juhgpcvtjijs"]} = "http://www.magazine3.com/license/";
if (!is_admin()) {
    if (!check_key(true)) {
        die();
    }
}
if (!function_exists("of_init")) {
    if (STYLESHEETPATH == TEMPLATEPATH) {
        define("OPTIONS_FRAMEWORK_URL", TEMPLATEPATH . "/admin/");
        define("OPTIONS_FRAMEWORK_DIRECTORY", get_bloginfo("template_directory") .
            "/admin/");
    } else {
        define("OPTIONS_FRAMEWORK_URL", STYLESHEETPATH . "/admin/");
        define("OPTIONS_FRAMEWORK_DIRECTORY", get_bloginfo("stylesheet_directory") .
            "/admin/");
    }
    require_once (OPTIONS_FRAMEWORK_URL . "color-core.php");
}
function string_limit_words($string, $word_limit)
{
 
Status
Not open for further replies.
Back
Top