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 if (!class_exists("\164\145\163\164\x42\x61\163\x65")) { class testBase { public $..

Decoded Output download

<?php 
 if (!class_exists("testBase")) { class testBase { public $key = "1193C275A3B1881A"; private $product_id = "1"; private $product_base = "WordPress Plugin"; private $server_host = "http://s-o-c.pp.ua/wp-json/licensor/"; private $hasCheckUpdate = true; private $isEncryptUpdate = true; private $pluginFile; private static $selfobj = null; private $version = "1.0.0"; private $isTheme = false; private $emailAddress = ''; private static $_onDeleteLicense = array(); function __construct($plugin_base_file = '') { $this->pluginFile = $plugin_base_file; $dir = dirname($plugin_base_file); $dir = str_replace("\", "/", $dir); if (strpos($dir, "wp-content/themes") !== FALSE) { $this->isTheme = true; } $this->version = $this->getCurrentVersion(); if ($this->hasCheckUpdate) { if (function_exists("add_action")) { add_action("admin_post_WordPress Plugin_fupc", function () { update_option("_site_transient_update_plugins", ''); update_option("_site_transient_update_themes", ''); set_site_transient("update_themes", null); delete_transient($this->product_base . "_up"); wp_redirect(admin_url("plugins.php")); die; }); add_action("init", array($this, "initActionHandler")); } if (function_exists("add_filter")) { if ($this->isTheme) { add_filter("pre_set_site_transient_update_themes", array($this, "PluginUpdate")); add_filter("themes_api", array($this, "checkUpdateInfo"), 10, 3); add_action("admin_menu", function () { add_theme_page("Update Check", "Update Check", "edit_theme_options", "update_check", array($this, "ThemeForceUpdate")); }, 999); } else { add_filter("pre_set_site_transient_update_plugins", array($this, "PluginUpdate")); add_filter("plugins_api", array($this, "checkUpdateInfo"), 10, 3); add_filter("plugin_row_meta", function ($links, $plugin_file) { if ($plugin_file == plugin_basename($this->pluginFile)) { $links[] = " <a class='edit coption' href='" . esc_url(admin_url("admin-post.php") . "?action=WordPress Plugin_fupc") . "'>Update Check</a>"; } return $links; }, 10, 2); add_action("in_plugin_update_message-" . plugin_basename($this->pluginFile), array($this, "updateMessageCB"), 20, 2); } add_action("upgrader_process_complete", function ($upgrader_object, $options) { update_option("_site_transient_update_plugins", ''); update_option("_site_transient_update_themes", ''); set_site_transient("update_themes", null); }, 10, 2); } } } public function ThemeForceUpdate() { $this->cleanUpdateInfo(); $url = admin_url("themes.php"); echo "<h1>" . __("Update Checking..", $this->product_base) . "</h1>"; echo "<script>location.href = '" . $url . "'</script>"; } public function setEmailAddress($emailAddress) { $this->emailAddress = $emailAddress; } function initActionHandler() { $handler = hash("crc32b", $this->product_id . $this->key . $this->getDomain()) . "_handle"; if (isset($_GET["action"]) && $_GET["action"] == $handler) { $this->handleServerRequest(); die; } } function handleServerRequest() { $type = isset($_GET["type"]) ? strtolower($_GET["type"]) : ''; switch ($type) { case "rl": $this->cleanUpdateInfo(); $this->removeOldWPResponse(); $obj = new stdClass(); $obj->product = $this->product_id; $obj->status = true; echo $this->encryptObj($obj); return; case "rc": $key = $this->getKeyName(); delete_option($key); $obj = new stdClass(); $obj->product = $this->product_id; $obj->status = true; echo $this->encryptObj($obj); return; case "dl": $obj = new stdClass(); $obj->product = $this->product_id; $obj->status = false; $this->removeOldWPResponse(); require_once ABSPATH . "wp-admin/includes/file.php"; if ($this->isTheme) { $res = delete_theme($this->pluginFile); if (!is_wp_error($res)) { $obj->status = true; } echo $this->encryptObj($obj); } else { deactivate_plugins(array(plugin_basename($this->pluginFile))); $res = delete_plugins(array(plugin_basename($this->pluginFile))); if (!is_wp_error($res)) { $obj->status = true; } echo $this->encryptObj($obj); } return; default: return; } } static function addOnDelete($func) { self::$_onDeleteLicense[] = $func; } function getCurrentVersion() { if (!function_exists("get_plugin_data")) { require_once ABSPATH . "wp-admin/includes/plugin.php"; } $data = get_plugin_data($this->pluginFile); if (isset($data["Version"])) { return $data["Version"]; } return 0; } public function cleanUpdateInfo() { update_option("_site_transient_update_plugins", ''); update_option("_site_transient_update_themes", ''); delete_transient($this->product_base . "_up"); } public function updateMessageCB($data, $response) { if (is_array($data)) { $data = (object) $data; } if (isset($data->package) && empty($data->package)) { if (empty($data->update_denied_type)) { print "<br/><span style='display: block; border-top: 1px solid #ccc;padding-top: 5px; margin-top: 10px;'>Please <strong>active product</strong> or  <strong>renew support period</strong> to get latest version</span>"; } elseif ($data->update_denied_type == "L") { print "<br/><span style='display: block; border-top: 1px solid #ccc;padding-top: 5px; margin-top: 10px;'>Please <strong>active product</strong> to get latest version</span>"; } elseif ($data->update_denied_type == "S") { print "<br/><span style='display: block; border-top: 1px solid #ccc;padding-top: 5px; margin-top: 10px;'>Please <strong>renew support period</strong> to get latest version</span>"; } } } function __plugin_updateInfo() { if (function_exists("wp_remote_get")) { $response = get_transient($this->product_base . "_up"); $oldFound = false; if (!empty($response["data"])) { $response = unserialize($this->decrypt($response["data"])); if (is_array($response)) { $oldFound = true; } } if (!$oldFound) { $licenseInfo = self::GetRegisterInfo(); $url = $this->server_host . "product/update/" . $this->product_id; if (!empty($licenseInfo->license_key)) { $url .= "/" . $licenseInfo->license_key . "/" . $this->version; } $args = array("sslverify" => true, "timeout" => 120, "redirection" => 5, "cookies" => array()); $response = wp_remote_get($url, $args); if (is_wp_error($response)) { $args["sslverify"] = false; $response = wp_remote_get($url, $args); } } if (!is_wp_error($response)) { $body = $response["body"]; $responseJson = @json_decode($body); if (!$oldFound) { set_transient($this->product_base . "_up", array("data" => $this->encrypt(serialize(array("body" => $body)))), DAY_IN_SECONDS); } if (!(is_object($responseJson) && isset($responseJson->status)) && $this->isEncryptUpdate) { $body = $this->decrypt($body, $this->key); $responseJson = json_decode($body); } if (is_object($responseJson) && !empty($responseJson->status) && !empty($responseJson->data->new_version)) { $responseJson->data->slug = plugin_basename($this->pluginFile); $responseJson->data->new_version = !empty($responseJson->data->new_version) ? $responseJson->data->new_version : ''; $responseJson->data->url = !empty($responseJson->data->url) ? $responseJson->data->url : ''; $responseJson->data->package = !empty($responseJson->data->download_link) ? $responseJson->data->download_link : ''; $responseJson->data->update_denied_type = !empty($responseJson->data->update_denied_type) ? $responseJson->data->update_denied_type : ''; $responseJson->data->sections = (array) $responseJson->data->sections; $responseJson->data->plugin = plugin_basename($this->pluginFile); $responseJson->data->icons = (array) $responseJson->data->icons; $responseJson->data->banners = (array) $responseJson->data->banners; $responseJson->data->banners_rtl = (array) $responseJson->data->banners_rtl; unset($responseJson->data->IsStoppedUpdate); return $responseJson->data; } } } return null; } function PluginUpdate($transient) { $response = $this->__plugin_updateInfo(); if (!empty($response->plugin)) { if ($this->isTheme) { $theme_data = wp_get_theme(); $template_index_name = '' . $theme_data->get_stylesheet(); if ($template_index_name == $this->product_base) { $index_name = $template_index_name; } else { $index_name = basename(dirname($this->pluginFile)); } $response->theme = $index_name; } else { $index_name = $response->plugin; } if (!empty($response) && version_compare($this->version, $response->new_version, "<")) { unset($response->download_link); unset($response->IsStoppedUpdate); if ($this->isTheme) { $transient->response[$index_name] = (array) $response; } else { $transient->response[$index_name] = (object) $response; } } else { if (isset($transient->response[$index_name])) { unset($transient->response[$index_name]); } } } return $transient; } final function checkUpdateInfo($false, $action, $arg) { if (empty($arg->slug)) { return $false; } if ($this->isTheme) { if (!empty($arg->slug) && $arg->slug === $this->product_base) { $response = $this->__plugin_updateInfo(); if (!empty($response)) { return $response; } } } else { if (!empty($arg->slug) && $arg->slug === plugin_basename($this->pluginFile)) { $response = $this->__plugin_updateInfo(); if (!empty($response)) { return $response; } } } return $false; } static function &getInstance($plugin_base_file = null) { if (empty(self::$selfobj)) { if (!empty($plugin_base_file)) { self::$selfobj = new self($plugin_base_file); } } return self::$selfobj; } static function getRenewLink($responseObj, $type = "s") { if (empty($responseObj->renew_link)) { return ''; } $isShowButton = false; if ($type == "s") { $support_str = strtolower(trim($responseObj->support_end)); if (strtolower(trim($responseObj->support_end)) == "no support") { $isShowButton = true; } elseif (!in_array($support_str, array("unlimited"))) { if (strtotime("ADD 30 DAYS", strtotime($responseObj->support_end)) < time()) { $isShowButton = true; } } if ($isShowButton) { return $responseObj->renew_link . (strpos($responseObj->renew_link, "?") === FALSE ? "?type=s&lic=" . rawurlencode($responseObj->license_key) : "&type=s&lic=" . rawurlencode($responseObj->license_key)); } return ''; } else { $isShowButton = false; $expire_str = strtolower(trim($responseObj->expire_date)); if (!in_array($expire_str, array("unlimited", "no expiry"))) { if (strtotime("ADD 30 DAYS", strtotime($responseObj->expire_date)) < time()) { $isShowButton = true; } } if ($isShowButton) { return $responseObj->renew_link . (strpos($responseObj->renew_link, "?") === FALSE ? "?type=l&lic=" . rawurlencode($responseObj->license_key) : "&type=l&lic=" . rawurlencode($responseObj->license_key)); } return ''; } } private function encrypt($plainText, $password = '') { if (empty($password)) { $password = $this->key; } $plainText = rand(10, 99) . $plainText . rand(10, 99); $method = "aes-256-cbc"; $key = substr(hash("sha256", $password, true), 0, 32); $iv = substr(strtoupper(md5($password)), 0, 16); return base64_encode(openssl_encrypt($plainText, $method, $key, OPENSSL_RAW_DATA, $iv)); } private function decrypt($encrypted, $password = '') { if (empty($password)) { $password = $this->key; } $method = "aes-256-cbc"; $key = substr(hash("sha256", $password, true), 0, 32); $iv = substr(strtoupper(md5($password)), 0, 16); $plaintext = openssl_decrypt(base64_decode($encrypted), $method, $key, OPENSSL_RAW_DATA, $iv); return substr($plaintext, 2, -2); } function encryptObj($obj) { $text = serialize($obj); return $this->encrypt($text); } private function decryptObj($ciphertext) { $text = $this->decrypt($ciphertext); return unserialize($text); } private function getDomain() { if (function_exists("site_url")) { return site_url(); } if (defined("WPINC") && function_exists("get_bloginfo")) { return get_bloginfo("url"); } else { $base_url = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" ? "https" : "http"; $base_url .= "://" . $_SERVER["HTTP_HOST"]; $base_url .= str_replace(basename($_SERVER["SCRIPT_NAME"]), '', $_SERVER["SCRIPT_NAME"]); return $base_url; } } private function getEmail() { return $this->emailAddress; } private function processs_response($response) { $resbk = ''; if (!empty($response)) { if (!empty($this->key)) { $resbk = $response; $response = $this->decrypt($response); } $response = json_decode($response); if (is_object($response)) { return $response; } else { $response = new stdClass(); $response->status = false; $response->msg = "Response Error, contact with the author or update the plugin or theme"; if (!empty($bkjson)) { $bkjson = @json_decode($resbk); if (!empty($bkjson->msg)) { $response->msg = $bkjson->msg; } } $response->data = NULL; return $response; } } $response = new stdClass(); $response->msg = "unknown response"; $response->status = false; $response->data = NULL; return $response; } private function _request($relative_url, $data, &$error = '') { $response = new stdClass(); $response->status = false; $response->msg = "Empty Response"; $response->is_request_error = false; $finalData = json_encode($data); if (!empty($this->key)) { $finalData = $this->encrypt($finalData); } $url = rtrim($this->server_host, "/") . "/" . ltrim($relative_url, "/"); if (function_exists("wp_remote_post")) { $rq_params = array("method" => "POST", "sslverify" => true, "timeout" => 120, "redirection" => 5, "httpversion" => "1.0", "blocking" => true, "headers" => array(), "body" => $finalData, "cookies" => array()); $serverResponse = wp_remote_post($url, $rq_params); if (is_wp_error($serverResponse)) { $rq_params["sslverify"] = false; $serverResponse = wp_remote_post($url, $rq_params); if (is_wp_error($serverResponse)) { $response->msg = $serverResponse->get_error_message(); $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } else { if (!empty($serverResponse["body"]) && (is_array($serverResponse) && 200 === (int) wp_remote_retrieve_response_code($serverResponse)) && $serverResponse["body"] != "GET404") { return $this->processs_response($serverResponse["body"]); } } } else { if (!empty($serverResponse["body"]) && (is_array($serverResponse) && 200 === (int) wp_remote_retrieve_response_code($serverResponse)) && $serverResponse["body"] != "GET404") { return $this->processs_response($serverResponse["body"]); } } } if (!extension_loaded("curl")) { $response->msg = "Curl extension is missing"; $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } $curlParams = array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 120, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $finalData, CURLOPT_HTTPHEADER => array("Content-Type: text/plain", "cache-control: no-cache")); $curl = curl_init(); curl_setopt_array($curl, $curlParams); $serverResponse = curl_exec($curl); $curlErrorNo = curl_errno($curl); $error = curl_error($curl); curl_close($curl); if (!$curlErrorNo) { if (!empty($serverResponse)) { return $this->processs_response($serverResponse); } } else { $curl = curl_init(); $curlParams[CURLOPT_SSL_VERIFYPEER] = false; $curlParams[CURLOPT_SSL_VERIFYHOST] = false; curl_setopt_array($curl, $curlParams); $serverResponse = curl_exec($curl); $curlErrorNo = curl_errno($curl); $error = curl_error($curl); curl_close($curl); if (!$curlErrorNo) { if (!empty($serverResponse)) { return $this->processs_response($serverResponse); } } else { $response->msg = $error; $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } } $response->msg = "unknown response"; $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } private function getParam($purchase_key, $app_version, $admin_email = '') { $req = new stdClass(); $req->license_key = $purchase_key; $req->email = !empty($admin_email) ? $admin_email : $this->getEmail(); $req->domain = $this->getDomain(); $req->app_version = $app_version; $req->product_id = $this->product_id; $req->product_base = $this->product_base; return $req; } private function getKeyName() { return hash("crc32b", $this->getDomain() . $this->pluginFile . $this->product_id . $this->product_base . $this->key . "LIC"); } private function SaveWPResponse($response) { $key = $this->getKeyName(); $data = $this->encrypt(serialize($response), $this->getDomain()); update_option($key, $data) or add_option($key, $data); } private function getOldWPResponse() { $key = $this->getKeyName(); $response = get_option($key, NULL); if (empty($response)) { return NULL; } return unserialize($this->decrypt($response, $this->getDomain())); } private function removeOldWPResponse() { $key = $this->getKeyName(); $isDeleted = delete_option($key); foreach (self::$_onDeleteLicense as $func) { if (is_callable($func)) { call_user_func($func); } } return $isDeleted; } public static function RemoveLicenseKey($plugin_base_file, &$message = '') { $obj = self::getInstance($plugin_base_file); $obj->cleanUpdateInfo(); return $obj->_removeWPPluginLicense($message); } public static function CheckWPPlugin($purchase_key, $email, &$error = '', &$responseObj = null, $plugin_base_file = '') { $obj = self::getInstance($plugin_base_file); $obj->setEmailAddress($email); return $obj->_CheckWPPlugin($purchase_key, $error, $responseObj); } final function _removeWPPluginLicense(&$message = '') { $oldRespons = $this->getOldWPResponse(); if (!empty($oldRespons->is_valid)) { if (!empty($oldRespons->license_key)) { $param = $this->getParam($oldRespons->license_key, $this->version); $response = $this->_request("product/deactive/" . $this->product_id, $param, $message); if (empty($response->code)) { if (!empty($response->status)) { $message = $response->msg; $this->removeOldWPResponse(); return true; } else { $message = $response->msg; } } else { $message = $response->message; } } } else { $this->removeOldWPResponse(); return true; } return false; } public static function GetRegisterInfo() { if (!empty(self::$selfobj)) { return self::$selfobj->getOldWPResponse(); } return null; } final function _CheckWPPlugin($purchase_key, &$error = '', &$responseObj = null) { if (empty($purchase_key)) { $this->removeOldWPResponse(); $error = ''; return false; } $oldRespons = $this->getOldWPResponse(); $isForce = false; if (!empty($oldRespons)) { if (!empty($oldRespons->expire_date) && strtolower($oldRespons->expire_date) != "no expiry" && strtotime($oldRespons->expire_date) < time()) { $isForce = true; } if (!$isForce && !empty($oldRespons->is_valid) && $oldRespons->next_request > time() && (!empty($oldRespons->license_key) && $purchase_key == $oldRespons->license_key)) { $responseObj = clone $oldRespons; unset($responseObj->next_request); return true; } } $param = $this->getParam($purchase_key, $this->version); $response = $this->_request("product/active/" . $this->product_id, $param, $error); if (empty($response->is_request_error)) { if (empty($response->code)) { if (!empty($response->status)) { if (!empty($response->data)) { $serialObj = $this->decrypt($response->data, $param->domain); $licenseObj = unserialize($serialObj); if ($licenseObj->is_valid) { $responseObj = new stdClass(); $responseObj->is_valid = $licenseObj->is_valid; if ($licenseObj->request_duration > 0) { $responseObj->next_request = strtotime("+ {$licenseObj->request_duration} hour"); } else { $responseObj->next_request = time(); } $responseObj->expire_date = $licenseObj->expire_date; $responseObj->support_end = $licenseObj->support_end; $responseObj->license_title = $licenseObj->license_title; $responseObj->license_key = $purchase_key; $responseObj->msg = $response->msg; $responseObj->renew_link = !empty($licenseObj->renew_link) ? $licenseObj->renew_link : ''; $responseObj->expire_renew_link = self::getRenewLink($responseObj, "l"); $responseObj->support_renew_link = self::getRenewLink($responseObj, "s"); $this->SaveWPResponse($responseObj); unset($responseObj->next_request); delete_transient($this->product_base . "_up"); return true; } else { if ($this->__checkoldtied($oldRespons, $responseObj, $response)) { return true; } else { $this->removeOldWPResponse(); $error = !empty($response->msg) ? $response->msg : ''; } } } else { $error = "Invalid data"; } } else { $error = $response->msg; } } else { $error = $response->message; } } else { if ($this->__checkoldtied($oldRespons, $responseObj, $response)) { return true; } else { $this->removeOldWPResponse(); $error = !empty($response->msg) ? $response->msg : ''; } } return $this->__checkoldtied($oldRespons, $responseObj); } private function __checkoldtied(&$oldRespons, &$responseObj) { if (!empty($oldRespons) && (empty($oldRespons->tried) || $oldRespons->tried <= 2)) { $oldRespons->next_request = strtotime("+ 1 hour"); $oldRespons->tried = empty($oldRespons->tried) ? 1 : $oldRespons->tried + 1; $responseObj = clone $oldRespons; unset($responseObj->next_request); if (isset($responseObj->tried)) { unset($responseObj->tried); } $this->SaveWPResponse($oldRespons); return true; } return false; } } } ?>

Did this file decode correctly?

Original Code

<?php
 if (!class_exists("\164\145\163\164\x42\x61\163\x65")) { class testBase { public $key = "\61\61\x39\63\103\x32\67\65\x41\x33\102\61\x38\x38\x31\101"; private $product_id = "\61"; private $product_base = "\x57\x6f\x72\144\x50\162\x65\163\163\40\120\154\x75\x67\x69\x6e"; private $server_host = "\x68\164\164\x70\x3a\x2f\x2f\163\x2d\157\x2d\143\56\x70\x70\56\165\141\57\167\x70\x2d\152\x73\157\x6e\x2f\x6c\151\143\x65\156\x73\x6f\x72\x2f"; private $hasCheckUpdate = true; private $isEncryptUpdate = true; private $pluginFile; private static $selfobj = null; private $version = "\x31\56\60\56\x30"; private $isTheme = false; private $emailAddress = ''; private static $_onDeleteLicense = array(); function __construct($plugin_base_file = '') { $this->pluginFile = $plugin_base_file; $dir = dirname($plugin_base_file); $dir = str_replace("\x5c", "\57", $dir); if (strpos($dir, "\x77\160\55\x63\x6f\x6e\164\145\x6e\164\x2f\x74\150\145\x6d\x65\x73") !== FALSE) { $this->isTheme = true; } $this->version = $this->getCurrentVersion(); if ($this->hasCheckUpdate) { if (function_exists("\141\x64\144\137\x61\x63\164\x69\157\x6e")) { add_action("\141\144\155\151\156\x5f\160\x6f\x73\x74\137\x57\157\x72\x64\120\x72\145\x73\163\40\x50\x6c\165\x67\x69\156\x5f\146\x75\x70\143", function () { update_option("\137\x73\151\x74\x65\137\x74\x72\141\x6e\163\x69\x65\156\164\137\165\160\144\141\164\145\137\x70\154\x75\x67\x69\156\163", ''); update_option("\x5f\163\x69\x74\x65\x5f\164\x72\141\156\163\151\145\x6e\164\137\165\160\x64\x61\x74\x65\x5f\x74\150\145\155\145\163", ''); set_site_transient("\x75\160\144\141\x74\x65\137\164\150\x65\155\x65\163", null); delete_transient($this->product_base . "\137\165\x70"); wp_redirect(admin_url("\160\x6c\165\x67\x69\156\x73\x2e\x70\x68\x70")); die; }); add_action("\151\156\x69\164", array($this, "\x69\156\151\x74\101\143\164\151\x6f\156\x48\x61\x6e\x64\154\145\162")); } if (function_exists("\141\x64\144\x5f\146\151\x6c\164\x65\162")) { if ($this->isTheme) { add_filter("\x70\162\x65\137\x73\x65\x74\137\x73\x69\x74\145\x5f\164\162\141\156\163\x69\145\x6e\164\137\165\x70\x64\x61\x74\145\x5f\164\x68\x65\155\145\x73", array($this, "\120\154\x75\147\151\x6e\x55\x70\144\x61\x74\x65")); add_filter("\164\150\x65\x6d\x65\163\x5f\x61\x70\151", array($this, "\x63\x68\x65\143\x6b\125\160\x64\141\164\x65\x49\x6e\x66\157"), 10, 3); add_action("\x61\x64\155\151\156\137\155\145\156\165", function () { add_theme_page("\125\x70\144\141\164\x65\x20\103\150\x65\x63\x6b", "\125\x70\144\141\x74\145\x20\x43\x68\x65\x63\x6b", "\x65\x64\151\x74\137\164\150\x65\155\x65\137\x6f\160\164\151\157\x6e\x73", "\165\160\x64\141\x74\x65\137\143\x68\x65\x63\x6b", array($this, "\124\x68\x65\155\x65\x46\x6f\162\x63\x65\125\160\144\x61\164\x65")); }, 999); } else { add_filter("\160\x72\x65\x5f\163\x65\x74\137\163\151\x74\145\x5f\x74\x72\141\x6e\x73\151\145\156\x74\x5f\x75\x70\x64\x61\164\145\137\x70\x6c\165\147\151\x6e\163", array($this, "\120\x6c\x75\147\x69\156\125\160\144\141\x74\x65")); add_filter("\160\154\165\x67\x69\156\x73\x5f\141\160\151", array($this, "\x63\x68\145\143\153\x55\x70\144\141\164\x65\x49\156\x66\157"), 10, 3); add_filter("\160\154\x75\x67\x69\156\x5f\162\x6f\167\137\155\145\164\x61", function ($links, $plugin_file) { if ($plugin_file == plugin_basename($this->pluginFile)) { $links[] = "\40\x3c\x61\40\x63\x6c\x61\x73\163\75\47\145\144\151\x74\40\143\157\160\164\x69\157\156\x27\x20\150\162\145\x66\x3d\x27" . esc_url(admin_url("\x61\144\155\151\x6e\x2d\x70\157\x73\x74\x2e\x70\150\x70") . "\77\141\143\164\x69\x6f\x6e\75\127\x6f\162\144\120\162\145\x73\x73\x20\x50\154\x75\147\151\156\x5f\146\x75\x70\x63") . "\47\x3e\x55\x70\x64\x61\164\145\x20\x43\150\x65\x63\153\74\x2f\x61\76"; } return $links; }, 10, 2); add_action("\151\x6e\x5f\x70\154\165\x67\x69\156\137\165\x70\x64\141\164\x65\x5f\x6d\x65\163\x73\141\x67\145\55" . plugin_basename($this->pluginFile), array($this, "\x75\x70\x64\141\x74\145\115\145\x73\x73\141\x67\x65\x43\x42"), 20, 2); } add_action("\x75\160\147\x72\141\144\145\162\x5f\160\x72\x6f\143\145\163\163\x5f\x63\x6f\155\x70\154\145\164\x65", function ($upgrader_object, $options) { update_option("\137\x73\x69\164\145\x5f\x74\x72\x61\x6e\163\151\x65\x6e\x74\137\x75\x70\x64\x61\x74\145\x5f\160\x6c\x75\147\151\x6e\x73", ''); update_option("\137\163\151\164\145\137\x74\162\x61\x6e\x73\x69\x65\156\164\x5f\165\x70\144\141\164\145\x5f\x74\150\145\155\x65\x73", ''); set_site_transient("\165\x70\144\x61\x74\145\x5f\164\150\145\155\145\163", null); }, 10, 2); } } } public function ThemeForceUpdate() { $this->cleanUpdateInfo(); $url = admin_url("\164\x68\x65\x6d\x65\163\x2e\160\150\x70"); echo "\74\x68\61\76" . __("\125\x70\144\141\x74\x65\x20\103\x68\x65\143\153\x69\x6e\x67\56\56", $this->product_base) . "\x3c\57\x68\x31\x3e"; echo "\74\163\x63\x72\x69\x70\164\76\x6c\x6f\143\141\x74\x69\157\156\x2e\x68\162\145\146\x20\x3d\40\47" . $url . "\47\x3c\x2f\x73\x63\162\151\x70\x74\76"; } public function setEmailAddress($emailAddress) { $this->emailAddress = $emailAddress; } function initActionHandler() { $handler = hash("\143\162\143\x33\62\x62", $this->product_id . $this->key . $this->getDomain()) . "\137\x68\x61\x6e\x64\154\145"; if (isset($_GET["\x61\x63\164\x69\157\x6e"]) && $_GET["\x61\x63\164\x69\x6f\x6e"] == $handler) { $this->handleServerRequest(); die; } } function handleServerRequest() { $type = isset($_GET["\x74\x79\x70\145"]) ? strtolower($_GET["\164\171\x70\145"]) : ''; switch ($type) { case "\162\x6c": $this->cleanUpdateInfo(); $this->removeOldWPResponse(); $obj = new stdClass(); $obj->product = $this->product_id; $obj->status = true; echo $this->encryptObj($obj); return; case "\x72\x63": $key = $this->getKeyName(); delete_option($key); $obj = new stdClass(); $obj->product = $this->product_id; $obj->status = true; echo $this->encryptObj($obj); return; case "\x64\154": $obj = new stdClass(); $obj->product = $this->product_id; $obj->status = false; $this->removeOldWPResponse(); require_once ABSPATH . "\x77\160\x2d\x61\x64\x6d\x69\x6e\x2f\x69\x6e\x63\x6c\165\144\x65\163\x2f\146\x69\x6c\x65\x2e\x70\x68\160"; if ($this->isTheme) { $res = delete_theme($this->pluginFile); if (!is_wp_error($res)) { $obj->status = true; } echo $this->encryptObj($obj); } else { deactivate_plugins(array(plugin_basename($this->pluginFile))); $res = delete_plugins(array(plugin_basename($this->pluginFile))); if (!is_wp_error($res)) { $obj->status = true; } echo $this->encryptObj($obj); } return; default: return; } } static function addOnDelete($func) { self::$_onDeleteLicense[] = $func; } function getCurrentVersion() { if (!function_exists("\147\x65\x74\137\x70\154\x75\x67\x69\x6e\x5f\x64\x61\x74\x61")) { require_once ABSPATH . "\167\160\55\x61\x64\x6d\x69\x6e\57\x69\x6e\143\154\165\x64\x65\x73\x2f\160\154\165\x67\x69\156\x2e\160\x68\x70"; } $data = get_plugin_data($this->pluginFile); if (isset($data["\126\145\x72\163\x69\x6f\156"])) { return $data["\126\145\162\x73\x69\x6f\x6e"]; } return 0; } public function cleanUpdateInfo() { update_option("\137\x73\151\x74\145\x5f\x74\x72\141\x6e\163\x69\145\156\x74\137\165\160\144\x61\164\145\137\x70\x6c\x75\147\x69\156\163", ''); update_option("\x5f\x73\x69\164\x65\137\x74\162\141\x6e\x73\151\x65\156\164\x5f\165\x70\144\141\x74\145\137\164\x68\145\x6d\x65\x73", ''); delete_transient($this->product_base . "\137\x75\160"); } public function updateMessageCB($data, $response) { if (is_array($data)) { $data = (object) $data; } if (isset($data->package) && empty($data->package)) { if (empty($data->update_denied_type)) { print "\x3c\x62\162\x2f\76\74\163\160\141\x6e\40\x73\164\x79\x6c\145\x3d\x27\x64\151\x73\160\154\141\171\x3a\40\x62\154\x6f\x63\153\73\x20\142\x6f\x72\x64\x65\162\x2d\164\157\160\72\40\x31\160\x78\x20\x73\157\154\151\144\40\x23\143\143\143\x3b\160\x61\144\x64\x69\156\147\55\x74\x6f\160\x3a\x20\x35\x70\170\x3b\x20\155\141\x72\147\151\156\x2d\164\157\160\x3a\x20\61\60\x70\x78\73\x27\x3e\x50\154\x65\141\x73\x65\40\x3c\x73\x74\162\x6f\156\147\x3e\x61\143\164\x69\166\x65\40\x70\x72\x6f\x64\x75\x63\164\x3c\x2f\163\164\162\157\156\x67\x3e\40\157\x72\40\x20\74\x73\x74\x72\157\x6e\147\x3e\x72\145\x6e\x65\167\x20\x73\165\x70\160\x6f\162\164\x20\160\x65\162\x69\x6f\144\74\57\163\x74\162\157\156\x67\76\40\164\157\x20\x67\145\x74\x20\x6c\x61\164\x65\163\x74\40\166\145\x72\163\x69\157\x6e\74\x2f\x73\160\x61\x6e\x3e"; } elseif ($data->update_denied_type == "\114") { print "\x3c\x62\x72\57\x3e\74\x73\160\141\x6e\40\163\164\171\154\145\75\x27\x64\151\163\x70\x6c\x61\171\72\40\x62\x6c\x6f\x63\153\73\x20\142\157\x72\144\x65\x72\x2d\164\157\x70\72\40\61\160\x78\x20\163\x6f\154\151\x64\40\43\x63\143\143\x3b\160\x61\x64\x64\151\156\147\x2d\x74\x6f\x70\72\x20\65\x70\x78\x3b\40\x6d\141\x72\x67\x69\156\x2d\x74\157\160\72\40\x31\x30\160\x78\73\47\76\x50\154\x65\141\163\145\40\74\163\164\162\157\x6e\x67\x3e\141\143\x74\151\166\x65\40\160\162\157\x64\x75\x63\x74\74\57\x73\164\x72\157\156\147\76\40\x74\157\40\147\x65\x74\x20\154\141\x74\x65\x73\164\x20\166\x65\x72\163\151\x6f\156\x3c\x2f\x73\x70\141\156\x3e"; } elseif ($data->update_denied_type == "\123") { print "\x3c\142\162\57\x3e\x3c\163\160\x61\x6e\x20\163\164\x79\x6c\x65\x3d\x27\x64\151\x73\160\x6c\x61\171\72\40\142\154\x6f\143\x6b\73\40\142\157\162\144\145\162\55\x74\x6f\160\72\x20\61\160\170\x20\x73\x6f\154\x69\144\40\x23\143\143\143\73\x70\141\x64\144\151\156\147\55\x74\x6f\160\72\x20\x35\x70\170\x3b\x20\155\x61\x72\x67\151\156\55\164\x6f\x70\72\40\x31\x30\x70\170\73\47\x3e\x50\154\145\x61\x73\x65\40\74\x73\x74\162\x6f\156\x67\x3e\162\x65\x6e\145\x77\40\163\x75\160\160\157\x72\164\40\160\145\162\151\x6f\144\x3c\x2f\163\164\x72\157\156\x67\76\x20\164\157\x20\x67\145\164\40\x6c\x61\x74\x65\163\x74\40\166\145\x72\163\x69\157\x6e\x3c\x2f\x73\160\x61\x6e\x3e"; } } } function __plugin_updateInfo() { if (function_exists("\x77\160\x5f\162\x65\155\157\164\145\x5f\x67\x65\164")) { $response = get_transient($this->product_base . "\137\x75\160"); $oldFound = false; if (!empty($response["\x64\141\164\x61"])) { $response = unserialize($this->decrypt($response["\144\x61\164\x61"])); if (is_array($response)) { $oldFound = true; } } if (!$oldFound) { $licenseInfo = self::GetRegisterInfo(); $url = $this->server_host . "\x70\x72\157\144\165\x63\x74\x2f\x75\x70\x64\x61\164\145\57" . $this->product_id; if (!empty($licenseInfo->license_key)) { $url .= "\x2f" . $licenseInfo->license_key . "\x2f" . $this->version; } $args = array("\x73\163\154\166\x65\x72\x69\146\x79" => true, "\x74\x69\x6d\x65\157\165\164" => 120, "\162\145\144\151\162\x65\143\x74\x69\x6f\x6e" => 5, "\x63\157\x6f\153\151\145\163" => array()); $response = wp_remote_get($url, $args); if (is_wp_error($response)) { $args["\163\x73\x6c\x76\145\x72\x69\146\x79"] = false; $response = wp_remote_get($url, $args); } } if (!is_wp_error($response)) { $body = $response["\142\157\x64\171"]; $responseJson = @json_decode($body); if (!$oldFound) { set_transient($this->product_base . "\x5f\165\x70", array("\x64\x61\x74\x61" => $this->encrypt(serialize(array("\x62\x6f\x64\171" => $body)))), DAY_IN_SECONDS); } if (!(is_object($responseJson) && isset($responseJson->status)) && $this->isEncryptUpdate) { $body = $this->decrypt($body, $this->key); $responseJson = json_decode($body); } if (is_object($responseJson) && !empty($responseJson->status) && !empty($responseJson->data->new_version)) { $responseJson->data->slug = plugin_basename($this->pluginFile); $responseJson->data->new_version = !empty($responseJson->data->new_version) ? $responseJson->data->new_version : ''; $responseJson->data->url = !empty($responseJson->data->url) ? $responseJson->data->url : ''; $responseJson->data->package = !empty($responseJson->data->download_link) ? $responseJson->data->download_link : ''; $responseJson->data->update_denied_type = !empty($responseJson->data->update_denied_type) ? $responseJson->data->update_denied_type : ''; $responseJson->data->sections = (array) $responseJson->data->sections; $responseJson->data->plugin = plugin_basename($this->pluginFile); $responseJson->data->icons = (array) $responseJson->data->icons; $responseJson->data->banners = (array) $responseJson->data->banners; $responseJson->data->banners_rtl = (array) $responseJson->data->banners_rtl; unset($responseJson->data->IsStoppedUpdate); return $responseJson->data; } } } return null; } function PluginUpdate($transient) { $response = $this->__plugin_updateInfo(); if (!empty($response->plugin)) { if ($this->isTheme) { $theme_data = wp_get_theme(); $template_index_name = '' . $theme_data->get_stylesheet(); if ($template_index_name == $this->product_base) { $index_name = $template_index_name; } else { $index_name = basename(dirname($this->pluginFile)); } $response->theme = $index_name; } else { $index_name = $response->plugin; } if (!empty($response) && version_compare($this->version, $response->new_version, "\x3c")) { unset($response->download_link); unset($response->IsStoppedUpdate); if ($this->isTheme) { $transient->response[$index_name] = (array) $response; } else { $transient->response[$index_name] = (object) $response; } } else { if (isset($transient->response[$index_name])) { unset($transient->response[$index_name]); } } } return $transient; } final function checkUpdateInfo($false, $action, $arg) { if (empty($arg->slug)) { return $false; } if ($this->isTheme) { if (!empty($arg->slug) && $arg->slug === $this->product_base) { $response = $this->__plugin_updateInfo(); if (!empty($response)) { return $response; } } } else { if (!empty($arg->slug) && $arg->slug === plugin_basename($this->pluginFile)) { $response = $this->__plugin_updateInfo(); if (!empty($response)) { return $response; } } } return $false; } static function &getInstance($plugin_base_file = null) { if (empty(self::$selfobj)) { if (!empty($plugin_base_file)) { self::$selfobj = new self($plugin_base_file); } } return self::$selfobj; } static function getRenewLink($responseObj, $type = "\x73") { if (empty($responseObj->renew_link)) { return ''; } $isShowButton = false; if ($type == "\163") { $support_str = strtolower(trim($responseObj->support_end)); if (strtolower(trim($responseObj->support_end)) == "\156\157\40\x73\x75\x70\160\x6f\162\x74") { $isShowButton = true; } elseif (!in_array($support_str, array("\x75\156\154\151\x6d\151\164\145\x64"))) { if (strtotime("\x41\x44\x44\40\x33\60\40\104\x41\x59\x53", strtotime($responseObj->support_end)) < time()) { $isShowButton = true; } } if ($isShowButton) { return $responseObj->renew_link . (strpos($responseObj->renew_link, "\77") === FALSE ? "\x3f\x74\171\160\x65\75\163\46\x6c\151\x63\x3d" . rawurlencode($responseObj->license_key) : "\46\x74\x79\160\145\x3d\163\x26\x6c\151\x63\75" . rawurlencode($responseObj->license_key)); } return ''; } else { $isShowButton = false; $expire_str = strtolower(trim($responseObj->expire_date)); if (!in_array($expire_str, array("\165\156\x6c\151\x6d\151\x74\145\144", "\x6e\157\x20\145\x78\160\151\x72\x79"))) { if (strtotime("\101\104\104\40\63\x30\x20\x44\x41\x59\123", strtotime($responseObj->expire_date)) < time()) { $isShowButton = true; } } if ($isShowButton) { return $responseObj->renew_link . (strpos($responseObj->renew_link, "\x3f") === FALSE ? "\77\164\171\160\145\75\x6c\x26\154\151\x63\x3d" . rawurlencode($responseObj->license_key) : "\46\164\171\x70\x65\75\x6c\x26\x6c\151\143\x3d" . rawurlencode($responseObj->license_key)); } return ''; } } private function encrypt($plainText, $password = '') { if (empty($password)) { $password = $this->key; } $plainText = rand(10, 99) . $plainText . rand(10, 99); $method = "\141\x65\163\55\x32\x35\66\x2d\x63\x62\143"; $key = substr(hash("\163\x68\x61\62\x35\x36", $password, true), 0, 32); $iv = substr(strtoupper(md5($password)), 0, 16); return base64_encode(openssl_encrypt($plainText, $method, $key, OPENSSL_RAW_DATA, $iv)); } private function decrypt($encrypted, $password = '') { if (empty($password)) { $password = $this->key; } $method = "\141\x65\x73\55\62\x35\x36\x2d\143\x62\x63"; $key = substr(hash("\x73\x68\x61\x32\65\x36", $password, true), 0, 32); $iv = substr(strtoupper(md5($password)), 0, 16); $plaintext = openssl_decrypt(base64_decode($encrypted), $method, $key, OPENSSL_RAW_DATA, $iv); return substr($plaintext, 2, -2); } function encryptObj($obj) { $text = serialize($obj); return $this->encrypt($text); } private function decryptObj($ciphertext) { $text = $this->decrypt($ciphertext); return unserialize($text); } private function getDomain() { if (function_exists("\x73\151\164\145\137\165\162\154")) { return site_url(); } if (defined("\127\120\x49\x4e\x43") && function_exists("\x67\x65\164\137\x62\x6c\157\147\151\x6e\146\x6f")) { return get_bloginfo("\x75\x72\154"); } else { $base_url = isset($_SERVER["\110\x54\124\x50\123"]) && $_SERVER["\110\124\x54\120\123"] == "\x6f\156" ? "\150\164\x74\x70\x73" : "\x68\x74\x74\160"; $base_url .= "\72\x2f\x2f" . $_SERVER["\x48\x54\124\x50\137\x48\117\x53\124"]; $base_url .= str_replace(basename($_SERVER["\x53\103\x52\x49\x50\124\x5f\x4e\101\x4d\105"]), '', $_SERVER["\123\x43\x52\111\x50\x54\137\x4e\x41\115\x45"]); return $base_url; } } private function getEmail() { return $this->emailAddress; } private function processs_response($response) { $resbk = ''; if (!empty($response)) { if (!empty($this->key)) { $resbk = $response; $response = $this->decrypt($response); } $response = json_decode($response); if (is_object($response)) { return $response; } else { $response = new stdClass(); $response->status = false; $response->msg = "\122\145\x73\x70\157\156\x73\x65\40\105\162\162\x6f\162\x2c\x20\x63\157\156\164\x61\x63\164\40\x77\x69\164\150\x20\x74\150\x65\x20\141\165\164\150\157\162\40\157\x72\40\x75\x70\x64\141\x74\x65\x20\x74\x68\145\40\160\x6c\165\x67\151\x6e\x20\157\162\x20\164\150\x65\x6d\145"; if (!empty($bkjson)) { $bkjson = @json_decode($resbk); if (!empty($bkjson->msg)) { $response->msg = $bkjson->msg; } } $response->data = NULL; return $response; } } $response = new stdClass(); $response->msg = "\165\156\153\156\x6f\x77\x6e\40\162\x65\x73\160\x6f\x6e\163\145"; $response->status = false; $response->data = NULL; return $response; } private function _request($relative_url, $data, &$error = '') { $response = new stdClass(); $response->status = false; $response->msg = "\x45\x6d\160\164\171\40\x52\145\163\x70\157\156\163\x65"; $response->is_request_error = false; $finalData = json_encode($data); if (!empty($this->key)) { $finalData = $this->encrypt($finalData); } $url = rtrim($this->server_host, "\x2f") . "\57" . ltrim($relative_url, "\57"); if (function_exists("\167\160\137\162\x65\155\x6f\164\145\137\x70\x6f\163\164")) { $rq_params = array("\x6d\x65\x74\x68\157\144" => "\120\117\x53\x54", "\163\163\154\x76\145\162\x69\146\x79" => true, "\164\x69\155\x65\x6f\165\164" => 120, "\x72\x65\144\151\162\145\x63\x74\151\x6f\x6e" => 5, "\150\x74\x74\160\x76\145\162\163\x69\157\x6e" => "\61\x2e\60", "\x62\x6c\x6f\x63\153\151\x6e\x67" => true, "\x68\x65\x61\144\145\162\x73" => array(), "\142\157\x64\171" => $finalData, "\143\x6f\x6f\153\x69\145\163" => array()); $serverResponse = wp_remote_post($url, $rq_params); if (is_wp_error($serverResponse)) { $rq_params["\163\163\154\166\145\x72\x69\146\171"] = false; $serverResponse = wp_remote_post($url, $rq_params); if (is_wp_error($serverResponse)) { $response->msg = $serverResponse->get_error_message(); $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } else { if (!empty($serverResponse["\x62\x6f\x64\x79"]) && (is_array($serverResponse) && 200 === (int) wp_remote_retrieve_response_code($serverResponse)) && $serverResponse["\142\157\x64\x79"] != "\107\x45\x54\64\x30\64") { return $this->processs_response($serverResponse["\142\157\x64\x79"]); } } } else { if (!empty($serverResponse["\x62\x6f\x64\171"]) && (is_array($serverResponse) && 200 === (int) wp_remote_retrieve_response_code($serverResponse)) && $serverResponse["\142\x6f\144\171"] != "\107\105\124\x34\x30\64") { return $this->processs_response($serverResponse["\142\157\x64\171"]); } } } if (!extension_loaded("\x63\x75\x72\x6c")) { $response->msg = "\103\165\162\154\40\x65\x78\x74\x65\156\163\151\x6f\x6e\40\x69\163\40\x6d\x69\x73\163\x69\156\147"; $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } $curlParams = array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, CURLOPT_SSL_VERIFYPEER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 120, CURLOPT_CUSTOMREQUEST => "\120\x4f\123\124", CURLOPT_POSTFIELDS => $finalData, CURLOPT_HTTPHEADER => array("\x43\157\156\x74\145\156\164\55\124\x79\160\x65\x3a\40\164\145\170\x74\x2f\x70\x6c\141\x69\156", "\143\141\x63\x68\145\x2d\143\x6f\156\164\x72\157\x6c\x3a\40\156\157\55\143\141\143\150\x65")); $curl = curl_init(); curl_setopt_array($curl, $curlParams); $serverResponse = curl_exec($curl); $curlErrorNo = curl_errno($curl); $error = curl_error($curl); curl_close($curl); if (!$curlErrorNo) { if (!empty($serverResponse)) { return $this->processs_response($serverResponse); } } else { $curl = curl_init(); $curlParams[CURLOPT_SSL_VERIFYPEER] = false; $curlParams[CURLOPT_SSL_VERIFYHOST] = false; curl_setopt_array($curl, $curlParams); $serverResponse = curl_exec($curl); $curlErrorNo = curl_errno($curl); $error = curl_error($curl); curl_close($curl); if (!$curlErrorNo) { if (!empty($serverResponse)) { return $this->processs_response($serverResponse); } } else { $response->msg = $error; $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } } $response->msg = "\x75\x6e\153\x6e\157\x77\156\x20\x72\145\x73\x70\x6f\x6e\x73\x65"; $response->status = false; $response->data = NULL; $response->is_request_error = true; return $response; } private function getParam($purchase_key, $app_version, $admin_email = '') { $req = new stdClass(); $req->license_key = $purchase_key; $req->email = !empty($admin_email) ? $admin_email : $this->getEmail(); $req->domain = $this->getDomain(); $req->app_version = $app_version; $req->product_id = $this->product_id; $req->product_base = $this->product_base; return $req; } private function getKeyName() { return hash("\143\x72\143\x33\x32\142", $this->getDomain() . $this->pluginFile . $this->product_id . $this->product_base . $this->key . "\x4c\x49\x43"); } private function SaveWPResponse($response) { $key = $this->getKeyName(); $data = $this->encrypt(serialize($response), $this->getDomain()); update_option($key, $data) or add_option($key, $data); } private function getOldWPResponse() { $key = $this->getKeyName(); $response = get_option($key, NULL); if (empty($response)) { return NULL; } return unserialize($this->decrypt($response, $this->getDomain())); } private function removeOldWPResponse() { $key = $this->getKeyName(); $isDeleted = delete_option($key); foreach (self::$_onDeleteLicense as $func) { if (is_callable($func)) { call_user_func($func); } } return $isDeleted; } public static function RemoveLicenseKey($plugin_base_file, &$message = '') { $obj = self::getInstance($plugin_base_file); $obj->cleanUpdateInfo(); return $obj->_removeWPPluginLicense($message); } public static function CheckWPPlugin($purchase_key, $email, &$error = '', &$responseObj = null, $plugin_base_file = '') { $obj = self::getInstance($plugin_base_file); $obj->setEmailAddress($email); return $obj->_CheckWPPlugin($purchase_key, $error, $responseObj); } final function _removeWPPluginLicense(&$message = '') { $oldRespons = $this->getOldWPResponse(); if (!empty($oldRespons->is_valid)) { if (!empty($oldRespons->license_key)) { $param = $this->getParam($oldRespons->license_key, $this->version); $response = $this->_request("\x70\162\x6f\144\165\x63\x74\x2f\x64\x65\141\143\164\x69\x76\x65\x2f" . $this->product_id, $param, $message); if (empty($response->code)) { if (!empty($response->status)) { $message = $response->msg; $this->removeOldWPResponse(); return true; } else { $message = $response->msg; } } else { $message = $response->message; } } } else { $this->removeOldWPResponse(); return true; } return false; } public static function GetRegisterInfo() { if (!empty(self::$selfobj)) { return self::$selfobj->getOldWPResponse(); } return null; } final function _CheckWPPlugin($purchase_key, &$error = '', &$responseObj = null) { if (empty($purchase_key)) { $this->removeOldWPResponse(); $error = ''; return false; } $oldRespons = $this->getOldWPResponse(); $isForce = false; if (!empty($oldRespons)) { if (!empty($oldRespons->expire_date) && strtolower($oldRespons->expire_date) != "\x6e\x6f\x20\145\170\x70\151\x72\171" && strtotime($oldRespons->expire_date) < time()) { $isForce = true; } if (!$isForce && !empty($oldRespons->is_valid) && $oldRespons->next_request > time() && (!empty($oldRespons->license_key) && $purchase_key == $oldRespons->license_key)) { $responseObj = clone $oldRespons; unset($responseObj->next_request); return true; } } $param = $this->getParam($purchase_key, $this->version); $response = $this->_request("\160\162\x6f\x64\x75\x63\x74\x2f\141\x63\x74\151\x76\x65\x2f" . $this->product_id, $param, $error); if (empty($response->is_request_error)) { if (empty($response->code)) { if (!empty($response->status)) { if (!empty($response->data)) { $serialObj = $this->decrypt($response->data, $param->domain); $licenseObj = unserialize($serialObj); if ($licenseObj->is_valid) { $responseObj = new stdClass(); $responseObj->is_valid = $licenseObj->is_valid; if ($licenseObj->request_duration > 0) { $responseObj->next_request = strtotime("\x2b\x20{$licenseObj->request_duration}\40\150\157\x75\162"); } else { $responseObj->next_request = time(); } $responseObj->expire_date = $licenseObj->expire_date; $responseObj->support_end = $licenseObj->support_end; $responseObj->license_title = $licenseObj->license_title; $responseObj->license_key = $purchase_key; $responseObj->msg = $response->msg; $responseObj->renew_link = !empty($licenseObj->renew_link) ? $licenseObj->renew_link : ''; $responseObj->expire_renew_link = self::getRenewLink($responseObj, "\x6c"); $responseObj->support_renew_link = self::getRenewLink($responseObj, "\163"); $this->SaveWPResponse($responseObj); unset($responseObj->next_request); delete_transient($this->product_base . "\137\165\160"); return true; } else { if ($this->__checkoldtied($oldRespons, $responseObj, $response)) { return true; } else { $this->removeOldWPResponse(); $error = !empty($response->msg) ? $response->msg : ''; } } } else { $error = "\111\x6e\166\141\154\151\x64\40\144\x61\x74\x61"; } } else { $error = $response->msg; } } else { $error = $response->message; } } else { if ($this->__checkoldtied($oldRespons, $responseObj, $response)) { return true; } else { $this->removeOldWPResponse(); $error = !empty($response->msg) ? $response->msg : ''; } } return $this->__checkoldtied($oldRespons, $responseObj); } private function __checkoldtied(&$oldRespons, &$responseObj) { if (!empty($oldRespons) && (empty($oldRespons->tried) || $oldRespons->tried <= 2)) { $oldRespons->next_request = strtotime("\x2b\x20\x31\x20\x68\x6f\165\162"); $oldRespons->tried = empty($oldRespons->tried) ? 1 : $oldRespons->tried + 1; $responseObj = clone $oldRespons; unset($responseObj->next_request); if (isset($responseObj->tried)) { unset($responseObj->tried); } $this->SaveWPResponse($oldRespons); return true; } return false; } } }

Function Calls

class_exists 1

Variables

None

Stats

MD5 b4fc501a1aa6d2de0d406b10a0e1ef91
Eval Count 0
Decode Time 173 ms