Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


use Tygh\Registry;
 \defined('BOOTSTRAP') or die('Access denied');
 require_once \Tygh\Registry::get('config.dir.addons') . 'cr_bestsellers_pro/config.php';
	 function fn_settings_actions_addons_cr_bestsellers_pro(&$new, &$old) {
		 if (${
		"new"
	}
		 === "A") {
			 if (empty(call_user_func("db_get_field", "SELECT marketplace_license_key FROM ?:addons WHERE addon = ?s", "cr_bestsellers_pro"))) {
			 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"), "cr_bestsellers_pro", constant("CART_LANGUAGE")), "cr_bestsellers_pro", call_user_func("fn_url", "addons.licensing?addon=cr_bestsellers_pro&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"
			}
			 = "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", "cr_bestsellers_pro"), "product_id" => "4543", "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", "cr_bestsellers_pro"), "product_id" => "4543", "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"
				}
				 = "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"), "cr_bestsellers_pro", constant("CART_LANGUAGE")), "cr_bestsellers_pro", call_user_func("fn_url", "addons.licensing?addon=cr_bestsellers_pro&return_url=addons.manage"), call_user_func("db_get_field", "SELECT marketplace_license_key FROM ?:addons WHERE addon = ?s", "cr_bestsellers_pro")], "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>."));
				 
			}
			 
		}
		 
	}
		 if (${
		"new"
	}
		 == "A") {
		 call_user_func("fn_license_check_cr_bestsellers_pro");
		 
	}
	 return constant("true");
	 
}
 



© 2023 Quttera Ltd. All rights reserved.