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 /* * @ https://EasyToYou.eu - IonCube v11 Decoder Online * @ PHP 7.2 & 7.3 * ..

Decoded Output download

<?php 
/* 
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online 
 * @ PHP 7.2 & 7.3 
 * @ Decoder version: 1.0.6 
 * @ Release: 10/08/2022 
 */ 
 
if (!class_exists("data_management_")) { 
    class data_management_ 
    { 
        public $cache_key = NULL; 
        public $cache_allowed = true; 
        protected $plugin = NULL; 
        protected $license = NULL; 
        public function __construct($plugin_file) 
        { 
            $plugin = file_get_contents($plugin_file); 
            $plugin = $this->decode_($plugin); 
            $this->cache_key = $plugin["slug"]; 
            $this->plugin = $plugin; 
            $this->license = get_option($this->plugin["slug"] . "_license", NULL); 
            if ($this->license) { 
                $this->license = $this->decode_($this->license); 
            } 
            add_filter("plugins_api", [$this, "info"], 20, 3); 
            add_filter("site_transient_update_plugins", [$this, "update"]); 
            add_action("upgrader_process_complete", [$this, "purge"], 10, 2); 
            $this->check(); 
            add_action("admin_notices", [$this, "general_admin_notice"]); 
            add_action("admin_menu", [$this, "add_admin_pages"]); 
            add_filter("plugin_action_links", [$this, "plugin_action_links"], 10, 2); 
        } 
        public function plugin_action_links($links_array, $plugin_file_name) 
        { 
            if ($plugin_file_name === $this->plugin["path"]) { 
                array_unshift($links_array, "<a href=\"" . admin_url("admin.php?page=" . $this->plugin["slug"] . "-license") . "\">License</a>"); 
            } 
            return $links_array; 
        } 
        public function add_admin_pages() 
        { 
            add_submenu_page("null", __("license", "textdomain"), $this->plugin["slug"] . "-license", "manage_options", $this->plugin["slug"] . "-license", [$this, "license_form"], 110); 
        } 
        public function general_admin_notice() 
        { 
            if (isset($this->license["license"]) && !$this->license["success"]) { 
                echo "<div class=\"notice notice-warning is-dismissible\">
	             <p><span style=\"color:red\">Cnh bo:</span> " . $this->license["msg"] . "</p>
	         </div>"; 
            } 
        } 
        public function request($license = "") 
        { 
            if (!isset($this->license) && $license == "") { 
                return NULL; 
            } 
            $domain = 'https://whey360.vn/'; 
            $domain = str_replace("http://", "", $domain); 
            $domain = str_replace("https://", "", $domain); 
            $domain = rtrim($domain, "/"); 
            $params = ["action" => "checkLicense", "Soft_Id" => $this->plugin["slug"], "Domain" => $domain, "License" => $license ? $license : $this->license["license"]["License"]]; 
            $query = []; 
            foreach ($params as $key => $value) { 
                $query[] = $key . "=" . $value; 
            } 
            $remote = get_transient($this->cache_key); 
            if ($license || false === $remote || !$this->cache_allowed) { 
                $remote = wp_remote_get($this->plugin["server"] . "?" . implode($query, "&"), ["timeout" => 10, "headers" => ["Accept" => "application/json"]]); 
                if (is_wp_error($remote) || 200 !== wp_remote_retrieve_response_code($remote) || !wp_remote_retrieve_body($remote)) { 
                    return false; 
                } 
                $remote = json_decode(wp_remote_retrieve_body($remote), true); 
                if ($remote && isset($remote["msg"])) { 
                    // if (isset($remote["code"]) && $remote["code"] != 100) { 
                    //     $this->telegram_noti($_SERVER["SERVER_NAME"] . "-" . $remote["msg"] . "  |  " . $this->plugin["server"] . "?" . http_build_query($params)); 
                    // } 
                    // if ($license != "") { 
                    //     $this->telegram_noti($_SERVER["SERVER_NAME"] . $remote["msg"]); 
                    // } 
                    $this->license = $remote; 
                    $encode = $this->encode_($remote); 
                    update_option($this->plugin["slug"] . "_license", $encode); 
                    $cache_time = isset($this->plugin["cache_time"]) ? intval($this->plugin["cache_time"]) : 1; 
                    set_transient($this->cache_key, $encode, DAY_IN_SECONDS * $cache_time); 
                } 
                return $remote; 
            } 
            $remote = $this->decode_($remote); 
            return true; 
        } 
        public function info($res, $action, $args) 
        { 
            if ("plugin_information" !== $action) { 
                return false; 
            } 
            if ($this->plugin["slug"] !== $args->slug) { 
                return false; 
            } 
            $remote = $this->request(); 
            if (!$remote || !isset($remote["plugin"])) { 
                return false; 
            } 
            $plugin = $remote["plugin"]; 
            $author = $remote["author"]; 
            $res = new stdClass(); 
            $res->name = $plugin["Name"]; 
            $res->slug = $plugin["ID"]; 
            $res->version = $plugin["Newest_Version"]; 
            $res->author = $author["name"]; 
            $res->author_profile = $author["author_profile"]; 
            $res->download_link = $plugin["Download_Url"]; 
            $res->trunk = $plugin["Download_Url"]; 
            $res->sections = ["changelog" => $plugin["Change_Log"]]; 
            $res->banners = ["low" => $author["banner"], "high" => $author["banner"]]; 
            return $res; 
        } 
        public function update($transient) 
        { 
            if (empty($transient->checked)) { 
                return $transient; 
            } 
            $remote = $this->request(); 
            if ($remote && version_compare($this->plugin["version"], $remote["plugin"]["Newest_Version"], "<")) { 
                $res = new stdClass(); 
                $res->slug = $this->plugin["slug"]; 
                $res->plugin = $this->plugin["path"]; 
                $res->new_version = $remote["plugin"]["Newest_Version"]; 
                $res->package = $remote["plugin"]["Download_Url"]; 
                $transient->response[$res->plugin] = $res; 
            } 
            return $transient; 
        } 
        public function purge($upgrader_object, $options) 
        { 
            if ($this->cache_allowed && "update" === $options["action"] && "plugin" === $options["type"]) { 
                foreach ($options["plugins"] as $plugin) { 
                    if ($plugin == $this->plugin["path"]) { 
                        delete_transient($this->cache_key); 
                    } 
                } 
            } 
        } 
        public function check() 
        { 
            $flag = true; 
            if (!isset($this->license["license"]) || $this->license["error"] != 100) { 
                $flag = false; 
                return false; 
            } 
            $domain = 'https://whey360.vn/'; 
            $domain = str_replace("http://", "", $domain); 
            $domain = str_replace("https://", "", $domain); 
            $domain = rtrim($domain, "/"); 
            if (isset($this->license["license"]["Domain"]) && $this->license["license"]["Domain"] !== $domain) { 
                $flag = false; 
                return false; 
            } 
            if ($this->plugin["slug"] !== $this->license["license"]["Soft_Id"]) { 
                $flag = false; 
                return false; 
            } 
            if ($this->license["license"]["Expiry_Date"] && strtotime(str_replace("/", "-", $this->license["license"]["Expiry_Date"])) < strtotime((new DateTime())->format("d-m-Y"))) { 
                $this->license["msg"] = $this->license["license"]["Soft_Name"] . " ca bn  ht hn vo ngy " . $this->license["license"]["Expiry_Date"] . ". Vui lng lin h: " . $this->license["author"]["author_profile"]; 
                $this->license["success"] = false; 
                $flag = false; 
                return false; 
            } 
            if (version_compare($this->plugin["version"], $this->license["plugin"]["Newest_Version"], "<")) { 
                $this->license["msg"] = $this->license["license"]["Soft_Name"] . " vui lng nng cp ln phin bn " . $this->license["plugin"]["Newest_Version"]; 
                $this->license["success"] = false; 
            } 
            if ($flag) { 
                define($this->plugin["cons"], true); 
            } 
        } 
        private function encode_($license) 
        { 
            $lic_encode = base64_encode(json_encode($license)); 
            $lic_encode = str_split($lic_encode, 50); 
            $lic_encode[0] = "=zZW5zZSB0vdSdsbC" . $lic_encode[0]; 
            $lic_encode[2] = "=zZW5zZSB0vdSdsbC" . $lic_encode[2]; 
            $lic_encode = implode("", $lic_encode); 
            $lic_encode = strrev($lic_encode); 
            return $lic_encode; 
        } 
        private function decode_($license) 
        { 
            $lic_encode = strrev($license); 
            $lic_encode = explode("=zZW5zZSB0vdSdsbC", $lic_encode); 
            $lic_encode = implode("", $lic_encode); 
            $lic_encode = base64_decode($lic_encode); 
            return json_decode($lic_encode, true); 
        } 
        public function telegram_noti($html) 
        { 
            if ($this->plugin["token_tl"] && $this->plugin["group"]) { 
                $botToken = $this->plugin["token_tl"]; 
                $website = "https://api.telegram.org/bot" . $botToken; 
                $chatId = $this->plugin["group"]; 
                $params = ["chat_id" => $chatId, "text" => get_site_url() . PHP_EOL . $html, "parse_mode" => "html"]; 
                $ch = curl_init($website . "/sendMessage"); 
                curl_setopt($ch, CURLOPT_HEADER, false); 
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
                curl_setopt($ch, CURLOPT_POST, 1); 
                curl_setopt($ch, CURLOPT_POSTFIELDS, $params); 
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 
                $result = curl_exec($ch); 
                curl_close($ch); 
            } 
        } 
        public function license_form() 
        { 
            if (isset($_POST["mh_license_slug"]) && $_POST["mh_license_slug"] == $this->plugin["name"]) { 
                $license = isset($_POST["mh_license"]) ? $_POST["mh_license"] : ""; 
                if (!$license) { 
                    echo "<p>M License khng th  trng</p>"; 
                } else { 
                    $this->request($license); 
                } 
            } 
            echo "			<div style=\"padding: 20px;\">
			<p>Vui lng nhp License  kch hot Plugin: </p>

			<form action=\"\" method=\"POST\">
				<input type=\"hidden\" name=\"mh_license_slug\" value=\""; 
            echo $this->plugin["name"]; 
            echo "\" >
				<table class=\"form-table\">
					<tr>
						<th scope=\"row\"><label for=\"mh_license\">in m License "; 
            echo $this->plugin["name"]; 
            echo "</label></th>
						<td><input  name=\"mh_license\" type=\"text\" id=\"mh_license\" value=\""; 
            echo isset($this->license["license"]["License"]) ? $this->license["license"]["License"] : ""; 
            echo "\" class=\"regular-text ltr\" required> 
							<input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"Xc nhn\">
						</td>

					</tr>
					"; 
            if ($this->license) { 
                echo "					<tr> <th colspan=\"2\">
						"; 
                echo isset($this->license["error"]) && 99 < $this->license["error"] ? $this->license["msg"] : ""; 
                echo " <br>
						"; 
                if ($this->license["success"]) { 
                    // echo "							License p dng cho tn min: <b style=\"color:green\">"; 
                    // echo $this->license["license"]["Domain"]; 
                    echo "</b> <br>
							Thi hn: <b style=\"color:green\">"; 
                    echo $this->license["license"]["Expiry_Date"] ? $this->license["license"]["Expiry_Date"] : "Lifetime"; 
                    echo "</b> 
						"; 
                } 
                echo "					</th> </tr>
					"; 
            } 
            echo "					
				</table>
			</form>
			</div>
			"; 
        } 
    } 
} 
 
?>

Did this file decode correctly?

Original Code

<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.0.6
 * @ Release: 10/08/2022
 */

if (!class_exists("data_management_")) {
    class data_management_
    {
        public $cache_key = NULL;
        public $cache_allowed = true;
        protected $plugin = NULL;
        protected $license = NULL;
        public function __construct($plugin_file)
        {
            $plugin = file_get_contents($plugin_file);
            $plugin = $this->decode_($plugin);
            $this->cache_key = $plugin["slug"];
            $this->plugin = $plugin;
            $this->license = get_option($this->plugin["slug"] . "_license", NULL);
            if ($this->license) {
                $this->license = $this->decode_($this->license);
            }
            add_filter("plugins_api", [$this, "info"], 20, 3);
            add_filter("site_transient_update_plugins", [$this, "update"]);
            add_action("upgrader_process_complete", [$this, "purge"], 10, 2);
            $this->check();
            add_action("admin_notices", [$this, "general_admin_notice"]);
            add_action("admin_menu", [$this, "add_admin_pages"]);
            add_filter("plugin_action_links", [$this, "plugin_action_links"], 10, 2);
        }
        public function plugin_action_links($links_array, $plugin_file_name)
        {
            if ($plugin_file_name === $this->plugin["path"]) {
                array_unshift($links_array, "<a href=\"" . admin_url("admin.php?page=" . $this->plugin["slug"] . "-license") . "\">License</a>");
            }
            return $links_array;
        }
        public function add_admin_pages()
        {
            add_submenu_page("null", __("license", "textdomain"), $this->plugin["slug"] . "-license", "manage_options", $this->plugin["slug"] . "-license", [$this, "license_form"], 110);
        }
        public function general_admin_notice()
        {
            if (isset($this->license["license"]) && !$this->license["success"]) {
                echo "<div class=\"notice notice-warning is-dismissible\">\r\n\t             <p><span style=\"color:red\">Cnh bo:</span> " . $this->license["msg"] . "</p>\r\n\t         </div>";
            }
        }
        public function request($license = "")
        {
            if (!isset($this->license) && $license == "") {
                return NULL;
            }
            $domain = 'https://whey360.vn/';
            $domain = str_replace("http://", "", $domain);
            $domain = str_replace("https://", "", $domain);
            $domain = rtrim($domain, "/");
            $params = ["action" => "checkLicense", "Soft_Id" => $this->plugin["slug"], "Domain" => $domain, "License" => $license ? $license : $this->license["license"]["License"]];
            $query = [];
            foreach ($params as $key => $value) {
                $query[] = $key . "=" . $value;
            }
            $remote = get_transient($this->cache_key);
            if ($license || false === $remote || !$this->cache_allowed) {
                $remote = wp_remote_get($this->plugin["server"] . "?" . implode($query, "&"), ["timeout" => 10, "headers" => ["Accept" => "application/json"]]);
                if (is_wp_error($remote) || 200 !== wp_remote_retrieve_response_code($remote) || !wp_remote_retrieve_body($remote)) {
                    return false;
                }
                $remote = json_decode(wp_remote_retrieve_body($remote), true);
                if ($remote && isset($remote["msg"])) {
                    // if (isset($remote["code"]) && $remote["code"] != 100) {
                    //     $this->telegram_noti($_SERVER["SERVER_NAME"] . "-" . $remote["msg"] . "  |  " . $this->plugin["server"] . "?" . http_build_query($params));
                    // }
                    // if ($license != "") {
                    //     $this->telegram_noti($_SERVER["SERVER_NAME"] . $remote["msg"]);
                    // }
                    $this->license = $remote;
                    $encode = $this->encode_($remote);
                    update_option($this->plugin["slug"] . "_license", $encode);
                    $cache_time = isset($this->plugin["cache_time"]) ? intval($this->plugin["cache_time"]) : 1;
                    set_transient($this->cache_key, $encode, DAY_IN_SECONDS * $cache_time);
                }
                return $remote;
            }
            $remote = $this->decode_($remote);
            return true;
        }
        public function info($res, $action, $args)
        {
            if ("plugin_information" !== $action) {
                return false;
            }
            if ($this->plugin["slug"] !== $args->slug) {
                return false;
            }
            $remote = $this->request();
            if (!$remote || !isset($remote["plugin"])) {
                return false;
            }
            $plugin = $remote["plugin"];
            $author = $remote["author"];
            $res = new stdClass();
            $res->name = $plugin["Name"];
            $res->slug = $plugin["ID"];
            $res->version = $plugin["Newest_Version"];
            $res->author = $author["name"];
            $res->author_profile = $author["author_profile"];
            $res->download_link = $plugin["Download_Url"];
            $res->trunk = $plugin["Download_Url"];
            $res->sections = ["changelog" => $plugin["Change_Log"]];
            $res->banners = ["low" => $author["banner"], "high" => $author["banner"]];
            return $res;
        }
        public function update($transient)
        {
            if (empty($transient->checked)) {
                return $transient;
            }
            $remote = $this->request();
            if ($remote && version_compare($this->plugin["version"], $remote["plugin"]["Newest_Version"], "<")) {
                $res = new stdClass();
                $res->slug = $this->plugin["slug"];
                $res->plugin = $this->plugin["path"];
                $res->new_version = $remote["plugin"]["Newest_Version"];
                $res->package = $remote["plugin"]["Download_Url"];
                $transient->response[$res->plugin] = $res;
            }
            return $transient;
        }
        public function purge($upgrader_object, $options)
        {
            if ($this->cache_allowed && "update" === $options["action"] && "plugin" === $options["type"]) {
                foreach ($options["plugins"] as $plugin) {
                    if ($plugin == $this->plugin["path"]) {
                        delete_transient($this->cache_key);
                    }
                }
            }
        }
        public function check()
        {
            $flag = true;
            if (!isset($this->license["license"]) || $this->license["error"] != 100) {
                $flag = false;
                return false;
            }
            $domain = 'https://whey360.vn/';
            $domain = str_replace("http://", "", $domain);
            $domain = str_replace("https://", "", $domain);
            $domain = rtrim($domain, "/");
            if (isset($this->license["license"]["Domain"]) && $this->license["license"]["Domain"] !== $domain) {
                $flag = false;
                return false;
            }
            if ($this->plugin["slug"] !== $this->license["license"]["Soft_Id"]) {
                $flag = false;
                return false;
            }
            if ($this->license["license"]["Expiry_Date"] && strtotime(str_replace("/", "-", $this->license["license"]["Expiry_Date"])) < strtotime((new DateTime())->format("d-m-Y"))) {
                $this->license["msg"] = $this->license["license"]["Soft_Name"] . " ca bn  ht hn vo ngy " . $this->license["license"]["Expiry_Date"] . ". Vui lng lin h: " . $this->license["author"]["author_profile"];
                $this->license["success"] = false;
                $flag = false;
                return false;
            }
            if (version_compare($this->plugin["version"], $this->license["plugin"]["Newest_Version"], "<")) {
                $this->license["msg"] = $this->license["license"]["Soft_Name"] . " vui lng nng cp ln phin bn " . $this->license["plugin"]["Newest_Version"];
                $this->license["success"] = false;
            }
            if ($flag) {
                define($this->plugin["cons"], true);
            }
        }
        private function encode_($license)
        {
            $lic_encode = base64_encode(json_encode($license));
            $lic_encode = str_split($lic_encode, 50);
            $lic_encode[0] = "=zZW5zZSB0vdSdsbC" . $lic_encode[0];
            $lic_encode[2] = "=zZW5zZSB0vdSdsbC" . $lic_encode[2];
            $lic_encode = implode("", $lic_encode);
            $lic_encode = strrev($lic_encode);
            return $lic_encode;
        }
        private function decode_($license)
        {
            $lic_encode = strrev($license);
            $lic_encode = explode("=zZW5zZSB0vdSdsbC", $lic_encode);
            $lic_encode = implode("", $lic_encode);
            $lic_encode = base64_decode($lic_encode);
            return json_decode($lic_encode, true);
        }
        public function telegram_noti($html)
        {
            if ($this->plugin["token_tl"] && $this->plugin["group"]) {
                $botToken = $this->plugin["token_tl"];
                $website = "https://api.telegram.org/bot" . $botToken;
                $chatId = $this->plugin["group"];
                $params = ["chat_id" => $chatId, "text" => get_site_url() . PHP_EOL . $html, "parse_mode" => "html"];
                $ch = curl_init($website . "/sendMessage");
                curl_setopt($ch, CURLOPT_HEADER, false);
                curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
                curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
                $result = curl_exec($ch);
                curl_close($ch);
            }
        }
        public function license_form()
        {
            if (isset($_POST["mh_license_slug"]) && $_POST["mh_license_slug"] == $this->plugin["name"]) {
                $license = isset($_POST["mh_license"]) ? $_POST["mh_license"] : "";
                if (!$license) {
                    echo "<p>M License khng th  trng</p>";
                } else {
                    $this->request($license);
                }
            }
            echo "\t\t\t<div style=\"padding: 20px;\">\r\n\t\t\t<p>Vui lng nhp License  kch hot Plugin: </p>\r\n\r\n\t\t\t<form action=\"\" method=\"POST\">\r\n\t\t\t\t<input type=\"hidden\" name=\"mh_license_slug\" value=\"";
            echo $this->plugin["name"];
            echo "\" >\r\n\t\t\t\t<table class=\"form-table\">\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<th scope=\"row\"><label for=\"mh_license\">in m License ";
            echo $this->plugin["name"];
            echo "</label></th>\r\n\t\t\t\t\t\t<td><input  name=\"mh_license\" type=\"text\" id=\"mh_license\" value=\"";
            echo isset($this->license["license"]["License"]) ? $this->license["license"]["License"] : "";
            echo "\" class=\"regular-text ltr\" required> \r\n\t\t\t\t\t\t\t<input type=\"submit\" name=\"submit\" id=\"submit\" class=\"button button-primary\" value=\"Xc nhn\">\r\n\t\t\t\t\t\t</td>\r\n\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t";
            if ($this->license) {
                echo "\t\t\t\t\t<tr> <th colspan=\"2\">\r\n\t\t\t\t\t\t";
                echo isset($this->license["error"]) && 99 < $this->license["error"] ? $this->license["msg"] : "";
                echo " <br>\r\n\t\t\t\t\t\t";
                if ($this->license["success"]) {
                    // echo "\t\t\t\t\t\t\tLicense p dng cho tn min: <b style=\"color:green\">";
                    // echo $this->license["license"]["Domain"];
                    echo "</b> <br>\r\n\t\t\t\t\t\t\tThi hn: <b style=\"color:green\">";
                    echo $this->license["license"]["Expiry_Date"] ? $this->license["license"]["Expiry_Date"] : "Lifetime";
                    echo "</b> \r\n\t\t\t\t\t\t";
                }
                echo "\t\t\t\t\t</th> </tr>\r\n\t\t\t\t\t";
            }
            echo "\t\t\t\t\t\r\n\t\t\t\t</table>\r\n\t\t\t</form>\r\n\t\t\t</div>\r\n\t\t\t";
        }
    }
}

?>

Function Calls

None

Variables

None

Stats

MD5 fa3ae9205f68b519e2e65cd52cbfe842
Eval Count 0
Decode Time 63 ms