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 goto RDfsf; YwUSu: define("\114\102\x5f\101\120\x49\137\x44\x45\102\x55\x47", fals..
Decoded Output download
<?php
goto RDfsf; YwUSu: define("LB_API_DEBUG", false); goto XIsWp; uWvWU: define("LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE", "Application was successfully updated and SQL file was automatically imported."); goto hjjNZ; qmzqQ: define("LB_TEXT_UPDATE_EXTRACTION_ERROR", "Update zip extraction failed."); goto B2EP7; BhPI3: if (@ini_get("max_execution_time") !== "0" && @ini_get("max_execution_time") < 600) { @ini_set("max_execution_time", 600); } goto mz57e; BRf8j: define("LB_TEXT_INVALID_RESPONSE", "Server returned an invalid response, please contact support."); goto TFEQW; mTshw: define("LB_TEXT_UPDATE_PERIOD_EXPIRED", "Your update period has ended or your license is invalid, please contact support."); goto XKSHi; Nxfq1: define("LB_TEXT_MAIN_UPDATE_DONE", "Main update files downloaded and extracted."); goto qmzqQ; hjjNZ: define("LB_TEXT_UPDATE_WITH_SQL_DONE", "Application was successfully updated, please import the downloaded SQL file in your database manually."); goto d_XJx; LYIo8: if (!LB_API_DEBUG) { @ini_set("display_errors", 0); } goto BhPI3; wHvCm: define("LB_TEXT_PREPARING_MAIN_DOWNLOAD", "Preparing to download main update..."); goto EIA09; TFEQW: define("LB_TEXT_VERIFIED_RESPONSE", "Verified! Thanks for purchasing."); goto wHvCm; xJC2U: define("LB_TEXT_DOWNLOADING_MAIN", "Downloading main update..."); goto mTshw; dT7tP: define("LB_TEXT_DOWNLOADING_SQL", "Downloading SQL update..."); goto hTgGs; hTgGs: define("LB_TEXT_SQL_UPDATE_DONE", "SQL update files downloaded."); goto LkMm6; LkMm6: define("LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED", "Application was successfully updated but automatic SQL importing failed, please import the downloaded SQL file in your database manually."); goto uWvWU; d_XJx: define("LB_TEXT_UPDATE_WITHOUT_SQL_DONE", "Application was successfully updated, there were no SQL updates."); goto LYIo8; XKSHi: define("LB_TEXT_UPDATE_PATH_ERROR", "Folder does not have write permission or the update file path could not be resolved, please contact support."); goto Nxfq1; mz57e: @ini_set("memory_limit", "256M"); goto eNEXp; EIA09: define("LB_TEXT_MAIN_UPDATE_SIZE", "Main Update size:"); goto Pd6dM; Pd6dM: define("LB_TEXT_DONT_REFRESH", "(Please do not refresh the page)."); goto xJC2U; Qbn2c: define("LB_TEXT_CONNECTION_FAILED", "Server is unavailable at the moment, please try again."); goto BRf8j; RDfsf: if (count(get_included_files()) == 1) { die("No direct script access allowed"); } goto YwUSu; fCPSA: define("LB_TEXT_SQL_UPDATE_SIZE", "SQL Update size:"); goto dT7tP; B2EP7: define("LB_TEXT_PREPARING_SQL_DOWNLOAD", "Preparing to download SQL update..."); goto fCPSA; XIsWp: define("LB_SHOW_UPDATE_PROGRESS", true); goto Qbn2c; eNEXp: class LicenseBoxExternalAPI { private $product_id; private $api_url; private $api_key; private $api_language; private $current_version; private $verify_type; private $verification_period; private $current_path; private $root_path; private $license_file; public function __construct() { $this->product_id = "DCFAAE6E"; $this->api_url = "https://licensebox.casinoscript.online/"; $this->api_key = "63D024F1F36183F374AB"; $this->api_language = "english"; $this->current_version = "v1.0.0"; $this->verify_type = "non_envato"; $this->verification_period = 1; $this->current_path = realpath(__DIR__); $this->root_path = realpath($this->current_path . "/.."); $this->license_file = $this->current_path . "/.lic"; } public function check_local_license_exist() { return is_file($this->license_file); } public function get_current_version() { return $this->current_version; } private function call_api($method, $url, $data = null) { $curl = curl_init(); switch ($method) { case "POST": curl_setopt($curl, CURLOPT_POST, 1); if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } break; case "PUT": curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "PUT"); if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } break; default: if ($data) { $url = sprintf("%s?%s", $url, http_build_query($data)); } } $this_server_name = getenv("SERVER_NAME") ?: $_SERVER["SERVER_NAME"] ?: getenv("HTTP_HOST") ?: $_SERVER["HTTP_HOST"]; $this_http_or_https = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" or isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) and $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") ? "https://" : "http://"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["REQUEST_URI"]; $this_ip = getenv("SERVER_ADDR") ?: $_SERVER["SERVER_ADDR"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "LB-API-KEY: " . $this->api_key, "LB-URL: " . $this_url, "LB-IP: " . $this_ip, "LB-LANG: " . $this->api_language)); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl, CURLOPT_TIMEOUT, 30); $result = curl_exec($curl); if (!$result && !LB_API_DEBUG) { $rs = array("status" => FALSE, "message" => LB_TEXT_CONNECTION_FAILED); return json_encode($rs); } $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE); if ($http_status != 200) { if (LB_API_DEBUG) { $temp_decode = json_decode($result, true); $rs = array("status" => FALSE, "message" => !empty($temp_decode["error"]) ? $temp_decode["error"] : $temp_decode["message"]); return json_encode($rs); } else { $rs = array("status" => FALSE, "message" => LB_TEXT_INVALID_RESPONSE); return json_encode($rs); } } curl_close($curl); return $result; } public function check_connection() { $get_data = $this->call_api("POST", $this->api_url . "api/check_connection_ext"); $response = json_decode($get_data, true); return $response; } public function get_latest_version() { $data_array = array("product_id" => $this->product_id); $get_data = $this->call_api("POST", $this->api_url . "api/latest_version", json_encode($data_array)); $response = json_decode($get_data, true); return $response; } public function activate_license($license, $client, $create_lic = true) { $data_array = array("product_id" => $this->product_id, "license_code" => $license, "client_name" => $client, "verify_type" => $this->verify_type); $get_data = $this->call_api("POST", $this->api_url . "api/activate_license", json_encode($data_array)); $response = json_decode($get_data, true); if (!empty($create_lic)) { if ($response["status"]) { $licfile = trim($response["lic_response"]); file_put_contents($this->license_file, $licfile, LOCK_EX); } else { @chmod($this->license_file, 511); if (is_writeable($this->license_file)) { unlink($this->license_file); } } } return $response; } public function verify_license($time_based_check = false, $license = false, $client = false) { if (!empty($license) && !empty($client)) { $data_array = array("product_id" => $this->product_id, "license_file" => null, "license_code" => $license, "client_name" => $client); } else { if (is_file($this->license_file)) { $data_array = array("product_id" => $this->product_id, "license_file" => file_get_contents($this->license_file), "license_code" => null, "client_name" => null); } else { $data_array = array(); } } $res = array("status" => TRUE, "message" => LB_TEXT_VERIFIED_RESPONSE); if ($time_based_check && $this->verification_period > 0) { ob_start(); if (session_status() == PHP_SESSION_NONE) { session_start(); } $type = (int) $this->verification_period; $today = date("d-m-Y"); if (empty($_SESSION["87516c00d047375"])) { $_SESSION["87516c00d047375"] = "00-00-0000"; } if ($type == 1) { $type_text = "1 day"; } elseif ($type == 3) { $type_text = "3 days"; } elseif ($type == 7) { $type_text = "1 week"; } elseif ($type == 30) { $type_text = "1 month"; } elseif ($type == 90) { $type_text = "3 months"; } elseif ($type == 365) { $type_text = "1 year"; } else { $type_text = $type . " days"; } if (strtotime($today) >= strtotime($_SESSION["87516c00d047375"])) { $get_data = $this->call_api("POST", $this->api_url . "api/verify_license", json_encode($data_array)); $res = json_decode($get_data, true); if ($res["status"] == true) { $tomo = date("d-m-Y", strtotime($today . " + " . $type_text)); $_SESSION["87516c00d047375"] = $tomo; } } ob_end_clean(); } else { $get_data = $this->call_api("POST", $this->api_url . "api/verify_license", json_encode($data_array)); $res = json_decode($get_data, true); } return $res; } public function deactivate_license($license = false, $client = false) { if (!empty($license) && !empty($client)) { $data_array = array("product_id" => $this->product_id, "license_file" => null, "license_code" => $license, "client_name" => $client); } else { if (is_file($this->license_file)) { $data_array = array("product_id" => $this->product_id, "license_file" => file_get_contents($this->license_file), "license_code" => null, "client_name" => null); } else { $data_array = array(); } } $get_data = $this->call_api("POST", $this->api_url . "api/deactivate_license", json_encode($data_array)); $response = json_decode($get_data, true); if ($response["status"]) { @chmod($this->license_file, 511); if (is_writeable($this->license_file)) { unlink($this->license_file); } } return $response; } public function check_update() { $data_array = array("product_id" => $this->product_id, "current_version" => $this->current_version); $get_data = $this->call_api("POST", $this->api_url . "api/check_update", json_encode($data_array)); $response = json_decode($get_data, true); return $response; } public function download_update($update_id, $type, $version, $license = false, $client = false, $db_for_import = false) { if (!empty($license) && !empty($client)) { $data_array = array("license_file" => null, "license_code" => $license, "client_name" => $client); } else { if (is_file($this->license_file)) { $data_array = array("license_file" => file_get_contents($this->license_file), "license_code" => null, "client_name" => null); } else { $data_array = array(); } } ob_end_flush(); ob_implicit_flush(true); $version = str_replace(".", "_", $version); ob_start(); $source_size = $this->api_url . "api/get_update_size/main/" . $update_id; echo LB_TEXT_PREPARING_MAIN_DOWNLOAD . "<br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 1;</script>"; } ob_flush(); echo LB_TEXT_MAIN_UPDATE_SIZE . " " . $this->get_remote_filesize($source_size) . " " . LB_TEXT_DONT_REFRESH . "<br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 5;</script>"; } ob_flush(); $temp_progress = ''; $ch = curl_init(); $source = $this->api_url . "api/download_update/main/" . $update_id; curl_setopt($ch, CURLOPT_URL, $source); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array); $this_server_name = getenv("SERVER_NAME") ?: $_SERVER["SERVER_NAME"] ?: getenv("HTTP_HOST") ?: $_SERVER["HTTP_HOST"]; $this_http_or_https = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" or isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) and $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") ? "https://" : "http://"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["REQUEST_URI"]; $this_ip = getenv("SERVER_ADDR") ?: $_SERVER["SERVER_ADDR"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($ch, CURLOPT_HTTPHEADER, array("LB-API-KEY: " . $this->api_key, "LB-URL: " . $this_url, "LB-IP: " . $this_ip, "LB-LANG: " . $this->api_language)); if (LB_SHOW_UPDATE_PROGRESS) { curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array($this, "progress")); } if (LB_SHOW_UPDATE_PROGRESS) { curl_setopt($ch, CURLOPT_NOPROGRESS, false); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); echo LB_TEXT_DOWNLOADING_MAIN . "<br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 10;</script>"; } ob_flush(); $data = curl_exec($ch); $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_status != 200) { if ($http_status == 401) { curl_close($ch); die("<br>" . LB_TEXT_UPDATE_PERIOD_EXPIRED); } else { curl_close($ch); die("<br>" . LB_TEXT_INVALID_RESPONSE); } } curl_close($ch); $destination = $this->root_path . "/update_main_" . $version . ".zip"; $file = fopen($destination, "w+"); if (!$file) { die("<br>" . LB_TEXT_UPDATE_PATH_ERROR); } fputs($file, $data); fclose($file); if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 65;</script>"; } ob_flush(); $zip = new ZipArchive(); $res = $zip->open($destination); if ($res === TRUE) { $zip->extractTo($this->root_path . "/"); $zip->close(); unlink($destination); echo LB_TEXT_MAIN_UPDATE_DONE . "<br><br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 75;</script>"; } ob_flush(); } else { echo LB_TEXT_UPDATE_EXTRACTION_ERROR . "<br><br>"; ob_flush(); } if ($type == true) { $source_size = $this->api_url . "api/get_update_size/sql/" . $update_id; echo LB_TEXT_PREPARING_SQL_DOWNLOAD . "<br>"; ob_flush(); echo LB_TEXT_SQL_UPDATE_SIZE . " " . $this->get_remote_filesize($source_size) . " " . LB_TEXT_DONT_REFRESH . "<br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 85;</script>"; } ob_flush(); $temp_progress = ''; $ch = curl_init(); $source = $this->api_url . "api/download_update/sql/" . $update_id; curl_setopt($ch, CURLOPT_URL, $source); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array); $this_server_name = getenv("SERVER_NAME") ?: $_SERVER["SERVER_NAME"] ?: getenv("HTTP_HOST") ?: $_SERVER["HTTP_HOST"]; $this_http_or_https = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" or isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) and $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") ? "https://" : "http://"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["REQUEST_URI"]; $this_ip = getenv("SERVER_ADDR") ?: $_SERVER["SERVER_ADDR"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($ch, CURLOPT_HTTPHEADER, array("LB-API-KEY: " . $this->api_key, "LB-URL: " . $this_url, "LB-IP: " . $this_ip, "LB-LANG: " . $this->api_language)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); echo LB_TEXT_DOWNLOADING_SQL . "<br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 90;</script>"; } ob_flush(); $data = curl_exec($ch); $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_status != 200) { curl_close($ch); die(LB_TEXT_INVALID_RESPONSE); } curl_close($ch); $destination = $this->root_path . "/update_sql_" . $version . ".sql"; $file = fopen($destination, "w+"); if (!$file) { die(LB_TEXT_UPDATE_PATH_ERROR); } fputs($file, $data); fclose($file); echo LB_TEXT_SQL_UPDATE_DONE . "<br><br>"; if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 95;</script>"; } ob_flush(); if (is_array($db_for_import)) { if (!empty($db_for_import["db_host"]) && !empty($db_for_import["db_user"]) && !empty($db_for_import["db_name"])) { $db_host = strip_tags(trim((string) $db_for_import["db_host"])); $db_user = strip_tags(trim((string) $db_for_import["db_user"])); $db_pass = strip_tags(trim((string) $db_for_import["db_pass"])); $db_name = strip_tags(trim((string) $db_for_import["db_name"])); $con = @mysqli_connect($db_host, $db_user, $db_pass, $db_name); if (mysqli_connect_errno()) { echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED; } else { $templine = ''; $lines = file($destination); foreach ($lines as $line) { if (substr($line, 0, 2) == "--" || $line == '') { continue; } $templine .= $line; $query = false; if (substr(trim($line), -1, 1) == ";") { $query = mysqli_query($con, $templine); $templine = ''; } } @chmod($destination, 511); if (is_writeable($destination)) { unlink($destination); } echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE; } } else { echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED; } } else { echo LB_TEXT_UPDATE_WITH_SQL_DONE; } if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 100;</script>"; } ob_flush(); } else { if (LB_SHOW_UPDATE_PROGRESS) { echo "<script>document.getElementById('prog').value = 100;</script>"; } echo LB_TEXT_UPDATE_WITHOUT_SQL_DONE; ob_flush(); } ob_end_flush(); } private function progress($resource, $download_size, $downloaded, $upload_size, $uploaded) { static $prev = 0; if ($download_size == 0) { $progress = 0; } else { $progress = round($downloaded * 100 / $download_size); } if ($progress != $prev && $progress == 25) { $prev = $progress; echo "<script>document.getElementById('prog').value = 22.5;</script>"; ob_flush(); } if ($progress != $prev && $progress == 50) { $prev = $progress; echo "<script>document.getElementById('prog').value = 35;</script>"; ob_flush(); } if ($progress != $prev && $progress == 75) { $prev = $progress; echo "<script>document.getElementById('prog').value = 47.5;</script>"; ob_flush(); } if ($progress != $prev && $progress == 100) { $prev = $progress; echo "<script>document.getElementById('prog').value = 60;</script>"; ob_flush(); } } private function get_ip_from_third_party() { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "http://ipecho.net/plain"); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($curl, CURLOPT_TIMEOUT, 10); $response = curl_exec($curl); curl_close($curl); return $response; } private function get_remote_filesize($url) { $curl = curl_init(); curl_setopt($curl, CURLOPT_HEADER, TRUE); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_NOBODY, TRUE); $this_server_name = getenv("SERVER_NAME") ?: $_SERVER["SERVER_NAME"] ?: getenv("HTTP_HOST") ?: $_SERVER["HTTP_HOST"]; $this_http_or_https = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" or isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) and $_SERVER["HTTP_X_FORWARDED_PROTO"] === "https") ? "https://" : "http://"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["REQUEST_URI"]; $this_ip = getenv("SERVER_ADDR") ?: $_SERVER["SERVER_ADDR"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($curl, CURLOPT_HTTPHEADER, array("LB-API-KEY: " . $this->api_key, "LB-URL: " . $this_url, "LB-IP: " . $this_ip, "LB-LANG: " . $this->api_language)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); $result = curl_exec($curl); $filesize = curl_getinfo($curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD); if ($filesize) { switch ($filesize) { case $filesize < 1024: $size = $filesize . " B"; break; case $filesize < 1048576: $size = round($filesize / 1024, 2) . " KB"; break; case $filesize < 1073741824: $size = round($filesize / 1048576, 2) . " MB"; break; case $filesize < 1099511627776: $size = round($filesize / 1073741824, 2) . " GB"; break; } return $size; } } } ?>
Did this file decode correctly?
Original Code
<?php
goto RDfsf; YwUSu: define("\114\102\x5f\101\120\x49\137\x44\x45\102\x55\x47", false); goto XIsWp; uWvWU: define("\114\x42\137\x54\x45\x58\x54\x5f\125\120\x44\101\x54\105\x5f\x57\111\x54\110\x5f\x53\x51\x4c\137\111\x4d\x50\117\122\124\137\x44\x4f\116\x45", "\101\x70\x70\154\151\x63\x61\164\151\157\156\x20\x77\x61\x73\40\x73\x75\143\x63\x65\x73\x73\146\165\x6c\x6c\171\x20\x75\160\x64\x61\x74\x65\144\x20\141\x6e\x64\40\x53\x51\114\40\x66\151\x6c\x65\x20\x77\x61\x73\40\141\165\164\157\x6d\141\164\x69\143\x61\154\154\x79\x20\151\x6d\160\x6f\x72\x74\145\144\56"); goto hjjNZ; qmzqQ: define("\114\102\x5f\124\x45\x58\124\x5f\125\x50\x44\101\124\x45\x5f\x45\x58\124\122\x41\103\124\x49\117\x4e\137\105\122\122\117\x52", "\x55\160\x64\x61\x74\145\x20\172\151\160\x20\x65\170\x74\x72\141\x63\x74\151\x6f\156\40\146\141\x69\x6c\145\x64\x2e"); goto B2EP7; BhPI3: if (@ini_get("\x6d\141\170\x5f\145\170\x65\x63\165\x74\x69\x6f\x6e\137\x74\151\155\145") !== "\60" && @ini_get("\155\141\170\137\145\x78\145\x63\165\x74\151\157\156\x5f\x74\151\155\x65") < 600) { @ini_set("\x6d\141\x78\x5f\x65\x78\x65\x63\x75\x74\x69\157\x6e\137\164\151\155\x65", 600); } goto mz57e; BRf8j: define("\114\102\x5f\124\x45\x58\124\x5f\111\x4e\126\x41\x4c\111\x44\137\122\x45\x53\120\117\x4e\x53\x45", "\x53\145\162\x76\x65\x72\40\x72\145\x74\x75\162\156\x65\x64\40\141\156\x20\x69\156\x76\141\x6c\x69\x64\40\162\x65\x73\160\x6f\x6e\x73\x65\x2c\40\x70\154\x65\141\x73\145\x20\143\x6f\156\x74\x61\143\164\x20\163\165\160\160\x6f\x72\x74\x2e"); goto TFEQW; mTshw: define("\114\102\137\124\x45\130\x54\x5f\125\x50\x44\x41\x54\x45\137\120\105\122\x49\x4f\104\137\x45\130\x50\111\x52\105\x44", "\131\x6f\x75\x72\x20\165\x70\144\x61\164\x65\x20\x70\145\162\151\157\144\x20\x68\141\163\40\x65\x6e\x64\145\x64\x20\x6f\x72\40\x79\157\165\162\40\x6c\151\143\x65\x6e\x73\145\x20\x69\x73\x20\151\156\166\141\x6c\x69\144\x2c\40\x70\x6c\x65\x61\x73\145\40\x63\157\x6e\164\x61\143\164\x20\x73\x75\160\160\x6f\x72\x74\x2e"); goto XKSHi; Nxfq1: define("\x4c\102\137\124\x45\x58\x54\x5f\x4d\x41\x49\x4e\x5f\x55\x50\104\101\124\105\137\x44\117\116\x45", "\x4d\141\151\x6e\40\165\160\x64\141\x74\x65\x20\146\x69\154\145\163\x20\x64\x6f\x77\156\154\157\141\x64\145\x64\x20\141\x6e\x64\x20\145\170\x74\162\x61\x63\164\145\144\x2e"); goto qmzqQ; hjjNZ: define("\x4c\x42\x5f\124\x45\130\x54\x5f\x55\120\x44\x41\x54\105\137\127\x49\124\x48\x5f\123\x51\x4c\x5f\104\x4f\x4e\105", "\x41\x70\160\x6c\x69\143\141\x74\151\157\156\x20\167\141\163\x20\x73\x75\143\143\145\163\x73\x66\165\x6c\154\171\40\x75\160\144\x61\164\x65\144\54\40\x70\x6c\x65\141\163\145\40\151\x6d\x70\157\162\164\40\164\150\145\40\x64\x6f\x77\x6e\154\157\x61\x64\145\x64\x20\x53\x51\x4c\40\146\x69\154\x65\x20\x69\x6e\40\171\x6f\x75\x72\40\x64\x61\164\141\x62\x61\x73\145\40\155\141\x6e\165\x61\x6c\x6c\171\x2e"); goto d_XJx; LYIo8: if (!LB_API_DEBUG) { @ini_set("\144\151\163\x70\x6c\x61\171\137\145\162\x72\x6f\162\x73", 0); } goto BhPI3; wHvCm: define("\x4c\x42\x5f\124\105\x58\124\x5f\120\x52\x45\120\101\122\111\116\107\137\x4d\101\x49\x4e\x5f\104\x4f\x57\x4e\x4c\x4f\x41\104", "\x50\x72\145\x70\141\162\151\x6e\x67\40\x74\x6f\40\x64\x6f\167\x6e\x6c\157\141\144\40\x6d\141\x69\156\x20\165\160\144\x61\164\145\x2e\56\56"); goto EIA09; TFEQW: define("\x4c\102\x5f\124\x45\x58\x54\x5f\x56\x45\122\111\106\111\105\104\137\x52\105\123\x50\x4f\x4e\x53\x45", "\126\145\x72\151\x66\151\x65\144\x21\40\x54\x68\141\156\153\163\x20\x66\x6f\162\40\160\x75\162\x63\150\x61\x73\x69\156\x67\x2e"); goto wHvCm; xJC2U: define("\x4c\102\137\124\x45\x58\124\137\104\117\x57\116\x4c\x4f\101\x44\111\x4e\x47\x5f\x4d\x41\111\x4e", "\x44\x6f\167\x6e\154\157\141\x64\151\156\147\40\x6d\x61\151\156\x20\x75\160\x64\x61\x74\x65\56\x2e\56"); goto mTshw; dT7tP: define("\x4c\102\x5f\124\105\x58\124\x5f\104\117\x57\x4e\114\117\101\x44\x49\116\x47\137\x53\121\114", "\104\157\167\x6e\x6c\x6f\141\x64\151\x6e\x67\40\x53\121\114\40\165\x70\144\141\x74\x65\x2e\56\x2e"); goto hTgGs; hTgGs: define("\114\102\137\x54\105\x58\124\137\x53\x51\114\137\125\120\x44\101\124\105\137\x44\117\116\x45", "\123\x51\114\40\x75\x70\x64\x61\164\145\x20\x66\151\154\145\163\40\x64\157\x77\156\x6c\157\x61\x64\x65\x64\x2e"); goto LkMm6; LkMm6: define("\x4c\102\137\124\x45\x58\124\x5f\125\x50\x44\101\x54\x45\x5f\x57\111\x54\110\137\x53\x51\x4c\137\x49\115\x50\x4f\122\x54\x5f\106\x41\111\x4c\105\104", "\x41\160\x70\154\x69\143\141\164\151\157\156\40\x77\141\163\x20\163\x75\x63\x63\x65\163\x73\146\x75\154\x6c\171\40\165\160\144\141\x74\145\x64\x20\x62\x75\164\x20\141\x75\164\157\x6d\141\x74\151\143\x20\123\121\x4c\40\151\x6d\160\x6f\x72\x74\151\156\147\40\146\x61\151\154\145\x64\x2c\x20\160\x6c\145\141\163\145\x20\x69\x6d\x70\x6f\x72\164\x20\164\150\x65\x20\144\x6f\167\156\x6c\157\x61\144\145\x64\40\x53\x51\x4c\x20\146\151\x6c\x65\40\x69\156\40\x79\157\x75\x72\x20\x64\141\164\141\142\141\x73\x65\40\155\x61\x6e\165\141\154\154\171\x2e"); goto uWvWU; d_XJx: define("\114\102\137\124\105\130\x54\137\125\120\x44\x41\x54\x45\137\127\x49\124\110\x4f\125\124\137\123\121\x4c\137\104\117\116\105", "\101\160\x70\x6c\151\x63\x61\x74\151\157\x6e\x20\167\x61\163\x20\x73\165\143\143\145\163\x73\146\165\x6c\x6c\171\40\165\160\144\x61\x74\x65\x64\x2c\40\x74\x68\145\162\x65\40\167\145\162\x65\x20\x6e\157\40\x53\x51\x4c\40\165\x70\144\x61\x74\x65\x73\56"); goto LYIo8; XKSHi: define("\x4c\x42\137\x54\x45\x58\124\x5f\x55\120\x44\101\124\x45\137\120\101\x54\x48\x5f\105\122\122\117\122", "\x46\x6f\154\x64\x65\x72\x20\x64\x6f\145\163\x20\x6e\157\x74\x20\150\x61\x76\145\40\167\162\x69\x74\145\40\160\145\x72\155\151\163\163\x69\x6f\x6e\x20\157\162\40\164\150\x65\x20\165\160\144\x61\x74\x65\40\146\151\x6c\145\40\160\141\x74\150\x20\143\x6f\x75\x6c\144\x20\x6e\x6f\164\40\x62\145\40\162\x65\163\157\154\166\x65\x64\54\40\x70\154\145\x61\163\145\x20\143\157\156\x74\141\143\164\40\163\165\x70\160\157\x72\164\56"); goto Nxfq1; mz57e: @ini_set("\155\145\x6d\157\x72\171\x5f\x6c\x69\x6d\151\x74", "\62\65\x36\115"); goto eNEXp; EIA09: define("\x4c\x42\x5f\124\x45\x58\124\x5f\x4d\x41\x49\x4e\x5f\x55\120\104\101\124\x45\137\x53\x49\132\x45", "\x4d\141\151\x6e\x20\x55\x70\x64\141\164\145\x20\163\151\x7a\145\72"); goto Pd6dM; Pd6dM: define("\114\102\137\124\105\130\x54\137\x44\117\x4e\124\x5f\122\105\106\122\x45\123\x48", "\x28\x50\154\145\x61\163\145\x20\x64\157\x20\x6e\x6f\x74\x20\x72\145\x66\x72\145\163\x68\40\x74\150\x65\40\160\141\147\145\x29\x2e"); goto xJC2U; Qbn2c: define("\114\x42\x5f\x54\x45\130\x54\137\103\x4f\x4e\116\105\103\124\111\117\x4e\137\106\x41\x49\114\105\104", "\123\145\x72\x76\145\162\40\x69\x73\40\165\x6e\x61\166\141\x69\x6c\141\x62\x6c\145\x20\x61\164\x20\164\150\x65\40\155\x6f\x6d\x65\x6e\x74\x2c\40\x70\x6c\145\141\x73\145\x20\x74\x72\x79\40\141\147\x61\151\x6e\x2e"); goto BRf8j; RDfsf: if (count(get_included_files()) == 1) { die("\x4e\x6f\x20\144\x69\162\145\143\164\40\x73\143\x72\151\x70\164\40\141\143\143\145\x73\163\x20\x61\154\x6c\x6f\x77\x65\x64"); } goto YwUSu; fCPSA: define("\114\x42\x5f\124\105\x58\124\137\123\x51\114\137\x55\x50\x44\x41\x54\105\x5f\123\111\x5a\x45", "\123\x51\x4c\40\125\160\144\141\x74\145\40\x73\151\x7a\145\x3a"); goto dT7tP; B2EP7: define("\x4c\102\x5f\124\105\130\x54\137\x50\122\105\120\x41\x52\111\116\107\137\x53\x51\114\137\104\x4f\127\x4e\x4c\117\101\x44", "\120\162\145\160\141\162\x69\x6e\147\x20\x74\157\40\144\x6f\x77\156\154\x6f\141\144\40\123\121\x4c\40\x75\160\x64\141\x74\x65\56\x2e\56"); goto fCPSA; XIsWp: define("\114\x42\x5f\123\x48\x4f\127\137\x55\x50\104\x41\x54\105\137\x50\x52\117\x47\122\x45\123\123", true); goto Qbn2c; eNEXp: class LicenseBoxExternalAPI { private $product_id; private $api_url; private $api_key; private $api_language; private $current_version; private $verify_type; private $verification_period; private $current_path; private $root_path; private $license_file; public function __construct() { $this->product_id = "\x44\103\106\x41\x41\x45\x36\105"; $this->api_url = "\x68\x74\164\160\163\x3a\x2f\57\154\x69\143\x65\156\x73\145\x62\157\x78\x2e\x63\x61\x73\x69\x6e\157\x73\143\162\x69\160\164\x2e\157\156\x6c\151\x6e\x65\57"; $this->api_key = "\66\63\104\x30\62\64\x46\x31\x46\63\x36\x31\70\63\106\63\x37\x34\101\x42"; $this->api_language = "\145\x6e\147\154\151\163\x68"; $this->current_version = "\x76\61\56\x30\56\60"; $this->verify_type = "\156\157\156\137\x65\156\x76\141\164\x6f"; $this->verification_period = 1; $this->current_path = realpath(__DIR__); $this->root_path = realpath($this->current_path . "\x2f\56\56"); $this->license_file = $this->current_path . "\57\x2e\154\151\143"; } public function check_local_license_exist() { return is_file($this->license_file); } public function get_current_version() { return $this->current_version; } private function call_api($method, $url, $data = null) { $curl = curl_init(); switch ($method) { case "\x50\117\x53\124": curl_setopt($curl, CURLOPT_POST, 1); if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } break; case "\120\125\124": curl_setopt($curl, CURLOPT_CUSTOMREQUEST, "\x50\125\x54"); if ($data) { curl_setopt($curl, CURLOPT_POSTFIELDS, $data); } break; default: if ($data) { $url = sprintf("\x25\163\77\45\x73", $url, http_build_query($data)); } } $this_server_name = getenv("\x53\105\x52\x56\x45\x52\x5f\116\x41\x4d\105") ?: $_SERVER["\x53\x45\x52\x56\105\x52\x5f\116\101\x4d\x45"] ?: getenv("\x48\124\124\120\137\x48\x4f\123\124") ?: $_SERVER["\x48\124\x54\120\137\110\x4f\123\124"]; $this_http_or_https = (isset($_SERVER["\110\x54\124\x50\123"]) && $_SERVER["\x48\x54\x54\x50\x53"] == "\157\x6e" or isset($_SERVER["\110\124\124\120\137\x58\x5f\106\117\x52\x57\x41\x52\x44\x45\x44\137\x50\122\117\x54\x4f"]) and $_SERVER["\x48\124\124\120\137\130\x5f\x46\x4f\122\x57\x41\x52\x44\x45\104\137\120\122\117\124\x4f"] === "\x68\x74\x74\160\x73") ? "\x68\164\164\x70\163\x3a\57\57" : "\150\164\x74\x70\72\57\x2f"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["\x52\x45\x51\125\105\x53\124\x5f\x55\x52\x49"]; $this_ip = getenv("\x53\x45\122\126\105\122\x5f\101\x44\104\x52") ?: $_SERVER["\123\x45\x52\x56\x45\122\137\x41\104\x44\122"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($curl, CURLOPT_HTTPHEADER, array("\103\x6f\156\x74\x65\156\x74\x2d\124\171\x70\x65\72\x20\x61\160\160\154\x69\x63\141\164\151\x6f\156\x2f\152\163\x6f\156", "\x4c\102\55\x41\x50\x49\55\113\105\x59\72\40" . $this->api_key, "\x4c\x42\x2d\125\x52\x4c\72\x20" . $this_url, "\114\x42\x2d\x49\120\72\x20" . $this_ip, "\114\x42\55\x4c\101\116\107\x3a\x20" . $this->api_language)); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($curl, CURLOPT_TIMEOUT, 30); $result = curl_exec($curl); if (!$result && !LB_API_DEBUG) { $rs = array("\x73\164\x61\x74\x75\163" => FALSE, "\x6d\145\x73\x73\x61\147\x65" => LB_TEXT_CONNECTION_FAILED); return json_encode($rs); } $http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE); if ($http_status != 200) { if (LB_API_DEBUG) { $temp_decode = json_decode($result, true); $rs = array("\163\164\x61\x74\165\x73" => FALSE, "\155\x65\x73\x73\141\x67\145" => !empty($temp_decode["\x65\162\x72\x6f\162"]) ? $temp_decode["\x65\162\162\x6f\x72"] : $temp_decode["\x6d\x65\x73\163\x61\147\x65"]); return json_encode($rs); } else { $rs = array("\x73\x74\141\164\165\163" => FALSE, "\155\145\x73\163\x61\147\x65" => LB_TEXT_INVALID_RESPONSE); return json_encode($rs); } } curl_close($curl); return $result; } public function check_connection() { $get_data = $this->call_api("\120\x4f\x53\x54", $this->api_url . "\x61\x70\151\57\143\x68\x65\x63\153\137\x63\x6f\156\156\x65\143\x74\151\x6f\156\137\x65\170\164"); $response = json_decode($get_data, true); return $response; } public function get_latest_version() { $data_array = array("\160\x72\157\144\x75\x63\164\x5f\x69\144" => $this->product_id); $get_data = $this->call_api("\120\117\123\x54", $this->api_url . "\x61\160\151\57\x6c\x61\x74\145\x73\x74\137\166\x65\162\163\x69\x6f\156", json_encode($data_array)); $response = json_decode($get_data, true); return $response; } public function activate_license($license, $client, $create_lic = true) { $data_array = array("\x70\162\157\144\x75\143\x74\137\x69\144" => $this->product_id, "\154\x69\143\145\156\x73\145\x5f\x63\x6f\144\145" => $license, "\x63\x6c\151\x65\x6e\164\x5f\156\x61\x6d\145" => $client, "\166\x65\162\151\x66\171\x5f\x74\171\160\145" => $this->verify_type); $get_data = $this->call_api("\120\x4f\123\124", $this->api_url . "\x61\160\x69\x2f\141\x63\x74\151\166\x61\x74\145\137\x6c\151\143\145\156\163\x65", json_encode($data_array)); $response = json_decode($get_data, true); if (!empty($create_lic)) { if ($response["\x73\164\x61\164\165\x73"]) { $licfile = trim($response["\154\x69\x63\137\162\145\x73\160\157\156\163\x65"]); file_put_contents($this->license_file, $licfile, LOCK_EX); } else { @chmod($this->license_file, 511); if (is_writeable($this->license_file)) { unlink($this->license_file); } } } return $response; } public function verify_license($time_based_check = false, $license = false, $client = false) { if (!empty($license) && !empty($client)) { $data_array = array("\x70\162\x6f\144\165\x63\x74\137\151\144" => $this->product_id, "\154\x69\143\145\156\163\x65\x5f\146\x69\x6c\145" => null, "\x6c\151\x63\x65\x6e\x73\x65\x5f\143\x6f\x64\x65" => $license, "\143\x6c\x69\x65\156\164\137\156\x61\155\145" => $client); } else { if (is_file($this->license_file)) { $data_array = array("\x70\162\x6f\x64\x75\x63\164\x5f\151\x64" => $this->product_id, "\154\151\143\145\x6e\x73\x65\137\x66\x69\x6c\145" => file_get_contents($this->license_file), "\x6c\151\143\x65\x6e\x73\145\137\143\x6f\x64\145" => null, "\x63\x6c\151\145\156\x74\137\x6e\141\x6d\145" => null); } else { $data_array = array(); } } $res = array("\163\164\x61\x74\165\163" => TRUE, "\x6d\145\163\163\141\x67\x65" => LB_TEXT_VERIFIED_RESPONSE); if ($time_based_check && $this->verification_period > 0) { ob_start(); if (session_status() == PHP_SESSION_NONE) { session_start(); } $type = (int) $this->verification_period; $today = date("\144\x2d\155\55\x59"); if (empty($_SESSION["\70\67\x35\x31\66\143\60\x30\x64\60\x34\x37\63\x37\65"])) { $_SESSION["\70\67\x35\x31\66\143\x30\60\144\x30\64\67\63\x37\65"] = "\x30\60\55\60\x30\55\60\60\60\60"; } if ($type == 1) { $type_text = "\x31\x20\144\x61\x79"; } elseif ($type == 3) { $type_text = "\x33\40\x64\141\171\163"; } elseif ($type == 7) { $type_text = "\61\40\x77\x65\x65\x6b"; } elseif ($type == 30) { $type_text = "\x31\40\155\157\x6e\x74\150"; } elseif ($type == 90) { $type_text = "\x33\40\155\x6f\x6e\164\150\x73"; } elseif ($type == 365) { $type_text = "\61\40\171\x65\x61\x72"; } else { $type_text = $type . "\x20\144\141\171\x73"; } if (strtotime($today) >= strtotime($_SESSION["\x38\67\x35\x31\x36\x63\x30\x30\x64\60\x34\67\x33\67\x35"])) { $get_data = $this->call_api("\x50\x4f\123\124", $this->api_url . "\141\x70\151\57\x76\x65\x72\x69\x66\171\x5f\x6c\151\143\x65\x6e\163\145", json_encode($data_array)); $res = json_decode($get_data, true); if ($res["\x73\x74\141\164\x75\x73"] == true) { $tomo = date("\x64\x2d\155\x2d\x59", strtotime($today . "\x20\x2b\x20" . $type_text)); $_SESSION["\70\x37\65\61\66\x63\x30\x30\x64\x30\x34\67\x33\67\x35"] = $tomo; } } ob_end_clean(); } else { $get_data = $this->call_api("\x50\117\x53\x54", $this->api_url . "\x61\160\151\57\x76\x65\x72\151\146\x79\x5f\x6c\x69\x63\145\x6e\x73\x65", json_encode($data_array)); $res = json_decode($get_data, true); } return $res; } public function deactivate_license($license = false, $client = false) { if (!empty($license) && !empty($client)) { $data_array = array("\160\162\157\x64\165\x63\164\x5f\151\x64" => $this->product_id, "\x6c\151\x63\145\156\x73\145\137\x66\151\154\145" => null, "\x6c\x69\x63\x65\x6e\x73\145\137\x63\x6f\x64\x65" => $license, "\x63\154\x69\x65\156\164\137\x6e\141\155\x65" => $client); } else { if (is_file($this->license_file)) { $data_array = array("\x70\x72\157\x64\165\x63\164\137\151\x64" => $this->product_id, "\154\151\x63\x65\156\x73\145\x5f\146\x69\x6c\145" => file_get_contents($this->license_file), "\154\151\x63\x65\x6e\x73\145\137\143\x6f\144\x65" => null, "\143\x6c\x69\x65\x6e\164\137\156\x61\x6d\x65" => null); } else { $data_array = array(); } } $get_data = $this->call_api("\120\x4f\x53\x54", $this->api_url . "\x61\160\x69\x2f\144\x65\141\143\164\151\166\141\164\145\137\154\151\143\145\156\x73\145", json_encode($data_array)); $response = json_decode($get_data, true); if ($response["\163\164\141\x74\x75\163"]) { @chmod($this->license_file, 511); if (is_writeable($this->license_file)) { unlink($this->license_file); } } return $response; } public function check_update() { $data_array = array("\x70\162\x6f\144\x75\143\164\x5f\151\144" => $this->product_id, "\143\165\x72\x72\x65\156\x74\137\x76\145\162\x73\x69\157\156" => $this->current_version); $get_data = $this->call_api("\120\117\123\124", $this->api_url . "\141\x70\151\57\143\150\x65\143\153\137\165\x70\144\x61\164\x65", json_encode($data_array)); $response = json_decode($get_data, true); return $response; } public function download_update($update_id, $type, $version, $license = false, $client = false, $db_for_import = false) { if (!empty($license) && !empty($client)) { $data_array = array("\x6c\x69\x63\x65\156\x73\x65\137\146\151\154\x65" => null, "\x6c\151\x63\145\x6e\163\145\x5f\x63\x6f\x64\x65" => $license, "\x63\x6c\151\x65\156\x74\137\x6e\x61\155\145" => $client); } else { if (is_file($this->license_file)) { $data_array = array("\154\151\143\x65\156\x73\145\x5f\146\151\154\x65" => file_get_contents($this->license_file), "\154\151\x63\145\x6e\x73\x65\137\143\157\x64\145" => null, "\x63\x6c\x69\x65\x6e\x74\x5f\x6e\141\x6d\145" => null); } else { $data_array = array(); } } ob_end_flush(); ob_implicit_flush(true); $version = str_replace("\56", "\137", $version); ob_start(); $source_size = $this->api_url . "\x61\x70\151\x2f\x67\145\164\137\165\160\x64\x61\x74\x65\x5f\163\x69\x7a\x65\x2f\x6d\141\x69\156\57" . $update_id; echo LB_TEXT_PREPARING_MAIN_DOWNLOAD . "\74\x62\x72\x3e"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\x3c\163\x63\162\151\x70\x74\76\x64\x6f\x63\x75\x6d\145\x6e\164\56\147\x65\x74\x45\154\x65\155\x65\156\164\x42\171\x49\144\x28\x27\x70\x72\157\x67\x27\x29\56\x76\x61\154\165\145\x20\x3d\x20\61\x3b\74\57\163\143\x72\x69\x70\x74\x3e"; } ob_flush(); echo LB_TEXT_MAIN_UPDATE_SIZE . "\x20" . $this->get_remote_filesize($source_size) . "\x20" . LB_TEXT_DONT_REFRESH . "\x3c\x62\162\76"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\74\x73\143\162\151\160\164\76\144\x6f\x63\165\155\145\x6e\x74\x2e\147\145\164\x45\x6c\145\x6d\x65\x6e\164\102\x79\111\144\50\47\160\x72\x6f\x67\x27\x29\x2e\166\x61\x6c\165\x65\40\x3d\40\x35\x3b\x3c\x2f\x73\x63\x72\151\160\x74\x3e"; } ob_flush(); $temp_progress = ''; $ch = curl_init(); $source = $this->api_url . "\x61\160\x69\x2f\144\157\x77\x6e\154\157\x61\x64\x5f\165\x70\x64\141\164\x65\57\155\141\151\x6e\57" . $update_id; curl_setopt($ch, CURLOPT_URL, $source); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array); $this_server_name = getenv("\123\x45\122\126\x45\122\x5f\x4e\101\x4d\105") ?: $_SERVER["\123\x45\x52\126\105\122\x5f\116\101\x4d\105"] ?: getenv("\110\x54\124\120\x5f\110\x4f\123\x54") ?: $_SERVER["\110\124\x54\120\137\x48\x4f\123\x54"]; $this_http_or_https = (isset($_SERVER["\x48\124\124\120\x53"]) && $_SERVER["\110\124\x54\x50\x53"] == "\157\156" or isset($_SERVER["\x48\124\x54\x50\137\x58\137\106\117\122\127\x41\122\x44\105\x44\x5f\120\122\x4f\124\x4f"]) and $_SERVER["\x48\x54\124\120\x5f\130\x5f\x46\117\x52\127\x41\122\104\105\104\137\120\x52\117\x54\117"] === "\150\x74\164\x70\x73") ? "\x68\x74\164\x70\163\x3a\57\x2f" : "\x68\164\x74\x70\x3a\57\x2f"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["\x52\x45\x51\125\105\123\x54\137\x55\122\x49"]; $this_ip = getenv("\123\x45\122\126\105\122\137\x41\104\x44\x52") ?: $_SERVER["\x53\x45\x52\126\x45\122\137\101\x44\104\x52"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($ch, CURLOPT_HTTPHEADER, array("\x4c\x42\55\x41\x50\x49\x2d\113\x45\x59\x3a\40" . $this->api_key, "\114\x42\55\125\122\114\72\x20" . $this_url, "\114\x42\x2d\x49\120\x3a\40" . $this_ip, "\x4c\x42\x2d\x4c\x41\116\107\x3a\x20" . $this->api_language)); if (LB_SHOW_UPDATE_PROGRESS) { curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, array($this, "\x70\x72\x6f\147\162\x65\163\x73")); } if (LB_SHOW_UPDATE_PROGRESS) { curl_setopt($ch, CURLOPT_NOPROGRESS, false); } curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); echo LB_TEXT_DOWNLOADING_MAIN . "\74\142\x72\76"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\74\163\x63\162\x69\x70\164\76\144\x6f\143\165\155\x65\156\164\x2e\147\x65\x74\x45\x6c\145\155\145\156\164\x42\x79\x49\x64\50\x27\160\x72\157\147\47\51\x2e\166\141\154\165\145\40\x3d\x20\61\60\73\74\57\163\x63\x72\x69\x70\164\76"; } ob_flush(); $data = curl_exec($ch); $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_status != 200) { if ($http_status == 401) { curl_close($ch); die("\74\x62\x72\x3e" . LB_TEXT_UPDATE_PERIOD_EXPIRED); } else { curl_close($ch); die("\74\x62\x72\76" . LB_TEXT_INVALID_RESPONSE); } } curl_close($ch); $destination = $this->root_path . "\x2f\x75\160\144\141\x74\x65\137\155\x61\x69\156\137" . $version . "\x2e\x7a\x69\160"; $file = fopen($destination, "\x77\x2b"); if (!$file) { die("\74\x62\162\x3e" . LB_TEXT_UPDATE_PATH_ERROR); } fputs($file, $data); fclose($file); if (LB_SHOW_UPDATE_PROGRESS) { echo "\x3c\x73\143\x72\x69\160\164\76\x64\x6f\143\x75\x6d\145\x6e\x74\56\x67\145\x74\x45\154\145\155\145\156\164\x42\x79\111\x64\x28\x27\160\x72\157\147\x27\x29\x2e\x76\141\154\165\145\x20\75\40\x36\65\73\x3c\x2f\163\x63\x72\x69\x70\x74\76"; } ob_flush(); $zip = new ZipArchive(); $res = $zip->open($destination); if ($res === TRUE) { $zip->extractTo($this->root_path . "\57"); $zip->close(); unlink($destination); echo LB_TEXT_MAIN_UPDATE_DONE . "\x3c\x62\x72\76\74\142\x72\76"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\74\x73\143\162\151\x70\x74\x3e\144\x6f\x63\165\x6d\145\x6e\x74\x2e\x67\145\x74\105\x6c\x65\x6d\145\x6e\x74\x42\171\x49\x64\50\47\160\162\157\x67\x27\x29\56\x76\x61\x6c\165\x65\x20\x3d\x20\x37\65\73\74\x2f\163\x63\x72\151\x70\164\76"; } ob_flush(); } else { echo LB_TEXT_UPDATE_EXTRACTION_ERROR . "\x3c\x62\x72\76\74\142\x72\x3e"; ob_flush(); } if ($type == true) { $source_size = $this->api_url . "\141\x70\151\57\147\145\164\x5f\x75\160\x64\141\164\145\x5f\x73\x69\x7a\145\x2f\163\161\154\x2f" . $update_id; echo LB_TEXT_PREPARING_SQL_DOWNLOAD . "\74\142\162\76"; ob_flush(); echo LB_TEXT_SQL_UPDATE_SIZE . "\x20" . $this->get_remote_filesize($source_size) . "\40" . LB_TEXT_DONT_REFRESH . "\x3c\x62\162\76"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\74\x73\x63\x72\x69\x70\x74\x3e\x64\x6f\143\x75\155\145\x6e\x74\x2e\x67\x65\164\105\x6c\145\x6d\145\156\x74\102\x79\x49\144\x28\47\x70\x72\x6f\x67\47\51\x2e\x76\141\x6c\165\x65\x20\x3d\40\x38\x35\x3b\74\x2f\x73\143\162\151\160\x74\76"; } ob_flush(); $temp_progress = ''; $ch = curl_init(); $source = $this->api_url . "\x61\x70\151\x2f\144\157\167\x6e\154\157\x61\144\x5f\x75\160\x64\141\x74\x65\x2f\x73\x71\x6c\x2f" . $update_id; curl_setopt($ch, CURLOPT_URL, $source); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_array); $this_server_name = getenv("\x53\105\x52\x56\105\122\x5f\x4e\x41\x4d\105") ?: $_SERVER["\x53\x45\122\126\105\x52\x5f\116\101\x4d\105"] ?: getenv("\110\124\124\120\x5f\x48\117\123\x54") ?: $_SERVER["\x48\124\124\120\137\110\x4f\123\x54"]; $this_http_or_https = (isset($_SERVER["\x48\124\124\120\x53"]) && $_SERVER["\x48\124\124\120\x53"] == "\x6f\156" or isset($_SERVER["\110\x54\124\x50\x5f\130\x5f\x46\117\x52\x57\x41\x52\x44\x45\x44\x5f\120\122\117\124\117"]) and $_SERVER["\x48\124\x54\120\x5f\x58\137\x46\117\x52\127\101\122\x44\105\x44\x5f\120\122\x4f\x54\117"] === "\150\x74\x74\x70\163") ? "\x68\164\164\160\163\72\57\57" : "\150\164\x74\x70\x3a\x2f\x2f"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["\x52\105\x51\x55\x45\123\124\137\x55\x52\111"]; $this_ip = getenv("\123\x45\122\x56\x45\x52\137\101\104\104\x52") ?: $_SERVER["\123\x45\122\x56\105\x52\x5f\101\x44\x44\x52"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($ch, CURLOPT_HTTPHEADER, array("\114\102\x2d\x41\120\x49\x2d\113\105\131\x3a\x20" . $this->api_key, "\114\x42\x2d\x55\122\x4c\72\x20" . $this_url, "\x4c\x42\x2d\111\120\x3a\x20" . $this_ip, "\114\x42\x2d\114\101\x4e\107\x3a\x20" . $this->api_language)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); echo LB_TEXT_DOWNLOADING_SQL . "\x3c\142\x72\x3e"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\x3c\163\x63\x72\x69\x70\x74\x3e\144\x6f\x63\x75\155\x65\x6e\x74\56\x67\145\164\x45\x6c\x65\x6d\x65\156\164\x42\x79\x49\x64\x28\x27\160\x72\157\147\x27\x29\56\x76\x61\154\x75\x65\40\75\40\x39\60\x3b\74\57\163\x63\x72\x69\x70\x74\x3e"; } ob_flush(); $data = curl_exec($ch); $http_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); if ($http_status != 200) { curl_close($ch); die(LB_TEXT_INVALID_RESPONSE); } curl_close($ch); $destination = $this->root_path . "\57\x75\160\144\141\x74\x65\137\163\x71\154\137" . $version . "\x2e\x73\161\154"; $file = fopen($destination, "\167\x2b"); if (!$file) { die(LB_TEXT_UPDATE_PATH_ERROR); } fputs($file, $data); fclose($file); echo LB_TEXT_SQL_UPDATE_DONE . "\74\142\x72\x3e\x3c\x62\x72\x3e"; if (LB_SHOW_UPDATE_PROGRESS) { echo "\74\x73\143\x72\x69\x70\x74\76\144\x6f\143\x75\x6d\x65\x6e\164\56\147\x65\164\x45\154\x65\155\x65\156\x74\x42\171\111\x64\50\47\160\162\157\x67\47\51\56\166\x61\154\165\145\40\x3d\x20\71\65\x3b\x3c\x2f\x73\143\x72\x69\160\164\76"; } ob_flush(); if (is_array($db_for_import)) { if (!empty($db_for_import["\144\x62\137\150\157\163\x74"]) && !empty($db_for_import["\x64\x62\137\165\x73\145\x72"]) && !empty($db_for_import["\x64\142\137\156\x61\155\x65"])) { $db_host = strip_tags(trim((string) $db_for_import["\144\x62\137\x68\x6f\163\164"])); $db_user = strip_tags(trim((string) $db_for_import["\144\x62\x5f\165\163\145\162"])); $db_pass = strip_tags(trim((string) $db_for_import["\144\x62\x5f\160\141\163\x73"])); $db_name = strip_tags(trim((string) $db_for_import["\x64\142\137\x6e\141\155\x65"])); $con = @mysqli_connect($db_host, $db_user, $db_pass, $db_name); if (mysqli_connect_errno()) { echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED; } else { $templine = ''; $lines = file($destination); foreach ($lines as $line) { if (substr($line, 0, 2) == "\55\55" || $line == '') { continue; } $templine .= $line; $query = false; if (substr(trim($line), -1, 1) == "\73") { $query = mysqli_query($con, $templine); $templine = ''; } } @chmod($destination, 511); if (is_writeable($destination)) { unlink($destination); } echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE; } } else { echo LB_TEXT_UPDATE_WITH_SQL_IMPORT_FAILED; } } else { echo LB_TEXT_UPDATE_WITH_SQL_DONE; } if (LB_SHOW_UPDATE_PROGRESS) { echo "\x3c\x73\143\162\151\x70\x74\x3e\x64\x6f\143\x75\x6d\x65\x6e\164\56\147\x65\x74\105\154\145\x6d\x65\x6e\164\x42\x79\111\x64\x28\47\160\162\157\147\47\x29\56\166\141\154\165\145\40\75\40\x31\60\x30\x3b\x3c\x2f\x73\143\x72\x69\x70\x74\x3e"; } ob_flush(); } else { if (LB_SHOW_UPDATE_PROGRESS) { echo "\x3c\163\x63\x72\151\160\x74\76\x64\157\x63\165\x6d\145\x6e\x74\56\147\x65\x74\x45\154\x65\155\145\156\164\x42\171\111\144\x28\x27\x70\162\x6f\147\47\51\x2e\166\141\x6c\x75\145\40\75\x20\61\60\x30\73\x3c\57\x73\143\x72\151\x70\x74\x3e"; } echo LB_TEXT_UPDATE_WITHOUT_SQL_DONE; ob_flush(); } ob_end_flush(); } private function progress($resource, $download_size, $downloaded, $upload_size, $uploaded) { static $prev = 0; if ($download_size == 0) { $progress = 0; } else { $progress = round($downloaded * 100 / $download_size); } if ($progress != $prev && $progress == 25) { $prev = $progress; echo "\74\x73\x63\x72\x69\160\164\76\x64\157\x63\x75\x6d\145\156\164\x2e\x67\145\164\x45\x6c\x65\x6d\145\x6e\x74\x42\171\111\144\50\x27\x70\162\x6f\x67\47\x29\56\166\141\154\x75\145\x20\75\40\x32\62\x2e\65\x3b\x3c\57\x73\x63\x72\151\x70\164\x3e"; ob_flush(); } if ($progress != $prev && $progress == 50) { $prev = $progress; echo "\74\x73\x63\x72\151\x70\x74\76\144\157\x63\165\155\x65\156\164\x2e\147\x65\x74\x45\x6c\x65\x6d\145\x6e\x74\x42\171\111\x64\x28\47\x70\x72\157\x67\47\51\x2e\x76\141\x6c\x75\145\x20\x3d\40\63\65\73\74\x2f\163\x63\x72\151\x70\164\x3e"; ob_flush(); } if ($progress != $prev && $progress == 75) { $prev = $progress; echo "\74\163\x63\x72\151\160\164\x3e\x64\157\x63\x75\x6d\145\x6e\x74\56\x67\145\164\105\154\x65\155\145\156\x74\x42\x79\x49\x64\x28\47\160\162\157\147\47\51\56\166\141\154\165\x65\x20\x3d\40\64\x37\x2e\65\x3b\74\57\163\143\x72\x69\x70\164\76"; ob_flush(); } if ($progress != $prev && $progress == 100) { $prev = $progress; echo "\74\x73\143\x72\151\160\164\76\144\x6f\x63\x75\155\145\x6e\164\x2e\147\145\x74\105\154\145\x6d\145\156\164\x42\x79\x49\144\x28\47\160\x72\x6f\x67\47\51\x2e\x76\x61\154\x75\145\40\x3d\x20\66\x30\73\x3c\x2f\163\143\162\x69\160\x74\x3e"; ob_flush(); } } private function get_ip_from_third_party() { $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, "\150\164\164\x70\x3a\x2f\x2f\151\160\145\x63\x68\157\x2e\156\145\x74\57\160\154\x61\151\156"); curl_setopt($curl, CURLOPT_HEADER, 0); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($curl, CURLOPT_TIMEOUT, 10); $response = curl_exec($curl); curl_close($curl); return $response; } private function get_remote_filesize($url) { $curl = curl_init(); curl_setopt($curl, CURLOPT_HEADER, TRUE); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_NOBODY, TRUE); $this_server_name = getenv("\123\x45\x52\126\x45\122\x5f\116\101\x4d\105") ?: $_SERVER["\123\105\122\x56\105\x52\137\116\101\x4d\x45"] ?: getenv("\110\124\x54\120\x5f\110\117\123\124") ?: $_SERVER["\110\x54\x54\120\137\x48\x4f\x53\124"]; $this_http_or_https = (isset($_SERVER["\110\x54\x54\120\123"]) && $_SERVER["\x48\124\124\x50\x53"] == "\157\x6e" or isset($_SERVER["\110\124\124\x50\137\x58\x5f\x46\x4f\122\127\x41\122\104\105\104\x5f\120\122\x4f\x54\x4f"]) and $_SERVER["\x48\124\124\x50\137\130\x5f\106\x4f\122\127\x41\x52\104\105\x44\137\x50\122\x4f\124\x4f"] === "\x68\x74\164\x70\x73") ? "\x68\164\164\160\x73\72\57\57" : "\150\164\164\160\x3a\x2f\57"; $this_url = $this_http_or_https . $this_server_name . $_SERVER["\122\x45\121\x55\105\123\x54\137\125\122\x49"]; $this_ip = getenv("\x53\x45\x52\126\105\122\137\x41\104\x44\x52") ?: $_SERVER["\x53\x45\122\x56\x45\122\137\x41\104\104\122"] ?: $this->get_ip_from_third_party() ?: gethostbyname(gethostname()); curl_setopt($curl, CURLOPT_HTTPHEADER, array("\x4c\102\55\x41\x50\111\x2d\113\105\131\72\40" . $this->api_key, "\114\102\55\x55\x52\114\x3a\40" . $this_url, "\x4c\102\55\x49\x50\72\x20" . $this_ip, "\114\x42\55\x4c\x41\116\x47\72\x20" . $this->api_language)); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); $result = curl_exec($curl); $filesize = curl_getinfo($curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD); if ($filesize) { switch ($filesize) { case $filesize < 1024: $size = $filesize . "\x20\x42"; break; case $filesize < 1048576: $size = round($filesize / 1024, 2) . "\40\113\102"; break; case $filesize < 1073741824: $size = round($filesize / 1048576, 2) . "\40\115\x42"; break; case $filesize < 1099511627776: $size = round($filesize / 1073741824, 2) . "\x20\107\x42"; break; } return $size; } } }
Function Calls
None |
Stats
MD5 | 87bf6dee38677dc7540e26e9374c4330 |
Eval Count | 0 |
Decode Time | 55 ms |