Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
function fn_settings_actions_addons_sd_xml_import(&$new_status, &$old_status, $on_install)..
Decoded Output download
<? function fn_settings_actions_addons_sd_xml_import(&$new_status, &$old_status, $on_install) {
if (${
"new_status"}
=== "A") {
if (empty(call_user_func("db_get_field", "SELECT marketplace_license_key FROM ?:addons WHERE addon = ?s", "sd_xml_import"))) {
call_user_func("fn_set_notification", "E", call_user_func("__", "error"), call_user_func("str_replace", ["[addon]", "[addon_id]", "[href]"], [call_user_func(array("Tygh\Addons\SchemesManager", "getName"), "sd_xml_import", constant("CART_LANGUAGE")), "sd_xml_import", call_user_func("fn_url", "addons.licensing?addon=sd_xml_import&return_url=addons.manage")], "Before you can activate the add-on "[addon]", <a href="[href]" id="opener_licensing_and_upgrades_[addon_id]" class="cm-dialog-opener" data-ca-dialog-title="Licensing and upgrades">specify the license number</a>."));
${
"new_status"}
= "D";
}
else {
${
"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", "sd_xml_import"), "product_id" => "1611", "domain" => call_user_func(array("Tygh\Registry", "get"), "config.current_host")])], "ssl" => ["verify_peer" => constant("false")]];
${
"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", "sd_xml_import"), "product_id" => "1611", "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"]) {
${
"new_status"}
= "D";
call_user_func("fn_set_notification", "E", call_user_func("__", "error"), call_user_func("str_replace", ["[addon]", "[addon_id]", "[href]", "[license]"], [call_user_func(array("Tygh\Addons\SchemesManager", "getName"), "sd_xml_import", constant("CART_LANGUAGE")), "sd_xml_import", call_user_func("fn_url", "addons.licensing?addon=sd_xml_import&return_url=addons.manage"), call_user_func("db_get_field", "SELECT marketplace_license_key FROM ?:addons WHERE addon = ?s", "sd_xml_import")], "The license <code>[license]</code> for the add-on "[addon]" is not valid or has expired; please <a href="[href]" id="opener_licensing_and_upgrades_[addon_id]" class="cm-dialog-opener" data-ca-dialog-title="Licensing and upgrades">specify a valid license number</a>."));
}
}
}
}
?>
Did this file decode correctly?
Original Code
function fn_settings_actions_addons_sd_xml_import(&$new_status, &$old_status, $on_install) {
if (${
"\x6e\x65\x77\x5f\x73\x74\x61\x74\x75\x73"}
=== "\x41") {
if (empty(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", "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74"))) {
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", "\x5b\x61\x64\x64\x6f\x6e\x5f\x69\x64\x5d", "\x5b\x68\x72\x65\x66\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"), "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74", constant("\x43\x41\x52\x54\x5f\x4c\x41\x4e\x47\x55\x41\x47\x45")), "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74", call_user_func("\x66\x6e\x5f\x75\x72\x6c", "\x61\x64\x64\x6f\x6e\x73\x2e\x6c\x69\x63\x65\x6e\x73\x69\x6e\x67\x3f\x61\x64\x64\x6f\x6e\x3d\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74\x26\x72\x65\x74\x75\x72\x6e\x5f\x75\x72\x6c\x3d\x61\x64\x64\x6f\x6e\x73\x2e\x6d\x61\x6e\x61\x67\x65")], "\x42\x65\x66\x6f\x72\x65\x20\x79\x6f\x75\x20\x63\x61\x6e\x20\x61\x63\x74\x69\x76\x61\x74\x65\x20\x74\x68\x65\x20\x61\x64\x64\x2d\x6f\x6e\x20\x22\x5b\x61\x64\x64\x6f\x6e\x5d\x22\x2c\x20\x3c\x61\x20\x68\x72\x65\x66\x3d\x22\x5b\x68\x72\x65\x66\x5d\x22\x20\x69\x64\x3d\x22\x6f\x70\x65\x6e\x65\x72\x5f\x6c\x69\x63\x65\x6e\x73\x69\x6e\x67\x5f\x61\x6e\x64\x5f\x75\x70\x67\x72\x61\x64\x65\x73\x5f\x5b\x61\x64\x64\x6f\x6e\x5f\x69\x64\x5d\x22\x20\x63\x6c\x61\x73\x73\x3d\x22\x63\x6d\x2d\x64\x69\x61\x6c\x6f\x67\x2d\x6f\x70\x65\x6e\x65\x72\x22\x20\x64\x61\x74\x61\x2d\x63\x61\x2d\x64\x69\x61\x6c\x6f\x67\x2d\x74\x69\x74\x6c\x65\x3d\x22\x4c\x69\x63\x65\x6e\x73\x69\x6e\x67\x20\x61\x6e\x64\x20\x75\x70\x67\x72\x61\x64\x65\x73\x22\x3e\x73\x70\x65\x63\x69\x66\x79\x20\x74\x68\x65\x20\x6c\x69\x63\x65\x6e\x73\x65\x20\x6e\x75\x6d\x62\x65\x72\x3c\x2f\x61\x3e\x2e"));
${
"\x6e\x65\x77\x5f\x73\x74\x61\x74\x75\x73"}
= "\x44";
}
else {
${
"\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", "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74"), "\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x64" => "\x31\x36\x31\x31", "\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")]];
${
"\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", "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74"), "\x70\x72\x6f\x64\x75\x63\x74\x5f\x69\x64" => "\x31\x36\x31\x31", "\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"]) {
${
"\x6e\x65\x77\x5f\x73\x74\x61\x74\x75\x73"}
= "\x44";
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", "\x5b\x61\x64\x64\x6f\x6e\x5f\x69\x64\x5d", "\x5b\x68\x72\x65\x66\x5d", "\x5b\x6c\x69\x63\x65\x6e\x73\x65\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"), "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74", constant("\x43\x41\x52\x54\x5f\x4c\x41\x4e\x47\x55\x41\x47\x45")), "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74", call_user_func("\x66\x6e\x5f\x75\x72\x6c", "\x61\x64\x64\x6f\x6e\x73\x2e\x6c\x69\x63\x65\x6e\x73\x69\x6e\x67\x3f\x61\x64\x64\x6f\x6e\x3d\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74\x26\x72\x65\x74\x75\x72\x6e\x5f\x75\x72\x6c\x3d\x61\x64\x64\x6f\x6e\x73\x2e\x6d\x61\x6e\x61\x67\x65"), 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", "\x73\x64\x5f\x78\x6d\x6c\x5f\x69\x6d\x70\x6f\x72\x74")], "\x54\x68\x65\x20\x6c\x69\x63\x65\x6e\x73\x65\x20\x3c\x63\x6f\x64\x65\x3e\x5b\x6c\x69\x63\x65\x6e\x73\x65\x5d\x3c\x2f\x63\x6f\x64\x65\x3e\x20\x66\x6f\x72\x20\x74\x68\x65\x20\x61\x64\x64\x2d\x6f\x6e\x20\x22\x5b\x61\x64\x64\x6f\x6e\x5d\x22\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\x3b\x20\x70\x6c\x65\x61\x73\x65\x20\x3c\x61\x20\x68\x72\x65\x66\x3d\x22\x5b\x68\x72\x65\x66\x5d\x22\x20\x69\x64\x3d\x22\x6f\x70\x65\x6e\x65\x72\x5f\x6c\x69\x63\x65\x6e\x73\x69\x6e\x67\x5f\x61\x6e\x64\x5f\x75\x70\x67\x72\x61\x64\x65\x73\x5f\x5b\x61\x64\x64\x6f\x6e\x5f\x69\x64\x5d\x22\x20\x63\x6c\x61\x73\x73\x3d\x22\x63\x6d\x2d\x64\x69\x61\x6c\x6f\x67\x2d\x6f\x70\x65\x6e\x65\x72\x22\x20\x64\x61\x74\x61\x2d\x63\x61\x2d\x64\x69\x61\x6c\x6f\x67\x2d\x74\x69\x74\x6c\x65\x3d\x22\x4c\x69\x63\x65\x6e\x73\x69\x6e\x67\x20\x61\x6e\x64\x20\x75\x70\x67\x72\x61\x64\x65\x73\x22\x3e\x73\x70\x65\x63\x69\x66\x79\x20\x61\x20\x76\x61\x6c\x69\x64\x20\x6c\x69\x63\x65\x6e\x73\x65\x20\x6e\x75\x6d\x62\x65\x72\x3c\x2f\x61\x3e\x2e"));
}
}
}
}
Function Calls
None |
Stats
MD5 | deda6d4723e440ddacffa1ddb0ed4488 |
Eval Count | 0 |
Decode Time | 45 ms |