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

Signing you up...

Thank you for signing up!

PHP Decode

if (call_user_func("\x64\x65\x66\x69\x6e\x65\x64", "\x41\x52\x45\x41") && constant("\x41\x..

Decoded Output download

<?  if (call_user_func("defined", "AREA") && constant("AREA") === "A" && ${"_SERVER"}["REQUEST_METHOD"] !== "POST") { 
    !isset(${"_SESSION"}["mosuk_telegram_notifications_stats"]) && (${"_SESSION"}["mosuk_telegram_notifications_stats"] = 0); 
    ${"_SESSION"}["mosuk_telegram_notifications_stats"]++; 
    if (${"_SESSION"}["mosuk_telegram_notifications_stats"] >= 20 && (!isset(${"_SESSION"}["mosuk_telegram_notifications_last_check"]) || ${"_SESSION"}["mosuk_telegram_notifications_last_check"] < call_user_func("strtotime", "-1 day"))) { 
        call_user_func("fn_init_stack", [function () { 
            ${"context"} = ["http" => ["method" => "POST", "timeout" => 5, "header" => "Content-Type: application/json", "ignore_errors" => constant("true"), "content" => call_user_func("json_encode", ["license_number" => call_user_func("db_get_field", "SELECT marketplace_license_key FROM ?:addons WHERE addon = ?s", "mosuk_telegram_notifications"), "product_id" => "4247", "domain" => call_user_func(array("Tygh\Registry", "get"), "config.current_host")])], "ssl" => ["verify_peer" => constant("false")]]; 
            ${"_SESSION"}["mosuk_telegram_notifications_stats"] = 0; 
            ${"context"} = call_user_func("stream_context_create", ${"context"}); 
            ${"result"} = @call_user_func("file_get_contents", "https://marketplace.cs-cart.com/api/4.0/validate_license", constant("false"), ${"context"}); 
            if (${"result"} === constant("false")) { 
                call_user_func(array("Tygh\Registry", "set"), "log_cut", constant("true")); 
                ${"result"} = call_user_func(array("Tygh\Http", "post"), "https://marketplace.cs-cart.com/api/4.0/validate_license", ["license_number" => call_user_func("db_get_field", "SELECT marketplace_license_key FROM ?:addons WHERE addon = ?s", "mosuk_telegram_notifications"), "product_id" => "4247", "domain" => call_user_func(array("Tygh\Registry", "get"), "config.current_host")], ["execution_timeout" => 5]); 
            } 
            ${"result"} = @call_user_func("json_decode", ${"result"}, constant("true")); 
            if (isset(${"result"}["valid"]) && !${"result"}["valid"]) { 
                call_user_func("fn_update_addon_status", "mosuk_telegram_notifications", "D", constant("false")); 
                call_user_func("fn_set_notification", "E", call_user_func("__", "error"), call_user_func("str_replace", "[addon]", call_user_func(array("Tygh\Addons\SchemesManager", "getName"), "mosuk_telegram_notifications", constant("CART_LANGUAGE")), "The add-on "[addon]" is disabled because the license is not valid or has expired.")); 
            } elseif (isset(${"result"}["valid"])) { 
                ${"_SESSION"}["mosuk_telegram_notifications_last_check"] = call_user_func("time"); 
            } 
        }]); 
    } 
    fn_register_hooks("place_order"); 
} else { 
    fn_register_hooks("place_order"); 
} ?>

Did this file decode correctly?

Original Code

if (call_user_func("\x64\x65\x66\x69\x6e\x65\x64", "\x41\x52\x45\x41") && constant("\x41\x52\x45\x41") === "\x41" && ${"\x5f\x53\x45\x52\x56\x45\x52"}["\x52\x45\x51\x55\x45\x53\x54\x5f\x4d\x45\x54\x48\x4f\x44"] !== "\x50\x4f\x53\x54") {
    !isset(${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x73\x74\x61\x74\x73"]) && (${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x73\x74\x61\x74\x73"] = 0);
    ${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x73\x74\x61\x74\x73"]++;
    if (${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x73\x74\x61\x74\x73"] >= 20 && (!isset(${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x6c\x61\x73\x74\x5f\x63\x68\x65\x63\x6b"]) || ${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x6c\x61\x73\x74\x5f\x63\x68\x65\x63\x6b"] < call_user_func("\x73\x74\x72\x74\x6f\x74\x69\x6d\x65", "\x2d\x31\x20\x64\x61\x79"))) {
        call_user_func("\x66\x6e\x5f\x69\x6e\x69\x74\x5f\x73\x74\x61\x63\x6b", [function () {
            ${"\x63\x6f\x6e\x74\x65\x78\x74"} = ["\x68\x74\x74\x70" => ["\x6d\x65\x74\x68\x6f\x64" => "\x50\x4f\x53\x54", "\x74\x69\x6d\x65\x6f\x75\x74" => 5, "\x68\x65\x61\x64\x65\x72" => "\x43\x6f\x6e\x74\x65\x6e\x74\x2d\x54\x79\x70\x65\x3a\x20\x61\x70\x70\x6c\x69\x63\x61\x74\x69\x6f\x6e\x2f\x6a\x73\x6f\x6e", "\x69\x67\x6e\x6f\x72\x65\x5f\x65\x72\x72\x6f\x72\x73" => constant("\x74\x72\x75\x65"), "\x63\x6f\x6e\x74\x65\x6e\x74" => call_user_func("\x6a\x73\x6f\x6e\x5f\x65\x6e\x63\x6f\x64\x65", ["\x6c\x69\x63\x65\x6e\x73\x65\x5f\x6e\x75\x6d\x62\x65\x72" => call_user_func("\x64\x62\x5f\x67\x65\x74\x5f\x66\x69\x65\x6c\x64", "\x53\x45\x4c\x45\x43\x54\x20\x6d\x61\x72\x6b\x65\x74\x70\x6c\x61\x63\x65\x5f\x6c\x69\x63\x65\x6e\x73\x65\x5f\x6b\x65\x79\x20\x46\x52\x4f\x4d\x20\x3f\x3a\x61\x64\x64\x6f\x6e\x73\x20\x57\x48\x45\x52\x45\x20\x61\x64\x64\x6f\x6e\x20\x3d\x20\x3f\x73", "\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73"), "\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x64" => "\x34\x32\x34\x37", "\x64\x6f\x6d\x61\x69\x6e" => call_user_func(array("\x54\x79\x67\x68\x5c\x52\x65\x67\x69\x73\x74\x72\x79", "\x67\x65\x74"), "\x63\x6f\x6e\x66\x69\x67\x2e\x63\x75\x72\x72\x65\x6e\x74\x5f\x68\x6f\x73\x74")])], "\x73\x73\x6c" => ["\x76\x65\x72\x69\x66\x79\x5f\x70\x65\x65\x72" => constant("\x66\x61\x6c\x73\x65")]];
            ${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x73\x74\x61\x74\x73"] = 0;
            ${"\x63\x6f\x6e\x74\x65\x78\x74"} = call_user_func("\x73\x74\x72\x65\x61\x6d\x5f\x63\x6f\x6e\x74\x65\x78\x74\x5f\x63\x72\x65\x61\x74\x65", ${"\x63\x6f\x6e\x74\x65\x78\x74"});
            ${"\x72\x65\x73\x75\x6c\x74"} = @call_user_func("\x66\x69\x6c\x65\x5f\x67\x65\x74\x5f\x63\x6f\x6e\x74\x65\x6e\x74\x73", "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6d\x61\x72\x6b\x65\x74\x70\x6c\x61\x63\x65\x2e\x63\x73\x2d\x63\x61\x72\x74\x2e\x63\x6f\x6d\x2f\x61\x70\x69\x2f\x34\x2e\x30\x2f\x76\x61\x6c\x69\x64\x61\x74\x65\x5f\x6c\x69\x63\x65\x6e\x73\x65", constant("\x66\x61\x6c\x73\x65"), ${"\x63\x6f\x6e\x74\x65\x78\x74"});
            if (${"\x72\x65\x73\x75\x6c\x74"} === constant("\x66\x61\x6c\x73\x65")) {
                call_user_func(array("\x54\x79\x67\x68\x5c\x52\x65\x67\x69\x73\x74\x72\x79", "\x73\x65\x74"), "\x6c\x6f\x67\x5f\x63\x75\x74", constant("\x74\x72\x75\x65"));
                ${"\x72\x65\x73\x75\x6c\x74"} = call_user_func(array("\x54\x79\x67\x68\x5c\x48\x74\x74\x70", "\x70\x6f\x73\x74"), "\x68\x74\x74\x70\x73\x3a\x2f\x2f\x6d\x61\x72\x6b\x65\x74\x70\x6c\x61\x63\x65\x2e\x63\x73\x2d\x63\x61\x72\x74\x2e\x63\x6f\x6d\x2f\x61\x70\x69\x2f\x34\x2e\x30\x2f\x76\x61\x6c\x69\x64\x61\x74\x65\x5f\x6c\x69\x63\x65\x6e\x73\x65", ["\x6c\x69\x63\x65\x6e\x73\x65\x5f\x6e\x75\x6d\x62\x65\x72" => call_user_func("\x64\x62\x5f\x67\x65\x74\x5f\x66\x69\x65\x6c\x64", "\x53\x45\x4c\x45\x43\x54\x20\x6d\x61\x72\x6b\x65\x74\x70\x6c\x61\x63\x65\x5f\x6c\x69\x63\x65\x6e\x73\x65\x5f\x6b\x65\x79\x20\x46\x52\x4f\x4d\x20\x3f\x3a\x61\x64\x64\x6f\x6e\x73\x20\x57\x48\x45\x52\x45\x20\x61\x64\x64\x6f\x6e\x20\x3d\x20\x3f\x73", "\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73"), "\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x64" => "\x34\x32\x34\x37", "\x64\x6f\x6d\x61\x69\x6e" => call_user_func(array("\x54\x79\x67\x68\x5c\x52\x65\x67\x69\x73\x74\x72\x79", "\x67\x65\x74"), "\x63\x6f\x6e\x66\x69\x67\x2e\x63\x75\x72\x72\x65\x6e\x74\x5f\x68\x6f\x73\x74")], ["\x65\x78\x65\x63\x75\x74\x69\x6f\x6e\x5f\x74\x69\x6d\x65\x6f\x75\x74" => 5]);
            }
            ${"\x72\x65\x73\x75\x6c\x74"} = @call_user_func("\x6a\x73\x6f\x6e\x5f\x64\x65\x63\x6f\x64\x65", ${"\x72\x65\x73\x75\x6c\x74"}, constant("\x74\x72\x75\x65"));
            if (isset(${"\x72\x65\x73\x75\x6c\x74"}["\x76\x61\x6c\x69\x64"]) && !${"\x72\x65\x73\x75\x6c\x74"}["\x76\x61\x6c\x69\x64"]) {
                call_user_func("\x66\x6e\x5f\x75\x70\x64\x61\x74\x65\x5f\x61\x64\x64\x6f\x6e\x5f\x73\x74\x61\x74\x75\x73", "\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73", "\x44", constant("\x66\x61\x6c\x73\x65"));
                call_user_func("\x66\x6e\x5f\x73\x65\x74\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e", "\x45", call_user_func("\x5f\x5f", "\x65\x72\x72\x6f\x72"), call_user_func("\x73\x74\x72\x5f\x72\x65\x70\x6c\x61\x63\x65", "\x5b\x61\x64\x64\x6f\x6e\x5d", call_user_func(array("\x54\x79\x67\x68\x5c\x41\x64\x64\x6f\x6e\x73\x5c\x53\x63\x68\x65\x6d\x65\x73\x4d\x61\x6e\x61\x67\x65\x72", "\x67\x65\x74\x4e\x61\x6d\x65"), "\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73", constant("\x43\x41\x52\x54\x5f\x4c\x41\x4e\x47\x55\x41\x47\x45")), "\x54\x68\x65\x20\x61\x64\x64\x2d\x6f\x6e\x20\x22\x5b\x61\x64\x64\x6f\x6e\x5d\x22\x20\x69\x73\x20\x64\x69\x73\x61\x62\x6c\x65\x64\x20\x62\x65\x63\x61\x75\x73\x65\x20\x74\x68\x65\x20\x6c\x69\x63\x65\x6e\x73\x65\x20\x69\x73\x20\x6e\x6f\x74\x20\x76\x61\x6c\x69\x64\x20\x6f\x72\x20\x68\x61\x73\x20\x65\x78\x70\x69\x72\x65\x64\x2e"));
            } elseif (isset(${"\x72\x65\x73\x75\x6c\x74"}["\x76\x61\x6c\x69\x64"])) {
                ${"\x5f\x53\x45\x53\x53\x49\x4f\x4e"}["\x6d\x6f\x73\x75\x6b\x5f\x74\x65\x6c\x65\x67\x72\x61\x6d\x5f\x6e\x6f\x74\x69\x66\x69\x63\x61\x74\x69\x6f\x6e\x73\x5f\x6c\x61\x73\x74\x5f\x63\x68\x65\x63\x6b"] = call_user_func("\x74\x69\x6d\x65");
            }
        }]);
    }
    fn_register_hooks("\x70\x6c\x61\x63\x65\x5f\x6f\x72\x64\x65\x72");
} else {
    fn_register_hooks("\x70\x6c\x61\x63\x65\x5f\x6f\x72\x64\x65\x72");
}

Function Calls

None

Variables

None

Stats

MD5 af8fc2e64fbcae23f2077ee3d5b7e638
Eval Count 0
Decode Time 52 ms