Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.9.0
- * @ Author : DeZender
- * @ Release on : 08.08.2019
- * @ Official site : http://DeZender.Net
- *
- */
- final class zhUpClient_check
- {
- static private $error_message = false;
- static private $updated_plugin_list = false;
- static private $updated_theme_list = false;
- static private $parent_id;
- static private $item;
- static private $up_version;
- static private $backup_list = false;
- static private $restore_log = false;
- static private $restore_backup = false;
- static public $version = '1.0.6';
- static public $last_key = PHP_INT_MAX;
- static private $_transient_update_plugins = false;
- static private $_transient_update_plugins_correct = false;
- static private $_transient_update_theme = false;
- static private $_transient_update_theme_correct = false;
- static public $site_transient_update_plugins_callbacks = false;
- static protected $_instance;
- public $program;
- static public function instance()
- {
- if (!is_null(self::$_instance)) {
- goto label11;
- }
- self::$_instance = new self();
- label11:
- return self::$_instance;
- }
- public function __construct()
- {
- $O33092992845326204715191041092 = PHP_INT_MAX;
- add_action('plugins_loaded', [$this, 'init'], $O33092992845326204715191041092);
- add_action('after_plugin_row', [$this, 'after_plugin_row'], 1, 1);
- add_filter('auto_update_plugin', [__CLASS__, 'zhaket_auto_updater'], 10, 2);
- add_action('ZhUpClient_update_checker', [__CLASS__, 'get_json_list'], 10);
- add_action('ZhUpClient_update_agent', [__CLASS__, 'get_public_notif_list'], 20);
- add_action('ZhUpClient_update_agent', ['Admin_Notice', 'email_notice'], 40);
- add_action('ZhUpClient_update_agent', [__CLASS__, 'auto_update_zhaket_updater'], 60);
- }
- static public function auto_update_zhaket_updater()
- {
- $O62429008867562398584161077548 = 'zhaket-updater/zhaket-updater.php';
- $O81933296842068656462038835669 = get_option('deny_auto_update_' . $O62429008867562398584161077548, false);
- if (!$O81933296842068656462038835669) {
- goto label11;
- }
- return NULL;
- label11:
- $O44441027292296841110708635156 = false;
- $O80574945951474362719543839558 = self::checked_updated_plugin_list();
- if (!($O80574945951474362719543839558 && is_array($O80574945951474362719543839558) && isset($O80574945951474362719543839558[$O62429008867562398584161077548]))) {
- goto label35;
- }
- $O44441027292296841110708635156 = 0 < version_compare($O80574945951474362719543839558[$O62429008867562398584161077548]['ver'], self::$version);
- if ($O44441027292296841110708635156) {
- label35:
- goto label38;
- }
- return NULL;
- label38:
- $O25574247017602750026420247393 = '';
- ZhUpClient::add_log('background-update', 0, sprintf(__('Zhaket updater start auto updated from version %s to %s', 'zhaket-updater'), self::$version, $O80574945951474362719543839558[$O62429008867562398584161077548]['ver']), 0, $O62429008867562398584161077548);
- try {
- require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
- require_once ABSPATH . 'wp-admin/includes/misc.php';
- if (defined('FS_METHOD')) {
- goto label73;
- }
- define('FS_METHOD', 'direct');
- label73:
- require_once ABSPATH . 'wp-includes/update.php';
- require_once ABSPATH . 'wp-admin/includes/file.php';
- ob_start();
- $O14371142922145272253476315664 = new Plugin_Upgrader();
- $O92532549698179105435053096383 = $O14371142922145272253476315664->upgrade($O62429008867562398584161077548);
- $O25574247017602750026420247393 = @ob_get_contents();
- @ob_end_clean();
- }
- catch (Exception $O95551919299161348714839589047) {
- }
- ZhUpClient::add_log('background-update', 0, sprintf(__('Zhaket updater finished auto updated to version %s with status: %s', 'zhaket-updater') . ' | output result is: ' . $O25574247017602750026420247393, $O80574945951474362719543839558[$O62429008867562398584161077548]['ver'], $O92532549698179105435053096383 ? 'success' : 'failed'), 0, $O62429008867562398584161077548);
- }
- static private function define($O85194645858036156275345865132)
- {
- $O26538234756795693561684104389 = 'https://zhaket.com';
- switch ($O85194645858036156275345865132) {
- case 'ZhUpServer_version':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/update-version.txt';
- break;
- case 'ZhUpServer_product_url':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/post=';
- break;
- case 'ZhUpServer_update_list':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/products-update-info.json';
- break;
- case 'ZhUpServer_public_notifications':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/notification/client.php';
- break;
- case 'ZhUpClient_update_server':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/generate';
- break;
- case 'ZhUpClient_update_server_validator':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/validate';
- break;
- case 'ZhUpClient_product_info':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/info/?id=';
- break;
- case 'ZhUpClient_report_link':
- $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/report_link/?id=';
- break;
- default:
- $O85194645858036156275345865132 = $O26538234756795693561684104389;
- }
- return $O85194645858036156275345865132;
- }
- static public function init()
- {
- $O33092992845326204715191041092 = PHP_INT_MAX;
- add_filter('pre_set_site_transient_update_plugins', [__CLASS__, '_transient_update_plugins'], $O33092992845326204715191041092);
- add_filter('pre_set_site_transient_update_themes', [__CLASS__, '_transient_update_themes'], $O33092992845326204715191041092);
- add_filter('upgrader_package_options', [__CLASS__, 'change_download_address'], $O33092992845326204715191041092, 1);
- add_filter('upgrader_pre_download', [__CLASS__, 'change_error_message'], $O33092992845326204715191041092, 3);
- if (!is_admin()) {
- goto label51;
- }
- add_filter('site_transient_update_plugins', [__CLASS__, 'site_transient_update_plugins'], $O33092992845326204715191041092);
- add_filter('site_transient_update_themes', [__CLASS__, 'site_transient_update_themes'], $O33092992845326204715191041092);
- add_filter('plugins_api', [__CLASS__, 'change_log_api_filter'], 10, 3);
- add_filter('plugin_action_links', [__CLASS__, 'plugin_action_links'], $O33092992845326204715191041092, 4);
- label51:
- add_action('zhupclient_pre_download', [__CLASS__, 'create_package_backup'], 10, 2);
- }
- static public function zhaket_auto_updater($O82121256342622311957084259124, $O83452352493515336470612737779)
- {
- if (!($O83452352493515336470612737779->slug === 'zhaket-updater/zhaket-updater.php')) {
- goto label8;
- }
- return true;
- label8:
- return $O82121256342622311957084259124;
- }
- static public function after_plugin_row($O28369484170737694958845198144)
- {
- $O24630090992422394408522885569 = self::checked_updated_plugin_list();
- $O52016652994456991672834590313 = ['gravityforms/gravityforms.php' => 'GFForms::plugin_row'];
- if (!(is_array($O24630090992422394408522885569) && count($O24630090992422394408522885569) && array_key_exists($O28369484170737694958845198144, $O24630090992422394408522885569))) {
- goto label99;
- }
- global $wp_filter;
- if (!(array_key_exists($O28369484170737694958845198144, $O52016652994456991672834590313) && isset($wp_filter[__FUNCTION__]->callbacks))) {
- goto label62;
- }
- foreach ((array) $wp_filter[__FUNCTION__]->callbacks as $O32458362516990950002527376266 => $O85991039055390890619503986213) {
- if (!(is_array($O85991039055390890619503986213) && array_key_exists($O52016652994456991672834590313['gravityforms/gravityforms.php'], $O85991039055390890619503986213))) {
- goto label60;
- }
- remove_action(__FUNCTION__, $O52016652994456991672834590313['gravityforms/gravityforms.php'], $O32458362516990950002527376266);
- label60:
- }
- label62:
- if (!(array_key_exists('after_plugin_row_' . $O28369484170737694958845198144, $wp_filter) && isset($wp_filter['after_plugin_row_' . $O28369484170737694958845198144]->callbacks))) {
- goto label99;
- }
- remove_all_actions('after_plugin_row_' . $O28369484170737694958845198144, false);
- remove_all_actions('in_plugin_update_message-' . $O28369484170737694958845198144, false);
- add_action('after_plugin_row_' . $O28369484170737694958845198144, 'wp_plugin_update_row', 10, 2);
- add_action('in_plugin_update_message-' . $O28369484170737694958845198144, [__CLASS__, 'add_zhaket_logo'], 1, 2);
- label99:
- }
- static public function add_zhaket_logo($O75588456750592754612910100525, $O88918225979043660757052652954)
- {
- echo sprintf('<span class=\'zhk-update-inline-message\'><img src=\'%sassets/images/apple-touch-icon.png\' width=\'25\' height=\'25\' title=\'%s\'></span>', ZhUpClient_plugin_url, __('Provide update by Zhaket', 'zhaket-updater'));
- }
- static public function checked_updated_plugin_list()
- {
- if (!(self::$updated_plugin_list !== false)) {
- goto label7;
- }
- return self::$updated_plugin_list;
- label7:
- $O53479618534699291036693956851 = get_plugins();
- $O24232936865906555497808434876 = maybe_unserialize(get_option('ZhUpClient_options', true));
- if (!(!isset($O24232936865906555497808434876['check-spacial-plugins']) || empty($O24232936865906555497808434876['check-spacial-plugins']))) {
- goto label28;
- }
- $O24232936865906555497808434876['check-spacial-plugins'] = [];
- label28:
- $O62346989731323924002269280619 = array_diff_key($O53479618534699291036693956851, $O24232936865906555497808434876['check-spacial-plugins']);
- if (!(is_array($O62346989731323924002269280619) && (0 < count($O62346989731323924002269280619)))) {
- goto label58;
- }
- foreach ($O62346989731323924002269280619 as $O05527498213073265078519017971 => $O52534378446357491733472957966) {
- $O24232936865906555497808434876['check-spacial-plugins'][$O05527498213073265078519017971] = '1';
- }
- update_option('ZhUpClient_options', $O24232936865906555497808434876);
- label58:
- $O42941526687057757939989323186 = maybe_unserialize(get_option('zhupclient_plugins'));
- if (!(isset($O24232936865906555497808434876) && isset($O24232936865906555497808434876['all-plugins']) && ($O24232936865906555497808434876['all-plugins'] !== '1') && isset($O24232936865906555497808434876['check-spacial-plugins']))) {
- goto label99;
- }
- foreach ((array) $O24232936865906555497808434876['check-spacial-plugins'] as $O32458362516990950002527376266 => $O19839635866431258237394518323) {
- if (!($O32458362516990950002527376266 === 'zhaket-updater/zhaket-updater.php')) {
- goto label91;
- }
- goto label97;
- label91:
- if (!($O19839635866431258237394518323 === '0')) {
- goto label97;
- }
- unset($O42941526687057757939989323186[$O32458362516990950002527376266]);
- label97:
- }
- label99:
- self::$updated_plugin_list = $O42941526687057757939989323186;
- return $O42941526687057757939989323186;
- }
- static public function checked_updated_theme_list()
- {
- if (!(self::$updated_theme_list !== false)) {
- goto label7;
- }
- return self::$updated_theme_list;
- label7:
- $O67802775285302561409413373362 = wp_get_themes();
- $O24232936865906555497808434876 = maybe_unserialize(get_option('ZhUpClient_options', true));
- if (!(!isset($O24232936865906555497808434876['check-spacial-themes']) || empty($O24232936865906555497808434876['check-spacial-themes']))) {
- goto label28;
- }
- $O24232936865906555497808434876['check-spacial-themes'] = [];
- label28:
- $O84354968712095705050394313382 = array_diff_key($O67802775285302561409413373362, $O24232936865906555497808434876['check-spacial-themes']);
- if (!(is_array($O84354968712095705050394313382) && (0 < count($O84354968712095705050394313382)))) {
- goto label58;
- }
- foreach ($O84354968712095705050394313382 as $O81702319745578159519031358757 => $O70292992517351498479803123681) {
- $O24232936865906555497808434876['check-spacial-themes'][$O81702319745578159519031358757] = '1';
- }
- update_option('ZhUpClient_options', $O24232936865906555497808434876);
- label58:
- $O31495757443794477126892528652 = maybe_unserialize(get_option('zhupclient_themes'));
- if (!(isset($O24232936865906555497808434876) && isset($O24232936865906555497808434876['all-themes']) && ($O24232936865906555497808434876['all-themes'] !== '1') && isset($O24232936865906555497808434876['check-spacial-themes']))) {
- goto label92;
- }
- foreach ((array) $O24232936865906555497808434876['check-spacial-themes'] as $O32458362516990950002527376266 => $O19839635866431258237394518323) {
- if (!($O19839635866431258237394518323 === '0')) {
- goto label90;
- }
- unset($O31495757443794477126892528652[$O32458362516990950002527376266]);
- label90:
- }
- label92:
- self::$updated_theme_list = $O31495757443794477126892528652;
- return $O31495757443794477126892528652;
- }
- static public function change_error_message($O02175938219123431890928753296, $O10152519605361204963934744669, $O14371142922145272253476315664)
- {
- if (!(self::$error_message !== false)) {
- goto label100;
- }
- $O81769834561925132526395938264 = '';
- if (array_key_exists(self::$item, self::checked_updated_plugin_list())) {
- goto label28;
- }
- if (array_key_exists(self::$item, self::checked_updated_theme_list())) {
- goto label34;
- }
- goto label39;
- label28:
- $O83967585323991503142980300066 = self::$updated_plugin_list[self::$item]['id'];
- goto label39;
- label34:
- $O83967585323991503142980300066 = self::$updated_theme_list[self::$item]['id'];
- label39:
- if (!((self::$error_message === 'error code:4') && isset($O83967585323991503142980300066))) {
- goto label67;
- }
- $O81769834561925132526395938264 = (isset($O83967585323991503142980300066) ? sprintf('%s<a class=\'button button-primary zhaket-buy-btn\' href=\'https://zhaket.com/?p=%s\' target=\'_blank\'>%s</a>', __('else buy form this link', 'zhaket-updater'), $O83967585323991503142980300066, __('buy this product', 'zhaket-updater')) : '');
- label67:
- if (!((self::$error_message === 'error code:6') && isset($O83967585323991503142980300066))) {
- goto label78;
- }
- self::report_link_problem($O83967585323991503142980300066);
- label78:
- $O02175938219123431890928753296 = new WP_Error('wslm_update_not_available', ZhUpClient::error_code(self::$error_message, self::$parent_id, self::$item, self::$up_version) . $O81769834561925132526395938264);
- $O14371142922145272253476315664->skin->set_result($O02175938219123431890928753296);
- self::$error_message = false;
- label100:
- return $O02175938219123431890928753296;
- }
- static public function report_link_problem($O83967585323991503142980300066)
- {
- $O02175938219123431890928753296 = wp_remote_get(self::define('ZhUpClient_report_link') . $O83967585323991503142980300066, ['timeout' => 60, 'sslverify' => false]);
- return true;
- }
- static public function change_log_api_filter($O97246170517647133552941276338, $O78998765617308256676387359882 = '', $O88255416803688178890246353912 = NULL)
- {
- $O01165005751986228090376209284 = self::checked_updated_plugin_list();
- if (isset($O88255416803688178890246353912->slug)) {
- goto label10;
- }
- return $O97246170517647133552941276338;
- label10:
- if (!array_key_exists($O88255416803688178890246353912->slug, $O01165005751986228090376209284)) {
- goto label78;
- }
- $O79867440354837697327141665095 = wp_remote_get(self::define('ZhUpClient_product_info') . $O01165005751986228090376209284[$O88255416803688178890246353912->slug]['id'], ['timeout' => 60, 'sslverify' => false]);
- if (!(!is_wp_error($O79867440354837697327141665095) || (wp_remote_retrieve_response_code($O79867440354837697327141665095) === 200))) {
- goto label78;
- }
- $O51712011235435026510958327644 = json_decode(wp_remote_retrieve_body($O79867440354837697327141665095));
- $O14887618967760855048495604353 = new stdClass();
- if (!isset($O51712011235435026510958327644->name)) {
- goto label74;
- }
- foreach ((array) $O51712011235435026510958327644 as $O32458362516990950002527376266 => $O83452352493515336470612737779) {
- if ($O83452352493515336470612737779 instanceof stdClass) {
- goto label69;
- }
- $O14887618967760855048495604353->{$O32458362516990950002527376266} = $O83452352493515336470612737779;
- goto label72;
- label69:
- $O14887618967760855048495604353->{$O32458362516990950002527376266} = (array) $O83452352493515336470612737779;
- label72:
- }
- label74:
- $O14887618967760855048495604353->slug = $O88255416803688178890246353912->slug;
- return $O14887618967760855048495604353;
- label78:
- return $O97246170517647133552941276338;
- }
- static public function prefix_plugin_update_message($O97246170517647133552941276338, $O88918225979043660757052652954)
- {
- }
- static public function show_update_notification($O93745834639046219340963437385, $O60183860457869502445127046925)
- {
- echo '<!-- <tr class="plugin-update-tr">-->' . "\r\n" . '<!-- <td class="plugin-update colspanchange" colspan="3">-->' . "\r\n" . '<!-- <div class="-->' . "\r\n" . '<!-- -->';
- echo '<!--">-->' . "\r\n" . '<!-- -->';
- echo '<!-- </div>-->' . "\r\n" . '<!-- </td>-->' . "\r\n" . '<!-- </tr>-->' . "\r\n" . '<!-- -->';
- }
- static public function create_package_backup($O26095425046862550038562419639, $O55422178269968831048014869673)
- {
- global $wp_theme_directories;
- $O47838258219960240771122560000 = (isset($O55422178269968831048014869673['hook_extra']) && isset($O55422178269968831048014869673['hook_extra']['plugin']) ? 'plugin' : 'theme');
- if ($O47838258219960240771122560000 === 'plugin') {
- goto label35;
- }
- $O84608197164703574734531923085 = realpath($wp_theme_directories[0] . '/' . $O26095425046862550038562419639);
- $O14225334179353112863562833809 = wp_get_theme($O26095425046862550038562419639)->Version;
- $O84608197164703574734531923085 = pathinfo($O84608197164703574734531923085 . '/index.php')['dirname'];
- goto label61;
- label35:
- $O84608197164703574734531923085 = WP_PLUGIN_DIR . '/' . $O26095425046862550038562419639;
- $O42941526687057757939989323186 = get_plugins();
- $O14225334179353112863562833809 = (array_key_exists($O26095425046862550038562419639, $O42941526687057757939989323186) ? $O42941526687057757939989323186[$O26095425046862550038562419639]['Version'] : '');
- $O84608197164703574734531923085 = pathinfo(realpath($O84608197164703574734531923085))['dirname'];
- label61:
- self::caj_create_backup($O84608197164703574734531923085, $O14225334179353112863562833809, $O26095425046862550038562419639, $O47838258219960240771122560000);
- }
- static public function caj_create_backup($O98882144410668275908332051775, $O14225334179353112863562833809, $O26095425046862550038562419639, $O47838258219960240771122560000)
- {
- require_once ABSPATH . 'wp-admin/includes/file.php';
- .......................................................................................
- ..............................................
- .........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement