<?php ${"GLOBALS"}["nutxgbuwh"] = "size";
${"GLOBALS"}["neddmcmg"] = "filesize";
${"GLOBALS"}["vugkixw"] = "result";
${"GLOBALS"}["xpoqxmko"] = "prev";
${"GLOBALS"}["zgyqdgub"] = "download_size";
${"GLOBALS"}["muiksonxdqv"] = "progress";
${"GLOBALS"}["sjdieqmx"] = "line";
${"GLOBALS"}["ucrqokuveh"] = "lines";
${"GLOBALS"}["owjeup"] = "templine";
${"GLOBALS"}["dwkgcrnhhif"] = "db_name";
${"GLOBALS"}["xsqsowlea"] = "db_user";
${"GLOBALS"}["ysjlbvjwtms"] = "db_host";
${"GLOBALS"}["cjxsqft"] = "con";
${"GLOBALS"}["npkxbhck"] = "db_pass";
${"GLOBALS"}["wifsnphlun"] = "db_for_import";
${"GLOBALS"}["vdgheg"] = "source";
${"GLOBALS"}["eqnutzze"] = "destination";
${"GLOBALS"}["vehzpkevny"] = "file";
${"GLOBALS"}["mihgclabcnxw"] = "ch";
${"GLOBALS"}["gbbdavw"] = "source_size";
${"GLOBALS"}["pvldyic"] = "update_id";
${"GLOBALS"}["mvcvtndtfh"] = "version";
${"GLOBALS"}["kybhgnnvf"] = "tomo";
${"GLOBALS"}["lxhwohvrogn"] = "type";
${"GLOBALS"}["mebcrwq"] = "type_text";
${"GLOBALS"}["crodjjdbe"] = "today";
${"GLOBALS"}["oxcsjwho"] = "time_based_check";
${"GLOBALS"}["ctpisht"] = "res";
${"GLOBALS"}["txhniz"] = "data_array";
${"GLOBALS"}["fjkehopv"] = "client";
${"GLOBALS"}["mmudpjpcsh"] = "licfile";
${"GLOBALS"}["evyhghtahxa"] = "license";
${"GLOBALS"}["rkgdpdvvt"] = "response";
${"GLOBALS"}["liwqabxw"] = "get_data";
${"GLOBALS"}["nukrwwr"] = "temp_decode";
${"GLOBALS"}["dxmacyo"] = "http_status";
${"GLOBALS"}["asujgruyc"] = "rs";
${"GLOBALS"}["myfwem"] = "url";
${"GLOBALS"}["dvhtfqvwez"] = "this_url";
${"GLOBALS"}["ysvcwhmo"] = "this_ip";
${"GLOBALS"}["grixqgkys"] = "this_http_or_https";
${"GLOBALS"}["qjvoshm"] = "this_server_name";
${"GLOBALS"}["tvcwfb"] = "data";
${"GLOBALS"}["sihjfdhl"] = "curl";
if (count(get_included_files()) == 1) {
exit("No direct script access allowed");
}
define("LB_API_DEBUG", false);
define("LB_SHOW_UPDATE_PROGRESS", true);
define(
"LB_TEXT_CONNECTION_FAILED",
"Server is unavailable at the moment, please try again."
);
define(
"LB_TEXT_INVALID_RESPONSE",
"Server returned an invalid response, please contact support."
);
define("LB_TEXT_VERIFIED_RESPONSE", "Verified! Thanks for purchasing.");
define(
"LB_TEXT_PREPARING_MAIN_DOWNLOAD",
"Preparing to download main update..."
);
define("LB_TEXT_MAIN_UPDATE_SIZE", "Main Update size:");
define("LB_TEXT_DONT_REFRESH", "(Please do not refresh the page).");
define("LB_TEXT_DOWNLOADING_MAIN", "Downloading main update...");
define(
"LB_TEXT_UPDATE_PERIOD_EXPIRED",
"Your update period has ended or your license is invalid, please contact support."
);
define(
"LB_TEXT_UPDATE_PATH_ERROR",
"Folder does not have write permission or the update file path could not be resolved, please contact support."
);
define(
"LB_TEXT_MAIN_UPDATE_DONE",
"Main update files downloaded and extracted."
);
define("LB_TEXT_UPDATE_EXTRACTION_ERROR", "Update zip extraction failed.");
define("LB_TEXT_PREPARING_SQL_DOWNLOAD", "Preparing to download SQL update...");
define("LB_TEXT_SQL_UPDATE_SIZE", "SQL Update size:");
define("LB_TEXT_DOWNLOADING_SQL", "Downloading SQL update...");
define("LB_TEXT_SQL_UPDATE_DONE", "SQL update files downloaded.");
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."
);
define(
"LB_TEXT_UPDATE_WITH_SQL_IMPORT_DONE",
"Application was successfully updated and SQL file was automatically imported."
);
define(
"LB_TEXT_UPDATE_WITH_SQL_DONE",
"Application was successfully updated, please import the downloaded SQL file in your database manually."
);
define(
"LB_TEXT_UPDATE_WITHOUT_SQL_DONE",
"Application was successfully updated, there were no SQL updates."
);
if (!LB_API_DEBUG) {
@ini_set("display_errors", 0);
}
if (
@ini_get("max_execution_time") !== "0" &&
@ini_get("max_execution_time") < 600
) {
@ini_set("max_execution_time", 600);
}
@ini_set("memory_limit", "256M");
class LicenseBoxAPI
{
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 = "98C493DB";
$this->api_url = "https://verify.willdev.in/";
$this->api_key = "CBC67637D49A40853068";
$this->api_language = "english";
$this->current_version = "v1.0.0";
$this->verify_type = "envato";
$this->verification_period = 365;
$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)
{
${"GLOBALS"}["kdtbgjquwv"] = "curl";
${"GLOBALS"}["fpjpgcujyltn"] = "curl";
$lmvfobyy = "method";
${"GLOBALS"}["ucsefslkpd"] = "curl";
$hbavbx = "curl";
${"GLOBALS"}["wtjutixmokc"] = "url";
$bivjntyvjw = "data";
$wppvviptcot = "result";
${"GLOBALS"}["hplfjfuif"] = "curl";
$grdhuyoxfm = "curl";
${"GLOBALS"}["pldyeb"] = "this_url";
$siltcji = "this_ip";
${"GLOBALS"}["hgvcpxtjgwyi"] = "this_http_or_https";
$yqzxhnh = "result";
${${"GLOBALS"}["kdtbgjquwv"]} = curl_init();
$mknlzcvdp = "result";
${"GLOBALS"}["kmejeuxljb"] = "this_server_name";
$uesgeepk = "data";
$opbtvotjhmhp = "data";
$gvrmjjyy = "data";
$kwrpcmk = "url";
switch (${$lmvfobyy}) {
case "POST":
curl_setopt(${${"GLOBALS"}["sihjfdhl"]}, CURLOPT_POST, 1);
if (${$opbtvotjhmhp}) {
curl_setopt(
${${"GLOBALS"}["sihjfdhl"]},
CURLOPT_POSTFIELDS,
${${"GLOBALS"}["tvcwfb"]}
);
}
break;
case "PUT":
curl_setopt(
${${"GLOBALS"}["sihjfdhl"]},
CURLOPT_CUSTOMREQUEST,
"PUT"
);
if (${$gvrmjjyy}) {
curl_setopt(
${${"GLOBALS"}["sihjfdhl"]},
CURLOPT_POSTFIELDS,
${$uesgeepk}
);
}
break;
default:
if (${${"GLOBALS"}["tvcwfb"]}) {
${${"GLOBALS"}["wtjutixmokc"]} = sprintf(
"%s?%s",
${$kwrpcmk},
http_build_query(${$bivjntyvjw})
);
}
}
${${"GLOBALS"}["qjvoshm"]} =
getenv("SERVER_NAME") ?:
$_SERVER["SERVER_NAME"] ?:
getenv("HTTP_HOST") ?:
$_SERVER["HTTP_HOST"];
${${"GLOBALS"}["hgvcpxtjgwyi"]} =
(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on" or
isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) and
$_SERVER["HTTP_X_FORWARDED_PROTO"] === "https")
? "https://"
: "http://";
${${"GLOBALS"}["pldyeb"]} =
${${"GLOBALS"}["grixqgkys"]} .
${${"GLOBALS"}["kmejeuxljb"]} .
$_SERVER["REQUEST_URI"];
${${"GLOBALS"}["ysvcwhmo"]} =
getenv("SERVER_ADDR") ?:
$_SERVER["SERVER_ADDR"] ?:
$this->get_ip_from_third_party() ?:
gethostbyname(gethostname());
curl_setopt(${${"GLOBALS"}["sihjfdhl"]}, CURLOPT_HTTPHEADER, [
"Content-Type: application/json",
"LB-API-KEY: " . $this->api_key,
"LB-URL: " . ${${"GLOBALS"}["dvhtfqvwez"]},
"LB-IP: " . ${$siltcji},
"LB-LANG: " . $this->api_language,
]);
${"GLOBALS"}["iojvtyrh"] = "curl";
curl_setopt(${$grdhuyoxfm}, CURLOPT_URL, ${${"GLOBALS"}["myfwem"]});
curl_setopt(
${${"GLOBALS"}["fpjpgcujyltn"]},
CURLOPT_RETURNTRANSFER,
true
);
curl_setopt(${${"GLOBALS"}["hplfjfuif"]}, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt(${$hbavbx}, CURLOPT_TIMEOUT, 30);
${$mknlzcvdp} = curl_exec(${${"GLOBALS"}["iojvtyrh"]});
if (!${$yqzxhnh} && !LB_API_DEBUG) {
${${"GLOBALS"}["asujgruyc"]} = [
"status" => false,
"message" => LB_TEXT_CONNECTION_FAILED,
];
return json_encode(${${"GLOBALS"}["asujgruyc"]});
}
${${"GLOBALS"}["dxmacyo"]} = curl_getinfo(
${${"GLOBALS"}["sihjfdhl"]},
CURLINFO_HTTP_CODE
);
if (${${"GLOBALS"}["dxmacyo"]} != 200) {
if (LB_API_DEBUG) {
$cntcuiwbvi = "temp_decode";
$jumyehsryqv = "rs";
${"GLOBALS"}["pbkmvjxrxg"] = "result";
$rjqfrxfzqnmf = "temp_decode";
${${"GLOBALS"}["nukrwwr"]} = json_decode(
${${"GLOBALS"}["pbkmvjxrxg"]},
true
);
$qvdeonmyfnr = "temp_decode";
${${"GLOBALS"}["asujgruyc"]} = [
"status" => false,
"message" => !empty(${$rjqfrxfzqnmf}["error"])
? ${$cntcuiwbvi}["error"]
: ${$qvdeonmyfnr}["message"],
];
return json_encode(${$jumyehsryqv});
} else {
${"GLOBALS"}["ynlxxnodox"] = "rs";
${"GLOBALS"}["uxtiwtjhu"] = "rs";
${${"GLOBALS"}["uxtiwtjhu"]} = [
"status" => false,
"message" => LB_TEXT_INVALID_RESPONSE,
];
return json_encode(${${"GLOBALS"}["ynlxxnodox"]});
}
}
curl_close(${${"GLOBALS"}["ucsefslkpd"]});
return ${$wppvviptcot};
}
public function check_connection()
{
${"GLOBALS"}["vrpblgux"] = "data_array";
${${"GLOBALS"}["vrpblgux"]} = [];
${"GLOBALS"}["kalrlc"] = "data_array";
${${"GLOBALS"}["liwqabxw"]} = $this->call_api(
"POST",
$this->api_url . "api/check_connection_ext",
json_encode(${${"GLOBALS"}["kalrlc"]})
);
${"GLOBALS"}["oqqydkoiuff"] = "response";
${${"GLOBALS"}["rkgdpdvvt"]} = json_decode(
${${"GLOBALS"}["liwqabxw"]},
true
);
return ${${"GLOBALS"}["oqqydkoiuff"]};
}
public function get_latest_version()
{
${"GLOBALS"}["nghphvyrjteu"] = "get_data";
${"GLOBALS"}["nnxllvjmfn"] = "response";
${"GLOBALS"}["ehnktk"] = "data_array";
${${"GLOBALS"}["ehnktk"]} = ["product_id" => $this->product_id];
$mpcfschqps = "get_data";
$pkhidrlk = "data_array";
$vuvhydwcy = "response";
${$mpcfschqps} = $this->call_api(
"POST",
$this->api_url . "api/latest_version",
json_encode(${$pkhidrlk})
);
${${"GLOBALS"}["nnxllvjmfn"]} = json_decode(
${${"GLOBALS"}["nghphvyrjteu"]},
true
);
return ${$vuvhydwcy};
}
public function activate_license($license, $client, $create_lic = true)
{
$ucjrwhyepho = "data_array";
$hdikcv = "response";
${"GLOBALS"}["cpbeqkajc"] = "create_lic";
$sgopnybhbon = "get_data";
$iulvtrjhxiz = "data_array";
${"GLOBALS"}["tttctgaj"] = "client";
${$ucjrwhyepho} = [
"product_id" => $this->product_id,
"license_code" => ${${"GLOBALS"}["evyhghtahxa"]},
"client_name" => ${${"GLOBALS"}["tttctgaj"]},
"verify_type" => $this->verify_type,
];
$graqjxef = "response";
${$sgopnybhbon} = $this->call_api(
"POST",
$this->api_url . "api/activate_license",
json_encode(${$iulvtrjhxiz})
);
${$hdikcv} = json_decode(${${"GLOBALS"}["liwqabxw"]}, true);
if (!empty(${${"GLOBALS"}["cpbeqkajc"]})) {
if (${${"GLOBALS"}["rkgdpdvvt"]}["status"]) {
$kplcsmlxd = "licfile";
${$kplcsmlxd} = trim(
${${"GLOBALS"}["rkgdpdvvt"]}["lic_response"]
);
file_put_contents(
$this->license_file,
${${"GLOBALS"}["mmudpjpcsh"]},
LOCK_EX
);
} else {
@chmod($this->license_file, 0777);
if (is_writeable($this->license_file)) {
unlink($this->license_file);
}
}
}
return ${$graqjxef};
}
public function verify_license(
$time_based_check = false,
$license = false,
$client = false
) {
if (
!empty(${${"GLOBALS"}["evyhghtahxa"]}) &&
!empty(${${"GLOBALS"}["fjkehopv"]})
) {
${"GLOBALS"}["mkehpfhrveoz"] = "license";
${${"GLOBALS"}["txhniz"]} = [
"product_id" => $this->product_id,
"license_file" => null,
"license_code" => ${${"GLOBALS"}["mkehpfhrveoz"]},
"client_name" => ${${"GLOBALS"}["fjkehopv"]},
];
} else {
if (is_file($this->license_file)) {
$rtcdgzva = "data_array";
${$rtcdgzva} = [
"product_id" => $this->product_id,
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null,
];
} else {
${${"GLOBALS"}["txhniz"]} = [];
}
}
${${"GLOBALS"}["ctpisht"]} = [
"status" => true,
"message" => LB_TEXT_VERIFIED_RESPONSE,
];
${"GLOBALS"}["rsiwjutmc"] = "res";
if (${${"GLOBALS"}["oxcsjwho"]} && $this->verification_period > 0) {
${"GLOBALS"}["dgqqlqfjuj"] = "type";
$bkkrjrkkh = "type";
ob_start();
${"GLOBALS"}["qoxdesxn"] = "type";
${"GLOBALS"}["pmtevhstk"] = "type";
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
${${"GLOBALS"}["qoxdesxn"]} = (int) $this->verification_period;
${${"GLOBALS"}["crodjjdbe"]} = date("d-m-Y");
if (empty($_SESSION["21e44244ed31f65"])) {
$_SESSION["21e44244ed31f65"] = "00-00-0000";
}
${"GLOBALS"}["vhmsudes"] = "type";
${"GLOBALS"}["pkzvyf"] = "type";
if (${${"GLOBALS"}["dgqqlqfjuj"]} == 1) {
${"GLOBALS"}["hlefrey"] = "type_text";
${${"GLOBALS"}["hlefrey"]} = "1 day";
} elseif (${$bkkrjrkkh} == 3) {
$hrhlmtgemmv = "type_text";
${$hrhlmtgemmv} = "3 days";
} elseif (${${"GLOBALS"}["pmtevhstk"]} == 7) {
${"GLOBALS"}["qcptojdlnegb"] = "type_text";
${${"GLOBALS"}["qcptojdlnegb"]} = "1 week";
} elseif (${${"GLOBALS"}["vhmsudes"]} == 30) {
${${"GLOBALS"}["mebcrwq"]} = "1 month";
} elseif (${${"GLOBALS"}["lxhwohvrogn"]} == 90) {
${${"GLOBALS"}["mebcrwq"]} = "3 months";
} elseif (${${"GLOBALS"}["pkzvyf"]} == 365) {
$mhbzggguo = "type_text";
${$mhbzggguo} = "1 year";
} else {
${"GLOBALS"}["ssvvysyfyfd"] = "type";
${"GLOBALS"}["jxvugcmry"] = "type_text";
${${"GLOBALS"}["jxvugcmry"]} =
${${"GLOBALS"}["ssvvysyfyfd"]} . " days";
}
if (
strtotime(${${"GLOBALS"}["crodjjdbe"]}) >=
strtotime($_SESSION["21e44244ed31f65"])
) {
$eoqdgguvwzv = "data_array";
$rspqhqmfw = "get_data";
${${"GLOBALS"}["liwqabxw"]} = $this->call_api(
"POST",
$this->api_url . "api/verify_license",
json_encode(${$eoqdgguvwzv})
);
${${"GLOBALS"}["ctpisht"]} = json_decode(${$rspqhqmfw}, true);
if (${${"GLOBALS"}["ctpisht"]}["status"] == true) {
$fafmtjsynl = "tomo";
${${"GLOBALS"}["kybhgnnvf"]} = date(
"d-m-Y",
strtotime(
${${"GLOBALS"}["crodjjdbe"]} .
" + " .
${${"GLOBALS"}["mebcrwq"]}
)
);
$_SESSION["21e44244ed31f65"] = ${$fafmtjsynl};
}
}
ob_end_clean();
} else {
${"GLOBALS"}["vlczrihbormt"] = "data_array";
${${"GLOBALS"}["liwqabxw"]} = $this->call_api(
"POST",
$this->api_url . "api/verify_license",
json_encode(${${"GLOBALS"}["vlczrihbormt"]})
);
${${"GLOBALS"}["ctpisht"]} = json_decode(
${${"GLOBALS"}["liwqabxw"]},
true
);
}
return ${${"GLOBALS"}["rsiwjutmc"]};
}
public function deactivate_license($license = false, $client = false)
{
$uywfcnak = "response";
$irslnxdd = "license";
if (!empty(${$irslnxdd}) && !empty(${${"GLOBALS"}["fjkehopv"]})) {
${${"GLOBALS"}["txhniz"]} = [
"product_id" => $this->product_id,
"license_file" => null,
"license_code" => ${${"GLOBALS"}["evyhghtahxa"]},
"client_name" => ${${"GLOBALS"}["fjkehopv"]},
];
} else {
if (is_file($this->license_file)) {
$cscsrwby = "data_array";
${$cscsrwby} = [
"product_id" => $this->product_id,
"license_file" => file_get_contents($this->license_file),
"license_code" => null,
"client_name" => null,
];
} else {
${${"GLOBALS"}["txhniz"]} = [];
}
}
${${"GLOBALS"}["liwqabxw"]} = $this->call_api(
"POST",
$this->api_url . "api/deactivate_license",
json_encode(${${"GLOBALS"}["txhniz"]})
);
${$uywfcnak} = json_decode(${${"GLOBALS"}["liwqabxw"]}, true);
${"GLOBALS"}["nxekrclpjg"] = "response";
if (${${"GLOBALS"}["nxekrclpjg"]}["status"]) {
@chmod($this->license_file, 0777);
if (is_writeable($this->license_file)) {
unlink($this->license_file);
}
}
return ${${"GLOBALS"}["rkgdpdvvt"]};
}