Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.22 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. final class zhUpClient_check
  15. {
  16. static private $error_message = false;
  17. static private $updated_plugin_list = false;
  18. static private $updated_theme_list = false;
  19. static private $parent_id;
  20. static private $item;
  21. static private $up_version;
  22. static private $backup_list = false;
  23. static private $restore_log = false;
  24. static private $restore_backup = false;
  25. static public $version = '1.0.6';
  26. static public $last_key = PHP_INT_MAX;
  27. static private $_transient_update_plugins = false;
  28. static private $_transient_update_plugins_correct = false;
  29. static private $_transient_update_theme = false;
  30. static private $_transient_update_theme_correct = false;
  31. static public $site_transient_update_plugins_callbacks = false;
  32. static protected $_instance;
  33. public $program;
  34.  
  35. static public function instance()
  36. {
  37. if (!is_null(self::$_instance)) {
  38. goto label11;
  39. }
  40.  
  41. self::$_instance = new self();
  42.  
  43. label11:
  44.  
  45. return self::$_instance;
  46. }
  47.  
  48. public function __construct()
  49. {
  50. $O33092992845326204715191041092 = PHP_INT_MAX;
  51. add_action('plugins_loaded', [$this, 'init'], $O33092992845326204715191041092);
  52. add_action('after_plugin_row', [$this, 'after_plugin_row'], 1, 1);
  53. add_filter('auto_update_plugin', [__CLASS__, 'zhaket_auto_updater'], 10, 2);
  54. add_action('ZhUpClient_update_checker', [__CLASS__, 'get_json_list'], 10);
  55. add_action('ZhUpClient_update_agent', [__CLASS__, 'get_public_notif_list'], 20);
  56. add_action('ZhUpClient_update_agent', ['Admin_Notice', 'email_notice'], 40);
  57. add_action('ZhUpClient_update_agent', [__CLASS__, 'auto_update_zhaket_updater'], 60);
  58. }
  59.  
  60. static public function auto_update_zhaket_updater()
  61. {
  62. $O62429008867562398584161077548 = 'zhaket-updater/zhaket-updater.php';
  63. $O81933296842068656462038835669 = get_option('deny_auto_update_' . $O62429008867562398584161077548, false);
  64.  
  65. if (!$O81933296842068656462038835669) {
  66. goto label11;
  67. }
  68.  
  69. return NULL;
  70.  
  71. label11:
  72.  
  73. $O44441027292296841110708635156 = false;
  74. $O80574945951474362719543839558 = self::checked_updated_plugin_list();
  75. if (!($O80574945951474362719543839558 && is_array($O80574945951474362719543839558) && isset($O80574945951474362719543839558[$O62429008867562398584161077548]))) {
  76. goto label35;
  77. }
  78.  
  79. $O44441027292296841110708635156 = 0 < version_compare($O80574945951474362719543839558[$O62429008867562398584161077548]['ver'], self::$version);
  80.  
  81. if ($O44441027292296841110708635156) {
  82. label35:
  83.  
  84. goto label38;
  85. }
  86.  
  87. return NULL;
  88.  
  89. label38:
  90.  
  91. $O25574247017602750026420247393 = '';
  92. 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);
  93.  
  94. try {
  95. require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
  96. require_once ABSPATH . 'wp-admin/includes/misc.php';
  97.  
  98. if (defined('FS_METHOD')) {
  99. goto label73;
  100. }
  101.  
  102. define('FS_METHOD', 'direct');
  103.  
  104. label73:
  105.  
  106. require_once ABSPATH . 'wp-includes/update.php';
  107. require_once ABSPATH . 'wp-admin/includes/file.php';
  108. ob_start();
  109. $O14371142922145272253476315664 = new Plugin_Upgrader();
  110. $O92532549698179105435053096383 = $O14371142922145272253476315664->upgrade($O62429008867562398584161077548);
  111. $O25574247017602750026420247393 = @ob_get_contents();
  112. @ob_end_clean();
  113. }
  114. catch (Exception $O95551919299161348714839589047) {
  115. }
  116.  
  117. 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);
  118. }
  119.  
  120. static private function define($O85194645858036156275345865132)
  121. {
  122. $O26538234756795693561684104389 = 'https://zhaket.com';
  123.  
  124. switch ($O85194645858036156275345865132) {
  125. case 'ZhUpServer_version':
  126. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/update-version.txt';
  127. break;
  128. case 'ZhUpServer_product_url':
  129. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/post=';
  130. break;
  131. case 'ZhUpServer_update_list':
  132. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/products-update-info.json';
  133. break;
  134. case 'ZhUpServer_public_notifications':
  135. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/notification/client.php';
  136. break;
  137. case 'ZhUpClient_update_server':
  138. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/generate';
  139. break;
  140. case 'ZhUpClient_update_server_validator':
  141. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/validate';
  142. break;
  143. case 'ZhUpClient_product_info':
  144. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/info/?id=';
  145. break;
  146. case 'ZhUpClient_report_link':
  147. $O85194645858036156275345865132 = $O26538234756795693561684104389 . '/zhk-api/report_link/?id=';
  148. break;
  149. default:
  150. $O85194645858036156275345865132 = $O26538234756795693561684104389;
  151. }
  152.  
  153. return $O85194645858036156275345865132;
  154. }
  155.  
  156. static public function init()
  157. {
  158. $O33092992845326204715191041092 = PHP_INT_MAX;
  159. add_filter('pre_set_site_transient_update_plugins', [__CLASS__, '_transient_update_plugins'], $O33092992845326204715191041092);
  160. add_filter('pre_set_site_transient_update_themes', [__CLASS__, '_transient_update_themes'], $O33092992845326204715191041092);
  161. add_filter('upgrader_package_options', [__CLASS__, 'change_download_address'], $O33092992845326204715191041092, 1);
  162. add_filter('upgrader_pre_download', [__CLASS__, 'change_error_message'], $O33092992845326204715191041092, 3);
  163.  
  164. if (!is_admin()) {
  165. goto label51;
  166. }
  167.  
  168. add_filter('site_transient_update_plugins', [__CLASS__, 'site_transient_update_plugins'], $O33092992845326204715191041092);
  169. add_filter('site_transient_update_themes', [__CLASS__, 'site_transient_update_themes'], $O33092992845326204715191041092);
  170. add_filter('plugins_api', [__CLASS__, 'change_log_api_filter'], 10, 3);
  171. add_filter('plugin_action_links', [__CLASS__, 'plugin_action_links'], $O33092992845326204715191041092, 4);
  172.  
  173. label51:
  174.  
  175. add_action('zhupclient_pre_download', [__CLASS__, 'create_package_backup'], 10, 2);
  176. }
  177.  
  178. static public function zhaket_auto_updater($O82121256342622311957084259124, $O83452352493515336470612737779)
  179. {
  180. if (!($O83452352493515336470612737779->slug === 'zhaket-updater/zhaket-updater.php')) {
  181. goto label8;
  182. }
  183.  
  184. return true;
  185.  
  186. label8:
  187.  
  188. return $O82121256342622311957084259124;
  189. }
  190.  
  191. static public function after_plugin_row($O28369484170737694958845198144)
  192. {
  193. $O24630090992422394408522885569 = self::checked_updated_plugin_list();
  194. $O52016652994456991672834590313 = ['gravityforms/gravityforms.php' => 'GFForms::plugin_row'];
  195. if (!(is_array($O24630090992422394408522885569) && count($O24630090992422394408522885569) && array_key_exists($O28369484170737694958845198144, $O24630090992422394408522885569))) {
  196. goto label99;
  197. }
  198.  
  199. global $wp_filter;
  200. if (!(array_key_exists($O28369484170737694958845198144, $O52016652994456991672834590313) && isset($wp_filter[__FUNCTION__]->callbacks))) {
  201. goto label62;
  202. }
  203.  
  204. foreach ((array) $wp_filter[__FUNCTION__]->callbacks as $O32458362516990950002527376266 => $O85991039055390890619503986213) {
  205. if (!(is_array($O85991039055390890619503986213) && array_key_exists($O52016652994456991672834590313['gravityforms/gravityforms.php'], $O85991039055390890619503986213))) {
  206. goto label60;
  207. }
  208.  
  209. remove_action(__FUNCTION__, $O52016652994456991672834590313['gravityforms/gravityforms.php'], $O32458362516990950002527376266);
  210.  
  211. label60:
  212. }
  213.  
  214. label62:
  215. if (!(array_key_exists('after_plugin_row_' . $O28369484170737694958845198144, $wp_filter) && isset($wp_filter['after_plugin_row_' . $O28369484170737694958845198144]->callbacks))) {
  216. goto label99;
  217. }
  218.  
  219. remove_all_actions('after_plugin_row_' . $O28369484170737694958845198144, false);
  220. remove_all_actions('in_plugin_update_message-' . $O28369484170737694958845198144, false);
  221. add_action('after_plugin_row_' . $O28369484170737694958845198144, 'wp_plugin_update_row', 10, 2);
  222. add_action('in_plugin_update_message-' . $O28369484170737694958845198144, [__CLASS__, 'add_zhaket_logo'], 1, 2);
  223.  
  224. label99:
  225. }
  226.  
  227. static public function add_zhaket_logo($O75588456750592754612910100525, $O88918225979043660757052652954)
  228. {
  229. 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'));
  230. }
  231.  
  232. static public function checked_updated_plugin_list()
  233. {
  234. if (!(self::$updated_plugin_list !== false)) {
  235. goto label7;
  236. }
  237.  
  238. return self::$updated_plugin_list;
  239.  
  240. label7:
  241.  
  242. $O53479618534699291036693956851 = get_plugins();
  243. $O24232936865906555497808434876 = maybe_unserialize(get_option('ZhUpClient_options', true));
  244. if (!(!isset($O24232936865906555497808434876['check-spacial-plugins']) || empty($O24232936865906555497808434876['check-spacial-plugins']))) {
  245. goto label28;
  246. }
  247.  
  248. $O24232936865906555497808434876['check-spacial-plugins'] = [];
  249.  
  250. label28:
  251.  
  252. $O62346989731323924002269280619 = array_diff_key($O53479618534699291036693956851, $O24232936865906555497808434876['check-spacial-plugins']);
  253. if (!(is_array($O62346989731323924002269280619) && (0 < count($O62346989731323924002269280619)))) {
  254. goto label58;
  255. }
  256.  
  257. foreach ($O62346989731323924002269280619 as $O05527498213073265078519017971 => $O52534378446357491733472957966) {
  258. $O24232936865906555497808434876['check-spacial-plugins'][$O05527498213073265078519017971] = '1';
  259. }
  260.  
  261. update_option('ZhUpClient_options', $O24232936865906555497808434876);
  262.  
  263. label58:
  264.  
  265. $O42941526687057757939989323186 = maybe_unserialize(get_option('zhupclient_plugins'));
  266. if (!(isset($O24232936865906555497808434876) && isset($O24232936865906555497808434876['all-plugins']) && ($O24232936865906555497808434876['all-plugins'] !== '1') && isset($O24232936865906555497808434876['check-spacial-plugins']))) {
  267. goto label99;
  268. }
  269.  
  270. foreach ((array) $O24232936865906555497808434876['check-spacial-plugins'] as $O32458362516990950002527376266 => $O19839635866431258237394518323) {
  271. if (!($O32458362516990950002527376266 === 'zhaket-updater/zhaket-updater.php')) {
  272. goto label91;
  273. }
  274.  
  275. goto label97;
  276.  
  277. label91:
  278.  
  279. if (!($O19839635866431258237394518323 === '0')) {
  280. goto label97;
  281. }
  282.  
  283. unset($O42941526687057757939989323186[$O32458362516990950002527376266]);
  284.  
  285. label97:
  286. }
  287.  
  288. label99:
  289.  
  290. self::$updated_plugin_list = $O42941526687057757939989323186;
  291. return $O42941526687057757939989323186;
  292. }
  293.  
  294. static public function checked_updated_theme_list()
  295. {
  296. if (!(self::$updated_theme_list !== false)) {
  297. goto label7;
  298. }
  299.  
  300. return self::$updated_theme_list;
  301.  
  302. label7:
  303.  
  304. $O67802775285302561409413373362 = wp_get_themes();
  305. $O24232936865906555497808434876 = maybe_unserialize(get_option('ZhUpClient_options', true));
  306. if (!(!isset($O24232936865906555497808434876['check-spacial-themes']) || empty($O24232936865906555497808434876['check-spacial-themes']))) {
  307. goto label28;
  308. }
  309.  
  310. $O24232936865906555497808434876['check-spacial-themes'] = [];
  311.  
  312. label28:
  313.  
  314. $O84354968712095705050394313382 = array_diff_key($O67802775285302561409413373362, $O24232936865906555497808434876['check-spacial-themes']);
  315. if (!(is_array($O84354968712095705050394313382) && (0 < count($O84354968712095705050394313382)))) {
  316. goto label58;
  317. }
  318.  
  319. foreach ($O84354968712095705050394313382 as $O81702319745578159519031358757 => $O70292992517351498479803123681) {
  320. $O24232936865906555497808434876['check-spacial-themes'][$O81702319745578159519031358757] = '1';
  321. }
  322.  
  323. update_option('ZhUpClient_options', $O24232936865906555497808434876);
  324.  
  325. label58:
  326.  
  327. $O31495757443794477126892528652 = maybe_unserialize(get_option('zhupclient_themes'));
  328. if (!(isset($O24232936865906555497808434876) && isset($O24232936865906555497808434876['all-themes']) && ($O24232936865906555497808434876['all-themes'] !== '1') && isset($O24232936865906555497808434876['check-spacial-themes']))) {
  329. goto label92;
  330. }
  331.  
  332. foreach ((array) $O24232936865906555497808434876['check-spacial-themes'] as $O32458362516990950002527376266 => $O19839635866431258237394518323) {
  333. if (!($O19839635866431258237394518323 === '0')) {
  334. goto label90;
  335. }
  336.  
  337. unset($O31495757443794477126892528652[$O32458362516990950002527376266]);
  338.  
  339. label90:
  340. }
  341.  
  342. label92:
  343.  
  344. self::$updated_theme_list = $O31495757443794477126892528652;
  345. return $O31495757443794477126892528652;
  346. }
  347.  
  348. static public function change_error_message($O02175938219123431890928753296, $O10152519605361204963934744669, $O14371142922145272253476315664)
  349. {
  350. if (!(self::$error_message !== false)) {
  351. goto label100;
  352. }
  353.  
  354. $O81769834561925132526395938264 = '';
  355.  
  356. if (array_key_exists(self::$item, self::checked_updated_plugin_list())) {
  357. goto label28;
  358. }
  359.  
  360. if (array_key_exists(self::$item, self::checked_updated_theme_list())) {
  361. goto label34;
  362. }
  363.  
  364. goto label39;
  365.  
  366. label28:
  367.  
  368. $O83967585323991503142980300066 = self::$updated_plugin_list[self::$item]['id'];
  369. goto label39;
  370.  
  371. label34:
  372.  
  373. $O83967585323991503142980300066 = self::$updated_theme_list[self::$item]['id'];
  374.  
  375. label39:
  376. if (!((self::$error_message === 'error code:4') && isset($O83967585323991503142980300066))) {
  377. goto label67;
  378. }
  379.  
  380. $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')) : '');
  381.  
  382. label67:
  383. if (!((self::$error_message === 'error code:6') && isset($O83967585323991503142980300066))) {
  384. goto label78;
  385. }
  386.  
  387. self::report_link_problem($O83967585323991503142980300066);
  388.  
  389. label78:
  390.  
  391. $O02175938219123431890928753296 = new WP_Error('wslm_update_not_available', ZhUpClient::error_code(self::$error_message, self::$parent_id, self::$item, self::$up_version) . $O81769834561925132526395938264);
  392. $O14371142922145272253476315664->skin->set_result($O02175938219123431890928753296);
  393. self::$error_message = false;
  394.  
  395. label100:
  396.  
  397. return $O02175938219123431890928753296;
  398. }
  399.  
  400. static public function report_link_problem($O83967585323991503142980300066)
  401. {
  402. $O02175938219123431890928753296 = wp_remote_get(self::define('ZhUpClient_report_link') . $O83967585323991503142980300066, ['timeout' => 60, 'sslverify' => false]);
  403. return true;
  404. }
  405.  
  406. static public function change_log_api_filter($O97246170517647133552941276338, $O78998765617308256676387359882 = '', $O88255416803688178890246353912 = NULL)
  407. {
  408. $O01165005751986228090376209284 = self::checked_updated_plugin_list();
  409.  
  410. if (isset($O88255416803688178890246353912->slug)) {
  411. goto label10;
  412. }
  413.  
  414. return $O97246170517647133552941276338;
  415.  
  416. label10:
  417.  
  418. if (!array_key_exists($O88255416803688178890246353912->slug, $O01165005751986228090376209284)) {
  419. goto label78;
  420. }
  421.  
  422. $O79867440354837697327141665095 = wp_remote_get(self::define('ZhUpClient_product_info') . $O01165005751986228090376209284[$O88255416803688178890246353912->slug]['id'], ['timeout' => 60, 'sslverify' => false]);
  423. if (!(!is_wp_error($O79867440354837697327141665095) || (wp_remote_retrieve_response_code($O79867440354837697327141665095) === 200))) {
  424. goto label78;
  425. }
  426.  
  427. $O51712011235435026510958327644 = json_decode(wp_remote_retrieve_body($O79867440354837697327141665095));
  428. $O14887618967760855048495604353 = new stdClass();
  429.  
  430. if (!isset($O51712011235435026510958327644->name)) {
  431. goto label74;
  432. }
  433.  
  434. foreach ((array) $O51712011235435026510958327644 as $O32458362516990950002527376266 => $O83452352493515336470612737779) {
  435. if ($O83452352493515336470612737779 instanceof stdClass) {
  436. goto label69;
  437. }
  438.  
  439. $O14887618967760855048495604353->{$O32458362516990950002527376266} = $O83452352493515336470612737779;
  440. goto label72;
  441.  
  442. label69:
  443.  
  444. $O14887618967760855048495604353->{$O32458362516990950002527376266} = (array) $O83452352493515336470612737779;
  445.  
  446. label72:
  447. }
  448.  
  449. label74:
  450.  
  451. $O14887618967760855048495604353->slug = $O88255416803688178890246353912->slug;
  452. return $O14887618967760855048495604353;
  453.  
  454. label78:
  455.  
  456. return $O97246170517647133552941276338;
  457. }
  458.  
  459. static public function prefix_plugin_update_message($O97246170517647133552941276338, $O88918225979043660757052652954)
  460. {
  461. }
  462.  
  463. static public function show_update_notification($O93745834639046219340963437385, $O60183860457869502445127046925)
  464. {
  465. echo '<!-- <tr class="plugin-update-tr">-->' . "\r\n" . '<!-- <td class="plugin-update colspanchange" colspan="3">-->' . "\r\n" . '<!-- <div class="-->' . "\r\n" . '<!-- -->';
  466. echo '<!--">-->' . "\r\n" . '<!-- -->';
  467. echo '<!-- </div>-->' . "\r\n" . '<!-- </td>-->' . "\r\n" . '<!-- </tr>-->' . "\r\n" . '<!-- -->';
  468. }
  469.  
  470. static public function create_package_backup($O26095425046862550038562419639, $O55422178269968831048014869673)
  471. {
  472. global $wp_theme_directories;
  473. $O47838258219960240771122560000 = (isset($O55422178269968831048014869673['hook_extra']) && isset($O55422178269968831048014869673['hook_extra']['plugin']) ? 'plugin' : 'theme');
  474.  
  475. if ($O47838258219960240771122560000 === 'plugin') {
  476. goto label35;
  477. }
  478.  
  479. $O84608197164703574734531923085 = realpath($wp_theme_directories[0] . '/' . $O26095425046862550038562419639);
  480. $O14225334179353112863562833809 = wp_get_theme($O26095425046862550038562419639)->Version;
  481. $O84608197164703574734531923085 = pathinfo($O84608197164703574734531923085 . '/index.php')['dirname'];
  482. goto label61;
  483.  
  484. label35:
  485.  
  486. $O84608197164703574734531923085 = WP_PLUGIN_DIR . '/' . $O26095425046862550038562419639;
  487. $O42941526687057757939989323186 = get_plugins();
  488. $O14225334179353112863562833809 = (array_key_exists($O26095425046862550038562419639, $O42941526687057757939989323186) ? $O42941526687057757939989323186[$O26095425046862550038562419639]['Version'] : '');
  489. $O84608197164703574734531923085 = pathinfo(realpath($O84608197164703574734531923085))['dirname'];
  490.  
  491. label61:
  492.  
  493. self::caj_create_backup($O84608197164703574734531923085, $O14225334179353112863562833809, $O26095425046862550038562419639, $O47838258219960240771122560000);
  494. }
  495.  
  496. static public function caj_create_backup($O98882144410668275908332051775, $O14225334179353112863562833809, $O26095425046862550038562419639, $O47838258219960240771122560000)
  497. {
  498. require_once ABSPATH . 'wp-admin/includes/file.php';
  499. .......................................................................................
  500. ..............................................
  501. .........................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement