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 namespace MoOauthClient; use MoOauthClient\App; use MoOauthClient\Backup\En..
Decoded Output download
<?php
namespace MoOauthClient;
use MoOauthClient\App;
use MoOauthClient\Backup\EnvVarResolver;
class MOUtils
{
const FREE = 0;
const STANDARD = 1;
const PREMIUM = 2;
const MULTISITE_PREMIUM = 3;
const ENTERPRISE = 4;
const ALL_INCLUSIVE_SINGLE_SITE = 5;
const MULTISITE_ENTERPRISE = 6;
const ALL_INCLUSIVE_MULTISITE = 7;
private $is_multisite = false;
public function __construct()
{
remove_action("admin_notices", array($this, "mo_oauth_success_message"));
remove_action("admin_notices", array($this, "mo_oauth_error_message"));
$this->is_multisite = boolval(get_site_option("mo_oauth_isMultiSitePluginRequested")) ? true : ($this->is_multisite_versi() ? true : false);
}
public function mo_oauth_success_message()
{
$bJ = "error";
$bG = $this->mo_oauth_client_get_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION);
$Eh = array("a" => array("href" => array(), "target" => array()));
echo "<div class='" . esc_attr($bJ) . "'> <p>" . wp_kses($bG, $Eh) . "</p></div>";
}
public function mo_oauth_error_message()
{
$bJ = "updated";
$bG = $this->mo_oauth_client_get_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION);
$Eh = array("a" => array("href" => array(), "target" => array()));
echo "<div class='" . esc_attr($bJ) . "'><p>" . wp_kses($bG, $Eh) . "</p></div>";
}
public function mo_oauth_show_success_message()
{
$aF = is_multisite() && $this->is_multisite_versi() ? "network_" : '';
remove_action("{$aF}admin_notices", array($this, "mo_oauth_success_message"));
add_action("{$aF}admin_notices", array($this, "mo_oauth_error_message"));
}
public function mo_oauth_show_error_message()
{
$aF = is_multisite() && $this->is_multisite_versi() ? "network_" : '';
remove_action("{$aF}admin_notices", array($this, "mo_oauth_error_message"));
add_action("{$aF}admin_notices", array($this, "mo_oauth_success_message"));
}
public function mo_oauth_client_filter_error($oC)
{
$oC = apply_filters("mo_oauth_modify_error", $oC);
return $oC;
}
public function mo_oauth_is_customer_registered()
{
$U2 = $this->mo_oauth_client_get_option("mo_oauth_admin_email");
$Ip = $this->mo_oauth_client_get_option("mo_oauth_admin_customer_key");
if (!$U2 || !$Ip || !is_numeric(trim($Ip))) {
goto DT;
}
return 1;
goto xm;
DT:
return 0;
xm:
}
public function mooauthencrypt($Dx)
{
$FR = $this->mo_oauth_client_get_option("customer_token");
if ($FR) {
goto ox;
}
return "false";
ox:
$FR = str_split(str_pad('', strlen($Dx), $FR, STR_PAD_RIGHT));
$U8 = str_split($Dx);
foreach ($U8 as $IF => $qP) {
$sC = ord($qP) + ord($FR[$IF]);
$U8[$IF] = chr($sC > 255 ? $sC - 256 : $sC);
mi:
}
tV:
return base64_encode(join('', $U8));
}
public function mooauthdecrypt($Dx)
{
$Dx = base64_decode($Dx);
$FR = $this->mo_oauth_client_get_option("customer_token");
if ($FR) {
goto n3;
}
return "false";
n3:
$FR = str_split(str_pad('', strlen($Dx), $FR, STR_PAD_RIGHT));
$U8 = str_split($Dx);
foreach ($U8 as $IF => $qP) {
$sC = ord($qP) - ord($FR[$IF]);
$U8[$IF] = chr($sC < 0 ? $sC + 256 : $sC);
CL:
}
Ai:
return join('', $U8);
}
public function mo_oauth_check_empty_or_null($MA)
{
if (!(!isset($MA) || empty($MA))) {
goto sv;
}
return true;
sv:
return false;
}
public function is_multisite_plan()
{
return $this->is_multisite;
}
public function mo_oauth_is_curl_installed()
{
if (in_array("curl", get_loaded_extensions())) {
goto DS;
}
return 0;
goto YQ;
DS:
return 1;
YQ:
}
public function mo_oauth_show_curl_error()
{
if (!($this->mo_oauth_is_curl_installed() === 0)) {
goto h7;
}
$this->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "<a href="http://php.net/manual/en/curl.installation.php" target="_blank">PHP CURL extension</a> is not installed or disabled. Please enable it to continue.");
$this->mo_oauth_show_error_message();
return;
h7:
}
public function mo_oauth_is_clv()
{
$ob = $this->mo_oauth_client_get_option("mo_oauth_lv");
$ob = boolval($ob) ? $this->mooauthdecrypt($ob) : "false";
$ob = !empty($this->mo_oauth_client_get_option("mo_oauth_lk")) && "true" === $ob ? 1 : 0;
if (!($ob === 0)) {
goto b2;
}
return $this->verify_lk();
b2:
return $ob;
}
public function mo_oauth_is_cld()
{
if (!(empty($this->mo_oauth_client_get_option("mo_oauth_ld")) || empty($this->mo_oauth_client_get_option("customer_token")))) {
goto ay;
}
return 1;
ay:
$ob = $this->mo_oauth_client_get_option("mo_oauth_ld");
$ob = "true" === $this->mooauthdecrypt($ob) ? 1 : 0;
return $ob;
}
public function mo_oauth_hbca_xyake()
{
if ($this->mo_oauth_is_customer_registered()) {
goto J1;
}
return false;
J1:
if ($this->mo_oauth_client_get_option("mo_oauth_admin_customer_key") > 138200) {
goto Bp;
}
return false;
goto JZ;
Bp:
return true;
JZ:
}
public function get_default_app($fw, $F_ = false)
{
if ($fw) {
goto mZ;
}
return false;
mZ:
$LU = false;
$CL = file_get_contents(MOC_DIR . "resources/app_components/defaultapps.json", true);
$qk = json_decode($CL, $F_);
foreach ($qk as $Z0 => $Or) {
if (!($Z0 === $fw)) {
goto xW;
}
if ($F_) {
goto Nm;
}
$Or->appId = $Z0;
goto J7;
Nm:
$Or["appId"] = $Z0;
J7:
return $Or;
xW:
c7:
}
km:
return false;
}
public function get_plugin_config()
{
$mA = $this->mo_oauth_client_get_option("mo_oauth_client_config");
return !$mA || empty($mA) ? new Config(array()) : $mA;
}
public function get_app_list()
{
return $this->mo_oauth_client_get_option("mo_oauth_apps_list") ? $this->mo_oauth_client_get_option("mo_oauth_apps_list") : false;
}
public function get_app_by_name($M1 = '')
{
$Zc = $this->get_app_list();
if ($Zc) {
goto er;
}
return false;
er:
if (!('' === $M1 || false === $M1)) {
goto Na;
}
$q8 = array_values($Zc);
return isset($q8[0]) ? $q8[0] : false;
Na:
foreach ($Zc as $ct => $qg) {
if (!($M1 === $ct)) {
goto Lf;
}
return $qg;
Lf:
if (!((int) $M1 === $ct)) {
goto rq;
}
return $qg;
rq:
AA:
}
at:
return false;
}
public function get_default_app_by_code_name($M1 = '')
{
$Zc = $this->mo_oauth_client_get_option("mo_oauth_apps_list") ? $this->mo_oauth_client_get_option("mo_oauth_apps_list") : false;
if ($Zc) {
goto N2;
}
return false;
N2:
if (!('' === $M1)) {
goto E4;
}
$q8 = array_values($Zc);
return isset($q8[0]) ? $q8[0] : false;
E4:
foreach ($Zc as $ct => $qg) {
$PZ = $qg->get_app_name();
if (!($M1 === $PZ)) {
goto Kd;
}
return $this->get_default_app($qg->get_app_config("app_type"), true);
Kd:
Bv:
}
xk:
return false;
}
public function set_app_by_name($M1, $FX)
{
$Zc = $this->mo_oauth_client_get_option("mo_oauth_apps_list") ? $this->mo_oauth_client_get_option("mo_oauth_apps_list") : false;
if ($Zc) {
goto k9;
}
return false;
k9:
foreach ($Zc as $ct => $qg) {
if (!(gettype($ct) === "integer")) {
goto U8;
}
$ct = strval($ct);
U8:
if (!($M1 === $ct)) {
goto yV;
}
$Zc[$ct] = new App($FX);
$Zc[$ct]->set_app_name($ct);
$this->mo_oauth_client_update_option("mo_oauth_apps_list", $Zc);
return true;
yV:
RK:
}
Cu:
return false;
}
public function mo_oauth_jhuyn_jgsukaj($qu, $d_)
{
return $this->mo_oauth_jkhuiysuayhbw($qu, $d_);
}
public function mo_oauth_jkhuiysuayhbw($HL, $FO)
{
$sV = 0;
$M0 = false;
$OP = $this->mo_oauth_client_get_option("mo_oauth_authorizations");
if (empty($OP)) {
goto jz;
}
$sV = $this->mo_oauth_client_get_option("mo_oauth_authorizations");
jz:
$user = $this->mo_oauth_hjsguh_kiishuyauh878gs($HL, $FO);
if (!$user) {
goto ba;
}
++$sV;
ba:
$this->mo_oauth_client_update_option("mo_oauth_authorizations", $sV);
if (!($sV >= 10)) {
goto rL;
}
$du = base64_decode('base64_decodbW9fb2F1dGhfZmxhZw==');
$this->mo_oauth_client_update_option($du, true);
rL:
return $user;
}
public function mo_oauth_hjsguh_kiishuyauh878gs($U2, $Nh)
{
$E5 = 10;
$Hw = false;
$eM = false;
$mA = apply_filters("mo_oauth_password_policy_manager", $E5);
if (!is_array($mA)) {
goto sC;
}
$E5 = intval($mA["password_length"]);
$Hw = $mA["special_characters"];
$eM = $mA["extra_special_characters"];
sC:
$Og = wp_generate_password($E5, $Hw, $eM);
$o_ = is_email($U2) ? wp_create_user($U2, $Og, $U2) : wp_create_user($U2, $Og);
$eB = array("ID" => $o_, "user_email" => $U2, "user_login" => $Nh, "user_nicename" => $Nh, "first_name" => $Nh);
do_action("user_register", $o_, $eB);
$user = get_user_by("login", $U2);
wp_update_user(array("ID" => $o_, "first_name" => $Nh));
return $user;
}
public function check_versi($S9)
{
return $this->get_versi() >= $S9;
}
public function is_multisite_versi()
{
return $this->get_versi() >= 6 || $this->get_versi() == 3;
}
public function get_versi()
{
return VERSION === "mo_multisite_all_inclusive_version" ? self::ALL_INCLUSIVE_MULTISITE : (VERSION === "mo_multisite_premium_version" ? self::MULTISITE_PREMIUM : (VERSION === "mo_multisite_enterprise_version" ? self::MULTISITE_ENTERPRISE : (VERSION === "mo_all_inclusive_version" ? self::ALL_INCLUSIVE_SINGLE_SITE : (VERSION === "mo_enterprise_version" ? self::ENTERPRISE : (VERSION === "mo_premium_version" ? self::PREMIUM : (VERSION === "mo_standard_version" ? self::STANDARD : self::FREE))))));
}
public function get_plan_type_versi()
{
switch ($this->get_versi()) {
case self::ALL_INCLUSIVE_MULTISITE:
return "ALL_INCLUSIVE_MULTISITE";
case self::MULTISITE_PREMIUM:
return "MULTISITE_PREMIUM";
case self::MULTISITE_ENTERPRISE:
return "MULTISITE_ENTERPRISE";
case self::ALL_INCLUSIVE_SINGLE_SITE:
return "ENTERPRISE";
case self::ENTERPRISE:
return "ENTERPRISE";
case self::PREMIUM:
return '';
case self::STANDARD:
return "STANDARD";
case self::FREE:
default:
return "FREE";
}
XX:
uE:
}
public function get_versi_str()
{
switch ($this->get_versi()) {
case self::ALL_INCLUSIVE_MULTISITE:
return "ALL_INCLUSIVE_MULTISITE";
case self::MULTISITE_PREMIUM:
return "MULTISITE_PREMIUM";
case self::MULTISITE_ENTERPRISE:
return "MULTISITE_ENTERPRISE";
case self::ALL_INCLUSIVE_SINGLE_SITE:
return "ALL_INCLUSIVE_SINGLE_SITE";
case self::ENTERPRISE:
return "ENTERPRISE";
case self::PREMIUM:
return "PREMIUM";
case self::STANDARD:
return "STANDARD";
case self::FREE:
default:
return "FREE";
}
z2:
fA:
}
public function mo_oauth_client_get_option($ct, $qq = false)
{
$MA = getenv(strtoupper($ct));
if (!$MA) {
goto Q_;
}
$MA = EnvVarResolver::resolve_var($ct, $MA);
goto nB;
Q_:
$MA = is_multisite() && $this->is_multisite ? get_site_option($ct, $qq) : get_option($ct, $qq);
nB:
if (!(!$MA || $qq == $MA)) {
goto WO;
}
return $qq;
WO:
return $MA;
}
public function mo_oauth_client_update_option($ct, $MA)
{
return is_multisite() && $this->is_multisite ? update_site_option($ct, $MA) : update_option($ct, $MA);
}
public function mo_oauth_client_delete_option($ct)
{
return is_multisite() && $this->is_multisite ? delete_site_option($ct) : delete_option($ct);
}
public function mo_oauth_client_get_main_domain_name()
{
if (is_multisite()) {
goto NE;
}
$OG = site_url();
goto zz;
NE:
if (defined("DOMAIN_CURRENT_SITE")) {
goto bG;
}
$zN = get_sites();
$ry = get_blog_details("1");
$OG = $ry->domain;
goto D9;
bG:
$OG = DOMAIN_CURRENT_SITE;
D9:
zz:
return $OG;
}
public function array_overwrite($kS, $OM, $wt)
{
if ($wt) {
goto rX;
}
array_push($kS, $OM);
return array_unique($kS);
rX:
foreach ($OM as $ct => $MA) {
$kS[$ct] = $MA;
V1:
}
JN:
return $kS;
}
public function gen_rand_str($E5 = 10)
{
$zw = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
$f3 = strlen($zw);
$GH = '';
$rM = 0;
HU:
if (!($rM < $E5)) {
goto FI;
}
$GH .= $zw[rand(0, $f3 - 1)];
H1:
$rM++;
goto HU;
FI:
return $GH;
}
public function parse_url($W6)
{
$LU = array();
$Tq = explode("?", $W6);
$LU["host"] = $Tq[0];
$LU["query"] = isset($Tq[1]) && '' !== $Tq[1] ? $Tq[1] : '';
if (!(empty($LU["query"]) || '' === $LU["query"])) {
goto Jz;
}
return $LU;
Jz:
$zS = [];
foreach (explode("&", $LU["query"]) as $gF) {
$Tq = explode("=", $gF);
if (!(is_array($Tq) && count($Tq) === 2)) {
goto Wj;
}
$zS[str_replace("amp;", '', $Tq[0])] = $Tq[1];
Wj:
if (!(is_array($Tq) && "state" === $Tq[0])) {
goto fy;
}
$Tq = explode("state=", $gF);
$zS["state"] = $Tq[1];
fy:
aL:
}
aF:
$LU["query"] = is_array($zS) && !empty($zS) ? $zS : [];
return $LU;
}
public function generate_url($XI)
{
if (!(!is_array($XI) || empty($XI))) {
goto lg;
}
return '';
lg:
if (isset($XI["host"])) {
goto dK;
}
return '';
dK:
$W6 = $XI["host"];
$t6 = '';
$rM = 0;
foreach ($XI["query"] as $Lo => $MA) {
if (!($rM !== 0)) {
goto de;
}
$t6 .= "&";
de:
$t6 .= "{$Lo}={$MA}";
$rM += 1;
Od:
}
fQ:
return $W6 . "?" . $t6;
}
public function getnestedattribute($ZN, $ct)
{
if (!($ct == '')) {
goto lG;
}
return '';
lG:
if (!filter_var($ct, FILTER_VALIDATE_URL)) {
goto yI;
}
if (isset($ZN[$ct])) {
goto UD;
}
return '';
goto fd;
UD:
return $ZN[$ct];
fd:
yI:
$gW = explode(".", $ct);
if (count($gW) > 1) {
goto l0;
}
if (isset($ZN[$ct]) && is_array($ZN[$ct])) {
goto iC;
}
$UI = $gW[0];
if (isset($ZN[$UI])) {
goto Jh;
}
return '';
goto bM;
Jh:
if (is_array($ZN[$UI])) {
goto cH;
}
return $ZN[$UI];
goto zk;
cH:
return $ZN[$UI][0];
zk:
bM:
goto cB;
iC:
if (!(count($ZN[$ct]) > 1)) {
goto da;
}
return $ZN[$ct];
da:
if (!isset($ZN[$ct][0])) {
goto mI;
}
return $ZN[$ct][0];
mI:
if (!is_array($ZN[$ct])) {
goto Iz;
}
return array_key_first($ZN[$ct]);
Iz:
cB:
goto Gj;
l0:
$UI = $gW[0];
if (!isset($ZN[$UI])) {
goto zD;
}
$z_ = array_count_values($gW);
if (!($z_[$UI] > 1)) {
goto px;
}
$ct = substr_replace($ct, '', 0, strlen($UI));
$ct = trim($ct, ".");
return $this->getnestedattribute($ZN[$UI], $ct);
px:
return $this->getnestedattribute($ZN[$UI], str_replace($UI . ".", '', $ct));
zD:
Gj:
}
public function get_client_ip()
{
$Tw = '';
if (getenv("HTTP_CLIENT_IP")) {
goto iO;
}
if (getenv("HTTP_X_FORWARDED_FOR")) {
goto T1;
}
if (getenv("HTTP_X_FORWARDED")) {
goto d9;
}
if (getenv("HTTP_FORWARDED_FOR")) {
goto c9;
}
if (getenv("HTTP_FORWARDED")) {
goto dc;
}
if (getenv("REMOTE_ADDR")) {
goto k4;
}
$Tw = "UNKNOWN";
goto vF;
iO:
$Tw = getenv("HTTP_CLIENT_IP");
goto vF;
T1:
$Tw = getenv("HTTP_X_FORWARDED_FOR");
goto vF;
d9:
$Tw = getenv("HTTP_X_FORWARDED");
goto vF;
c9:
$Tw = getenv("HTTP_FORWARDED_FOR");
goto vF;
dc:
$Tw = getenv("HTTP_FORWARDED");
goto vF;
k4:
$Tw = getenv("REMOTE_ADDR");
vF:
return $Tw;
}
public function get_current_url()
{
return (isset($_SERVER["HTTPS"]) ? "https" : "http") . "://{$_SERVER["HTTP_HOST"]}{$_SERVER["REQUEST_URI"]}";
}
public function get_all_headers()
{
$Id = [];
foreach ($_SERVER as $Nh => $MA) {
if (!(substr($Nh, 0, 5) == "HTTP_")) {
goto TF;
}
$Id[str_replace(" ", "-", ucwords(strtolower(str_replace("_", " ", substr($Nh, 5)))))] = $MA;
TF:
SD:
}
CP:
$Id = array_change_key_case($Id, CASE_UPPER);
return $Id;
}
public function store_info($bh = '', $MA = false)
{
if (!('' === $bh || !$MA)) {
goto Qu;
}
return;
Qu:
setcookie($bh, $MA);
}
public function redirect_user($W6 = false, $EF = false)
{
if (!(false === $W6)) {
goto sB;
}
return;
sB:
if (!$EF) {
goto f8;
}
echo "\x9\x9 <script>
\xa \x9 var myWindow = window.open("";
echo esc_url($W6);
echo "", "Test Configuration", "width=600, height=600");
while(1) {\xd\xa \x9 \x9 if(myWindow.closed()) {\xd\xa \x9\x9 \x9$(document).trigger("config_tested");
\xa\x9 \x9 break;
\xa \x9 \x9} else {continue;}\xd\xa \x9 \x9}
</script>
\x9\x9 ";
f8:
echo " <script>\xd
\x9\x9 window.location.replace("";
echo esc_url($W6);
echo "");\xd
\x9 </script>\xd\xa\x9\x9";
exit;
}
public function is_ajax_request()
{
return defined("DOING_AJAX") && DOING_AJAX;
}
public function deactivate_plugin()
{
$this->mo_oauth_client_delete_option("host_name");
$this->mo_oauth_client_delete_option("new_registration");
$this->mo_oauth_client_delete_option("mo_oauth_admin_phone");
$this->mo_oauth_client_delete_option("verify_customer");
$this->mo_oauth_client_delete_option("mo_oauth_admin_customer_key");
$this->mo_oauth_client_delete_option("mo_oauth_admin_api_key");
$this->mo_oauth_client_delete_option("mo_oauth_new_customer");
$this->mo_oauth_client_delete_option("customer_token");
$this->mo_oauth_client_delete_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION);
$this->mo_oauth_client_delete_option("mo_oauth_registration_status");
$this->mo_oauth_client_delete_option("mo_oauth_new_customer");
$this->mo_oauth_client_delete_option("new_registration");
$this->mo_oauth_client_delete_option("mo_oauth_login_icon_custom_height");
$this->mo_oauth_client_delete_option("mo_oauth_login_icon_custom_size");
$this->mo_oauth_client_delete_option("mo_oauth_login_icon_custom_color");
$this->mo_oauth_client_delete_option("mo_oauth_login_icon_custom_boundary");
}
public function base64url_encode($XC)
{
return rtrim(strtr(base64_encode($XC), "+/", "-_"), "=");
}
public function base64url_decode($XC)
{
return base64_decode(str_pad(strtr($XC, "-_", "+/"), strlen($XC) % 4, "=", STR_PAD_RIGHT));
}
function export_plugin_config($kM = false)
{
$xr = [];
$nk = [];
$oE = [];
$xr = $this->get_plugin_config();
$nk = get_site_option("mo_oauth_apps_list");
if (empty($xr)) {
goto DP;
}
$xr = $xr->get_current_config();
DP:
if (!is_array($nk)) {
goto It;
}
foreach ($nk as $Vk => $FX) {
if (!is_array($FX)) {
goto RR;
}
$FX = new App($FX);
RR:
$mG = $FX->get_app_config('', false);
if (!$kM) {
goto Bn;
}
unset($mG["client_id"]);
unset($mG["client_secret"]);
Bn:
$oE[$Vk] = $mG;
nD:
}
bQ:
It:
$J_ = ["plugin_config" => $xr, "app_configs" => $oE];
$J_ = apply_filters("mo_tr_get_license_config", $J_);
return $J_;
}
private function verify_lk()
{
$z5 = new \MoOauthClient\Standard\Customer();
$do = $this->mo_oauth_client_get_option("mo_oauth_license_key");
if (!empty($do)) {
goto P7;
}
return 0;
P7:
$ll = $z5->XfskodsfhHJ($do);
$ll = json_decode($ll, true);
return isset($ll["status"]) && "SUCCESS" === $ll["status"];
}
public function is_valid_jwt($lm = '')
{
$Tq = explode(".", $lm);
if (!(count($Tq) === 3)) {
goto bY;
}
return true;
bY:
return false;
}
public function validate_appslist($Zc)
{
if (is_array($Zc)) {
goto hO;
}
return false;
hO:
foreach ($Zc as $ct => $qg) {
if (!$qg instanceof \MoOauthClient\App) {
goto D3;
}
goto iM;
D3:
return false;
iM:
}
dg:
return true;
}
public function handle_error($oC)
{
do_action("mo_tr_login_errors", $oC);
}
public function set_transient($ct, $MA, $cA)
{
return is_multisite() && $this->is_multisite ? set_site_transient($ct, $MA, $cA) : set_transient($ct, $MA, $cA);
}
public function get_transient($ct)
{
return is_multisite() && $this->is_multisite ? get_site_transient($ct) : get_transient($ct);
}
public function delete_transient($ct)
{
return is_multisite() && $this->is_multisite ? delete_site_transient($ct) : delete_transient($ct);
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace MoOauthClient;
use MoOauthClient\App;
use MoOauthClient\Backup\EnvVarResolver;
class MOUtils
{
const FREE = 0;
const STANDARD = 1;
const PREMIUM = 2;
const MULTISITE_PREMIUM = 3;
const ENTERPRISE = 4;
const ALL_INCLUSIVE_SINGLE_SITE = 5;
const MULTISITE_ENTERPRISE = 6;
const ALL_INCLUSIVE_MULTISITE = 7;
private $is_multisite = false;
public function __construct()
{
remove_action("\141\144\155\151\x6e\137\156\x6f\x74\151\x63\145\x73", array($this, "\x6d\157\x5f\x6f\141\x75\164\x68\137\163\165\143\x63\x65\163\163\x5f\155\145\163\163\141\147\x65"));
remove_action("\x61\x64\x6d\151\156\137\156\x6f\164\151\x63\x65\x73", array($this, "\155\157\137\157\141\165\164\x68\x5f\145\162\x72\157\x72\137\155\x65\163\163\141\x67\145"));
$this->is_multisite = boolval(get_site_option("\x6d\157\137\x6f\x61\x75\x74\150\x5f\x69\163\x4d\x75\154\164\x69\x53\x69\164\145\120\154\x75\147\151\156\122\145\x71\x75\x65\x73\x74\145\x64")) ? true : ($this->is_multisite_versi() ? true : false);
}
public function mo_oauth_success_message()
{
$bJ = "\145\162\x72\157\162";
$bG = $this->mo_oauth_client_get_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION);
$Eh = array("\141" => array("\150\x72\145\146" => array(), "\164\141\162\147\145\x74" => array()));
echo "\x3c\144\x69\166\40\x63\x6c\141\163\x73\75\x27" . esc_attr($bJ) . "\47\76\40\x3c\x70\x3e" . wp_kses($bG, $Eh) . "\x3c\x2f\x70\76\74\57\x64\151\x76\76";
}
public function mo_oauth_error_message()
{
$bJ = "\x75\x70\x64\x61\x74\145\x64";
$bG = $this->mo_oauth_client_get_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION);
$Eh = array("\x61" => array("\x68\162\x65\x66" => array(), "\x74\141\162\x67\145\164" => array()));
echo "\74\x64\151\166\40\143\x6c\x61\x73\163\x3d\x27" . esc_attr($bJ) . "\x27\x3e\74\160\76" . wp_kses($bG, $Eh) . "\x3c\x2f\160\x3e\x3c\x2f\x64\151\166\76";
}
public function mo_oauth_show_success_message()
{
$aF = is_multisite() && $this->is_multisite_versi() ? "\156\x65\x74\167\x6f\x72\153\137" : '';
remove_action("{$aF}\141\144\x6d\151\x6e\x5f\156\x6f\164\x69\143\145\163", array($this, "\155\x6f\x5f\157\x61\x75\x74\x68\x5f\163\x75\143\x63\145\163\x73\x5f\x6d\x65\163\163\141\x67\145"));
add_action("{$aF}\x61\144\x6d\151\156\x5f\x6e\157\x74\151\143\145\x73", array($this, "\x6d\157\x5f\157\141\x75\x74\x68\137\145\162\x72\x6f\162\x5f\155\145\x73\163\x61\x67\x65"));
}
public function mo_oauth_show_error_message()
{
$aF = is_multisite() && $this->is_multisite_versi() ? "\156\x65\164\x77\x6f\162\x6b\137" : '';
remove_action("{$aF}\x61\x64\x6d\x69\x6e\x5f\156\x6f\164\x69\x63\145\x73", array($this, "\155\157\137\157\141\165\164\150\x5f\x65\162\162\x6f\162\x5f\x6d\x65\x73\163\x61\x67\145"));
add_action("{$aF}\x61\144\155\x69\156\137\156\x6f\164\x69\143\x65\163", array($this, "\155\157\x5f\x6f\141\x75\164\150\137\x73\165\143\x63\x65\x73\163\x5f\x6d\145\x73\163\x61\x67\x65"));
}
public function mo_oauth_client_filter_error($oC)
{
$oC = apply_filters("\x6d\x6f\137\x6f\141\165\164\x68\137\155\157\x64\151\146\x79\137\x65\x72\162\157\x72", $oC);
return $oC;
}
public function mo_oauth_is_customer_registered()
{
$U2 = $this->mo_oauth_client_get_option("\x6d\157\137\157\x61\165\164\x68\x5f\x61\x64\155\151\x6e\137\145\155\x61\x69\154");
$Ip = $this->mo_oauth_client_get_option("\155\157\x5f\x6f\141\x75\164\150\x5f\141\144\x6d\151\156\137\143\x75\x73\164\x6f\155\145\162\x5f\x6b\x65\171");
if (!$U2 || !$Ip || !is_numeric(trim($Ip))) {
goto DT;
}
return 1;
goto xm;
DT:
return 0;
xm:
}
public function mooauthencrypt($Dx)
{
$FR = $this->mo_oauth_client_get_option("\143\x75\x73\164\x6f\155\145\162\137\x74\x6f\x6b\145\x6e");
if ($FR) {
goto ox;
}
return "\146\x61\154\x73\145";
ox:
$FR = str_split(str_pad('', strlen($Dx), $FR, STR_PAD_RIGHT));
$U8 = str_split($Dx);
foreach ($U8 as $IF => $qP) {
$sC = ord($qP) + ord($FR[$IF]);
$U8[$IF] = chr($sC > 255 ? $sC - 256 : $sC);
mi:
}
tV:
return base64_encode(join('', $U8));
}
public function mooauthdecrypt($Dx)
{
$Dx = base64_decode($Dx);
$FR = $this->mo_oauth_client_get_option("\143\x75\163\164\x6f\x6d\x65\x72\x5f\164\157\153\x65\x6e");
if ($FR) {
goto n3;
}
return "\146\x61\154\x73\x65";
n3:
$FR = str_split(str_pad('', strlen($Dx), $FR, STR_PAD_RIGHT));
$U8 = str_split($Dx);
foreach ($U8 as $IF => $qP) {
$sC = ord($qP) - ord($FR[$IF]);
$U8[$IF] = chr($sC < 0 ? $sC + 256 : $sC);
CL:
}
Ai:
return join('', $U8);
}
public function mo_oauth_check_empty_or_null($MA)
{
if (!(!isset($MA) || empty($MA))) {
goto sv;
}
return true;
sv:
return false;
}
public function is_multisite_plan()
{
return $this->is_multisite;
}
public function mo_oauth_is_curl_installed()
{
if (in_array("\x63\x75\x72\x6c", get_loaded_extensions())) {
goto DS;
}
return 0;
goto YQ;
DS:
return 1;
YQ:
}
public function mo_oauth_show_curl_error()
{
if (!($this->mo_oauth_is_curl_installed() === 0)) {
goto h7;
}
$this->mo_oauth_client_update_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION, "\x3c\x61\x20\x68\162\x65\x66\75\42\150\x74\164\160\x3a\x2f\57\x70\150\x70\x2e\156\145\x74\x2f\x6d\x61\x6e\x75\x61\x6c\57\145\156\57\x63\165\162\154\56\x69\156\163\164\x61\x6c\x6c\x61\164\x69\157\156\x2e\x70\x68\x70\x22\40\164\x61\162\x67\145\164\75\x22\137\x62\x6c\x61\156\153\42\x3e\x50\x48\120\x20\x43\x55\x52\x4c\40\145\170\164\145\156\x73\x69\x6f\x6e\x3c\57\141\76\40\151\x73\x20\156\x6f\164\x20\151\x6e\x73\x74\x61\x6c\154\x65\144\x20\x6f\x72\40\144\151\163\141\142\154\145\144\56\40\x50\154\145\141\x73\145\40\145\156\141\x62\154\145\x20\x69\164\40\x74\x6f\40\x63\x6f\156\x74\151\x6e\165\145\56");
$this->mo_oauth_show_error_message();
return;
h7:
}
public function mo_oauth_is_clv()
{
$ob = $this->mo_oauth_client_get_option("\x6d\x6f\137\157\x61\165\x74\150\x5f\x6c\166");
$ob = boolval($ob) ? $this->mooauthdecrypt($ob) : "\x66\x61\x6c\x73\x65";
$ob = !empty($this->mo_oauth_client_get_option("\x6d\x6f\x5f\x6f\x61\165\x74\150\137\x6c\x6b")) && "\164\162\x75\x65" === $ob ? 1 : 0;
if (!($ob === 0)) {
goto b2;
}
return $this->verify_lk();
b2:
return $ob;
}
public function mo_oauth_is_cld()
{
if (!(empty($this->mo_oauth_client_get_option("\155\157\137\x6f\141\x75\x74\150\x5f\154\x64")) || empty($this->mo_oauth_client_get_option("\x63\165\x73\x74\157\155\x65\x72\137\164\157\x6b\x65\x6e")))) {
goto ay;
}
return 1;
ay:
$ob = $this->mo_oauth_client_get_option("\155\x6f\137\x6f\141\165\164\150\137\154\x64");
$ob = "\164\x72\x75\x65" === $this->mooauthdecrypt($ob) ? 1 : 0;
return $ob;
}
public function mo_oauth_hbca_xyake()
{
if ($this->mo_oauth_is_customer_registered()) {
goto J1;
}
return false;
J1:
if ($this->mo_oauth_client_get_option("\155\157\x5f\x6f\x61\x75\164\x68\x5f\141\x64\155\151\x6e\137\x63\x75\x73\x74\157\x6d\x65\162\x5f\153\145\171") > 138200) {
goto Bp;
}
return false;
goto JZ;
Bp:
return true;
JZ:
}
public function get_default_app($fw, $F_ = false)
{
if ($fw) {
goto mZ;
}
return false;
mZ:
$LU = false;
$CL = file_get_contents(MOC_DIR . "\162\145\x73\x6f\165\x72\143\145\163\57\141\160\160\137\x63\x6f\155\x70\x6f\156\x65\156\164\163\x2f\x64\145\x66\x61\165\154\x74\141\160\160\163\x2e\152\163\157\x6e", true);
$qk = json_decode($CL, $F_);
foreach ($qk as $Z0 => $Or) {
if (!($Z0 === $fw)) {
goto xW;
}
if ($F_) {
goto Nm;
}
$Or->appId = $Z0;
goto J7;
Nm:
$Or["\141\160\160\x49\144"] = $Z0;
J7:
return $Or;
xW:
c7:
}
km:
return false;
}
public function get_plugin_config()
{
$mA = $this->mo_oauth_client_get_option("\155\x6f\137\x6f\x61\165\x74\150\137\x63\x6c\151\x65\156\164\x5f\143\157\x6e\146\x69\147");
return !$mA || empty($mA) ? new Config(array()) : $mA;
}
public function get_app_list()
{
return $this->mo_oauth_client_get_option("\155\x6f\137\x6f\x61\x75\x74\x68\x5f\x61\160\x70\x73\137\x6c\151\163\164") ? $this->mo_oauth_client_get_option("\155\x6f\x5f\157\141\x75\x74\150\137\x61\x70\x70\x73\x5f\154\151\163\x74") : false;
}
public function get_app_by_name($M1 = '')
{
$Zc = $this->get_app_list();
if ($Zc) {
goto er;
}
return false;
er:
if (!('' === $M1 || false === $M1)) {
goto Na;
}
$q8 = array_values($Zc);
return isset($q8[0]) ? $q8[0] : false;
Na:
foreach ($Zc as $ct => $qg) {
if (!($M1 === $ct)) {
goto Lf;
}
return $qg;
Lf:
if (!((int) $M1 === $ct)) {
goto rq;
}
return $qg;
rq:
AA:
}
at:
return false;
}
public function get_default_app_by_code_name($M1 = '')
{
$Zc = $this->mo_oauth_client_get_option("\155\x6f\137\x6f\141\x75\164\x68\137\x61\160\x70\163\137\154\151\163\x74") ? $this->mo_oauth_client_get_option("\155\x6f\137\x6f\x61\165\x74\150\137\141\x70\x70\163\137\154\x69\x73\x74") : false;
if ($Zc) {
goto N2;
}
return false;
N2:
if (!('' === $M1)) {
goto E4;
}
$q8 = array_values($Zc);
return isset($q8[0]) ? $q8[0] : false;
E4:
foreach ($Zc as $ct => $qg) {
$PZ = $qg->get_app_name();
if (!($M1 === $PZ)) {
goto Kd;
}
return $this->get_default_app($qg->get_app_config("\141\160\x70\137\x74\x79\160\x65"), true);
Kd:
Bv:
}
xk:
return false;
}
public function set_app_by_name($M1, $FX)
{
$Zc = $this->mo_oauth_client_get_option("\155\157\x5f\x6f\x61\165\164\150\x5f\x61\160\x70\x73\x5f\154\151\163\x74") ? $this->mo_oauth_client_get_option("\155\x6f\x5f\x6f\x61\165\x74\150\137\141\160\160\163\137\x6c\151\163\x74") : false;
if ($Zc) {
goto k9;
}
return false;
k9:
foreach ($Zc as $ct => $qg) {
if (!(gettype($ct) === "\x69\x6e\164\145\147\x65\x72")) {
goto U8;
}
$ct = strval($ct);
U8:
if (!($M1 === $ct)) {
goto yV;
}
$Zc[$ct] = new App($FX);
$Zc[$ct]->set_app_name($ct);
$this->mo_oauth_client_update_option("\155\157\x5f\x6f\141\165\x74\150\137\141\x70\160\x73\x5f\x6c\x69\163\x74", $Zc);
return true;
yV:
RK:
}
Cu:
return false;
}
public function mo_oauth_jhuyn_jgsukaj($qu, $d_)
{
return $this->mo_oauth_jkhuiysuayhbw($qu, $d_);
}
public function mo_oauth_jkhuiysuayhbw($HL, $FO)
{
$sV = 0;
$M0 = false;
$OP = $this->mo_oauth_client_get_option("\x6d\x6f\x5f\x6f\141\x75\x74\x68\137\141\165\164\x68\157\162\151\x7a\141\164\x69\x6f\x6e\163");
if (empty($OP)) {
goto jz;
}
$sV = $this->mo_oauth_client_get_option("\155\x6f\137\x6f\x61\165\164\x68\x5f\141\165\x74\x68\157\162\x69\172\141\164\151\157\x6e\163");
jz:
$user = $this->mo_oauth_hjsguh_kiishuyauh878gs($HL, $FO);
if (!$user) {
goto ba;
}
++$sV;
ba:
$this->mo_oauth_client_update_option("\x6d\x6f\137\157\141\165\x74\150\137\x61\165\164\x68\157\162\x69\x7a\141\164\x69\x6f\x6e\163", $sV);
if (!($sV >= 10)) {
goto rL;
}
$du = base64_decode('base64_decodbW9fb2F1dGhfZmxhZw==');
$this->mo_oauth_client_update_option($du, true);
rL:
return $user;
}
public function mo_oauth_hjsguh_kiishuyauh878gs($U2, $Nh)
{
$E5 = 10;
$Hw = false;
$eM = false;
$mA = apply_filters("\155\157\x5f\x6f\x61\x75\x74\x68\137\160\141\163\x73\167\157\162\x64\137\x70\157\x6c\x69\x63\x79\137\x6d\x61\x6e\x61\x67\x65\162", $E5);
if (!is_array($mA)) {
goto sC;
}
$E5 = intval($mA["\160\x61\163\163\x77\x6f\x72\144\x5f\x6c\x65\156\x67\x74\x68"]);
$Hw = $mA["\x73\x70\x65\143\x69\x61\x6c\137\x63\150\141\x72\x61\143\164\145\x72\163"];
$eM = $mA["\145\170\x74\162\141\x5f\x73\x70\145\x63\x69\141\154\x5f\x63\x68\141\162\141\x63\164\x65\162\x73"];
sC:
$Og = wp_generate_password($E5, $Hw, $eM);
$o_ = is_email($U2) ? wp_create_user($U2, $Og, $U2) : wp_create_user($U2, $Og);
$eB = array("\111\104" => $o_, "\x75\163\x65\162\x5f\x65\x6d\x61\151\154" => $U2, "\x75\163\x65\162\x5f\x6c\x6f\x67\151\x6e" => $Nh, "\165\x73\x65\162\x5f\156\x69\x63\145\x6e\141\x6d\145" => $Nh, "\x66\151\162\163\164\137\156\141\x6d\145" => $Nh);
do_action("\165\163\x65\x72\137\162\145\147\x69\163\164\x65\162", $o_, $eB);
$user = get_user_by("\x6c\157\147\151\x6e", $U2);
wp_update_user(array("\x49\104" => $o_, "\146\151\162\163\164\137\156\x61\x6d\x65" => $Nh));
return $user;
}
public function check_versi($S9)
{
return $this->get_versi() >= $S9;
}
public function is_multisite_versi()
{
return $this->get_versi() >= 6 || $this->get_versi() == 3;
}
public function get_versi()
{
return VERSION === "\155\157\x5f\x6d\165\154\164\151\163\151\x74\145\x5f\x61\x6c\154\x5f\151\156\x63\x6c\165\x73\151\x76\145\x5f\x76\x65\162\163\x69\157\156" ? self::ALL_INCLUSIVE_MULTISITE : (VERSION === "\x6d\157\137\155\165\154\x74\x69\x73\151\x74\x65\137\x70\162\145\155\151\165\155\137\166\145\162\x73\151\x6f\x6e" ? self::MULTISITE_PREMIUM : (VERSION === "\155\x6f\x5f\x6d\165\154\164\151\163\151\164\x65\137\145\156\x74\x65\162\160\x72\151\163\145\x5f\x76\145\162\163\151\157\156" ? self::MULTISITE_ENTERPRISE : (VERSION === "\155\157\137\141\x6c\154\137\x69\x6e\x63\x6c\165\x73\x69\166\x65\x5f\x76\145\162\163\151\x6f\x6e" ? self::ALL_INCLUSIVE_SINGLE_SITE : (VERSION === "\x6d\x6f\x5f\145\156\164\145\162\x70\x72\151\163\x65\137\x76\145\162\x73\151\157\x6e" ? self::ENTERPRISE : (VERSION === "\x6d\x6f\x5f\160\x72\145\x6d\151\165\155\137\166\145\162\163\x69\x6f\x6e" ? self::PREMIUM : (VERSION === "\155\x6f\x5f\163\x74\141\156\144\141\x72\x64\137\166\x65\162\x73\151\157\x6e" ? self::STANDARD : self::FREE))))));
}
public function get_plan_type_versi()
{
switch ($this->get_versi()) {
case self::ALL_INCLUSIVE_MULTISITE:
return "\101\114\x4c\137\x49\116\103\114\x55\x53\x49\126\105\137\x4d\125\x4c\x54\111\x53\x49\x54\105";
case self::MULTISITE_PREMIUM:
return "\115\125\x4c\x54\x49\123\111\x54\x45\x5f\x50\x52\105\115\x49\x55\115";
case self::MULTISITE_ENTERPRISE:
return "\115\125\x4c\124\111\123\x49\x54\105\137\105\x4e\x54\x45\x52\120\x52\111\x53\105";
case self::ALL_INCLUSIVE_SINGLE_SITE:
return "\105\116\124\x45\122\120\122\111\x53\105";
case self::ENTERPRISE:
return "\105\116\x54\x45\122\120\122\x49\123\x45";
case self::PREMIUM:
return '';
case self::STANDARD:
return "\x53\124\101\116\104\x41\x52\x44";
case self::FREE:
default:
return "\106\x52\x45\x45";
}
XX:
uE:
}
public function get_versi_str()
{
switch ($this->get_versi()) {
case self::ALL_INCLUSIVE_MULTISITE:
return "\x41\114\x4c\137\111\x4e\103\x4c\125\x53\111\126\105\x5f\115\125\114\124\111\x53\x49\124\x45";
case self::MULTISITE_PREMIUM:
return "\115\x55\114\x54\111\123\111\x54\x45\137\120\122\x45\x4d\x49\125\115";
case self::MULTISITE_ENTERPRISE:
return "\x4d\x55\x4c\124\111\x53\111\124\x45\137\x45\116\124\x45\x52\120\122\x49\x53\105";
case self::ALL_INCLUSIVE_SINGLE_SITE:
return "\101\x4c\114\137\111\x4e\x43\x4c\x55\123\x49\126\105\x5f\123\111\116\107\114\x45\x5f\123\111\x54\105";
case self::ENTERPRISE:
return "\105\116\124\x45\122\120\x52\111\123\x45";
case self::PREMIUM:
return "\120\122\x45\115\x49\x55\115";
case self::STANDARD:
return "\x53\124\x41\116\104\x41\122\104";
case self::FREE:
default:
return "\x46\x52\x45\x45";
}
z2:
fA:
}
public function mo_oauth_client_get_option($ct, $qq = false)
{
$MA = getenv(strtoupper($ct));
if (!$MA) {
goto Q_;
}
$MA = EnvVarResolver::resolve_var($ct, $MA);
goto nB;
Q_:
$MA = is_multisite() && $this->is_multisite ? get_site_option($ct, $qq) : get_option($ct, $qq);
nB:
if (!(!$MA || $qq == $MA)) {
goto WO;
}
return $qq;
WO:
return $MA;
}
public function mo_oauth_client_update_option($ct, $MA)
{
return is_multisite() && $this->is_multisite ? update_site_option($ct, $MA) : update_option($ct, $MA);
}
public function mo_oauth_client_delete_option($ct)
{
return is_multisite() && $this->is_multisite ? delete_site_option($ct) : delete_option($ct);
}
public function mo_oauth_client_get_main_domain_name()
{
if (is_multisite()) {
goto NE;
}
$OG = site_url();
goto zz;
NE:
if (defined("\x44\x4f\x4d\x41\111\116\137\103\x55\x52\122\x45\x4e\x54\x5f\123\111\124\x45")) {
goto bG;
}
$zN = get_sites();
$ry = get_blog_details("\61");
$OG = $ry->domain;
goto D9;
bG:
$OG = DOMAIN_CURRENT_SITE;
D9:
zz:
return $OG;
}
public function array_overwrite($kS, $OM, $wt)
{
if ($wt) {
goto rX;
}
array_push($kS, $OM);
return array_unique($kS);
rX:
foreach ($OM as $ct => $MA) {
$kS[$ct] = $MA;
V1:
}
JN:
return $kS;
}
public function gen_rand_str($E5 = 10)
{
$zw = "\x61\142\x63\144\x65\146\147\150\x69\x6a\153\x6c\155\156\x6f\160\161\162\163\164\165\166\x77\170\x79\x7a\x41\x42\103\x44\105\106\107\x48\111\x4a\113\x4c\115\x4e\x4f\120\121\x52\x53\124\125\126\127\x58\x59\132";
$f3 = strlen($zw);
$GH = '';
$rM = 0;
HU:
if (!($rM < $E5)) {
goto FI;
}
$GH .= $zw[rand(0, $f3 - 1)];
H1:
$rM++;
goto HU;
FI:
return $GH;
}
public function parse_url($W6)
{
$LU = array();
$Tq = explode("\x3f", $W6);
$LU["\x68\157\163\164"] = $Tq[0];
$LU["\x71\x75\145\x72\171"] = isset($Tq[1]) && '' !== $Tq[1] ? $Tq[1] : '';
if (!(empty($LU["\161\x75\145\162\x79"]) || '' === $LU["\161\x75\145\162\171"])) {
goto Jz;
}
return $LU;
Jz:
$zS = [];
foreach (explode("\46", $LU["\161\165\x65\162\x79"]) as $gF) {
$Tq = explode("\x3d", $gF);
if (!(is_array($Tq) && count($Tq) === 2)) {
goto Wj;
}
$zS[str_replace("\141\155\x70\x3b", '', $Tq[0])] = $Tq[1];
Wj:
if (!(is_array($Tq) && "\163\x74\141\x74\x65" === $Tq[0])) {
goto fy;
}
$Tq = explode("\163\164\x61\164\145\75", $gF);
$zS["\x73\164\x61\x74\145"] = $Tq[1];
fy:
aL:
}
aF:
$LU["\161\x75\x65\162\171"] = is_array($zS) && !empty($zS) ? $zS : [];
return $LU;
}
public function generate_url($XI)
{
if (!(!is_array($XI) || empty($XI))) {
goto lg;
}
return '';
lg:
if (isset($XI["\x68\x6f\x73\164"])) {
goto dK;
}
return '';
dK:
$W6 = $XI["\150\x6f\x73\164"];
$t6 = '';
$rM = 0;
foreach ($XI["\161\165\145\x72\171"] as $Lo => $MA) {
if (!($rM !== 0)) {
goto de;
}
$t6 .= "\46";
de:
$t6 .= "{$Lo}\x3d{$MA}";
$rM += 1;
Od:
}
fQ:
return $W6 . "\77" . $t6;
}
public function getnestedattribute($ZN, $ct)
{
if (!($ct == '')) {
goto lG;
}
return '';
lG:
if (!filter_var($ct, FILTER_VALIDATE_URL)) {
goto yI;
}
if (isset($ZN[$ct])) {
goto UD;
}
return '';
goto fd;
UD:
return $ZN[$ct];
fd:
yI:
$gW = explode("\x2e", $ct);
if (count($gW) > 1) {
goto l0;
}
if (isset($ZN[$ct]) && is_array($ZN[$ct])) {
goto iC;
}
$UI = $gW[0];
if (isset($ZN[$UI])) {
goto Jh;
}
return '';
goto bM;
Jh:
if (is_array($ZN[$UI])) {
goto cH;
}
return $ZN[$UI];
goto zk;
cH:
return $ZN[$UI][0];
zk:
bM:
goto cB;
iC:
if (!(count($ZN[$ct]) > 1)) {
goto da;
}
return $ZN[$ct];
da:
if (!isset($ZN[$ct][0])) {
goto mI;
}
return $ZN[$ct][0];
mI:
if (!is_array($ZN[$ct])) {
goto Iz;
}
return array_key_first($ZN[$ct]);
Iz:
cB:
goto Gj;
l0:
$UI = $gW[0];
if (!isset($ZN[$UI])) {
goto zD;
}
$z_ = array_count_values($gW);
if (!($z_[$UI] > 1)) {
goto px;
}
$ct = substr_replace($ct, '', 0, strlen($UI));
$ct = trim($ct, "\x2e");
return $this->getnestedattribute($ZN[$UI], $ct);
px:
return $this->getnestedattribute($ZN[$UI], str_replace($UI . "\56", '', $ct));
zD:
Gj:
}
public function get_client_ip()
{
$Tw = '';
if (getenv("\110\x54\x54\120\137\x43\114\x49\x45\116\x54\x5f\111\120")) {
goto iO;
}
if (getenv("\x48\x54\x54\x50\137\130\137\x46\117\x52\x57\101\x52\x44\105\x44\x5f\x46\x4f\x52")) {
goto T1;
}
if (getenv("\110\124\x54\120\x5f\x58\x5f\106\x4f\x52\x57\x41\122\x44\x45\x44")) {
goto d9;
}
if (getenv("\x48\x54\x54\x50\x5f\x46\117\122\127\101\122\x44\105\x44\137\106\x4f\x52")) {
goto c9;
}
if (getenv("\110\x54\x54\x50\137\106\x4f\x52\127\101\122\x44\x45\x44")) {
goto dc;
}
if (getenv("\x52\105\115\117\124\105\137\101\x44\x44\122")) {
goto k4;
}
$Tw = "\125\116\113\x4e\x4f\x57\x4e";
goto vF;
iO:
$Tw = getenv("\110\x54\124\120\x5f\x43\x4c\111\105\x4e\x54\x5f\111\x50");
goto vF;
T1:
$Tw = getenv("\110\x54\x54\x50\137\x58\137\106\x4f\x52\x57\x41\122\104\105\x44\137\x46\x4f\122");
goto vF;
d9:
$Tw = getenv("\x48\124\x54\x50\x5f\130\x5f\x46\x4f\x52\127\x41\x52\104\x45\x44");
goto vF;
c9:
$Tw = getenv("\x48\124\124\x50\137\106\x4f\x52\x57\101\122\104\x45\x44\137\106\117\x52");
goto vF;
dc:
$Tw = getenv("\110\x54\x54\x50\137\x46\117\122\127\101\x52\104\105\104");
goto vF;
k4:
$Tw = getenv("\122\105\x4d\117\x54\x45\x5f\101\104\x44\x52");
vF:
return $Tw;
}
public function get_current_url()
{
return (isset($_SERVER["\x48\124\124\x50\x53"]) ? "\150\164\x74\x70\163" : "\150\x74\164\x70") . "\72\57\x2f{$_SERVER["\x48\124\x54\x50\137\110\117\123\124"]}{$_SERVER["\x52\x45\x51\125\105\x53\x54\137\125\x52\x49"]}";
}
public function get_all_headers()
{
$Id = [];
foreach ($_SERVER as $Nh => $MA) {
if (!(substr($Nh, 0, 5) == "\110\x54\124\120\x5f")) {
goto TF;
}
$Id[str_replace("\x20", "\55", ucwords(strtolower(str_replace("\137", "\x20", substr($Nh, 5)))))] = $MA;
TF:
SD:
}
CP:
$Id = array_change_key_case($Id, CASE_UPPER);
return $Id;
}
public function store_info($bh = '', $MA = false)
{
if (!('' === $bh || !$MA)) {
goto Qu;
}
return;
Qu:
setcookie($bh, $MA);
}
public function redirect_user($W6 = false, $EF = false)
{
if (!(false === $W6)) {
goto sB;
}
return;
sB:
if (!$EF) {
goto f8;
}
echo "\x9\x9\11\x3c\x73\x63\162\x69\x70\164\76\15\xa\11\11\x9\11\x76\141\162\40\155\x79\127\151\x6e\x64\x6f\167\x20\x3d\x20\167\x69\x6e\x64\x6f\x77\56\157\160\145\156\50\x22";
echo esc_url($W6);
echo "\42\x2c\40\42\124\145\163\x74\40\103\x6f\x6e\146\151\x67\165\x72\x61\x74\x69\157\x6e\x22\x2c\x20\x22\x77\x69\x64\164\150\75\66\60\x30\54\x20\150\x65\x69\x67\x68\164\x3d\x36\x30\x30\42\x29\x3b\15\12\11\11\11\11\x77\150\151\x6c\145\x28\61\x29\x20\173\xd\xa\11\x9\11\x9\11\x69\x66\x28\x6d\171\x57\151\x6e\x64\x6f\167\x2e\143\154\x6f\163\x65\144\50\51\51\x20\173\xd\xa\11\11\x9\x9\11\x9\x24\x28\144\x6f\x63\165\x6d\x65\156\164\51\x2e\164\162\x69\147\x67\145\162\50\x22\143\x6f\156\x66\151\147\137\164\x65\x73\x74\145\144\x22\51\73\15\xa\x9\11\11\11\x9\11\x62\x72\145\141\x6b\x3b\15\xa\11\11\x9\11\x9\175\40\145\x6c\x73\x65\x20\x7b\143\157\x6e\x74\x69\x6e\165\145\x3b\x7d\xd\xa\11\x9\11\x9\x7d\15\12\11\11\11\x3c\57\x73\x63\162\151\x70\x74\76\15\12\x9\x9\11";
f8:
echo "\11\11\74\163\x63\x72\151\x70\x74\x3e\xd\12\x9\x9\11\x77\x69\156\x64\157\x77\x2e\x6c\x6f\143\x61\x74\151\157\x6e\x2e\162\x65\x70\x6c\x61\x63\145\x28\42";
echo esc_url($W6);
echo "\42\x29\x3b\xd\12\x9\11\x3c\x2f\163\x63\x72\x69\160\164\x3e\xd\xa\x9\x9";
exit;
}
public function is_ajax_request()
{
return defined("\x44\117\111\x4e\107\x5f\x41\x4a\101\130") && DOING_AJAX;
}
public function deactivate_plugin()
{
$this->mo_oauth_client_delete_option("\150\157\163\164\x5f\156\141\x6d\145");
$this->mo_oauth_client_delete_option("\x6e\x65\167\x5f\x72\145\147\x69\163\164\x72\141\164\151\x6f\156");
$this->mo_oauth_client_delete_option("\x6d\157\137\x6f\x61\165\164\x68\x5f\141\x64\155\x69\x6e\137\x70\150\x6f\x6e\x65");
$this->mo_oauth_client_delete_option("\166\145\162\x69\146\x79\137\x63\x75\163\164\x6f\155\x65\162");
$this->mo_oauth_client_delete_option("\155\157\137\x6f\x61\165\164\150\137\141\144\x6d\151\x6e\137\143\165\x73\x74\x6f\x6d\x65\x72\x5f\153\x65\x79");
$this->mo_oauth_client_delete_option("\155\x6f\137\x6f\141\x75\x74\x68\137\141\x64\x6d\x69\x6e\x5f\x61\160\151\137\x6b\145\x79");
$this->mo_oauth_client_delete_option("\155\x6f\x5f\x6f\x61\165\x74\150\x5f\156\x65\x77\x5f\143\165\163\164\x6f\x6d\145\162");
$this->mo_oauth_client_delete_option("\x63\x75\x73\x74\x6f\x6d\145\x72\137\x74\157\x6b\x65\x6e");
$this->mo_oauth_client_delete_option(\MoOAuthConstants::PANEL_MESSAGE_OPTION);
$this->mo_oauth_client_delete_option("\155\157\x5f\x6f\x61\165\x74\x68\137\162\x65\x67\151\x73\x74\162\x61\x74\x69\x6f\x6e\137\x73\164\141\x74\165\163");
$this->mo_oauth_client_delete_option("\155\157\x5f\157\x61\165\164\x68\137\156\145\x77\137\143\165\163\x74\x6f\155\145\162");
$this->mo_oauth_client_delete_option("\156\145\x77\137\162\145\147\151\163\164\162\x61\x74\x69\x6f\x6e");
$this->mo_oauth_client_delete_option("\x6d\157\x5f\157\x61\x75\x74\150\137\154\157\x67\151\x6e\137\151\143\157\156\x5f\x63\165\x73\164\x6f\x6d\137\150\x65\x69\x67\150\x74");
$this->mo_oauth_client_delete_option("\155\157\137\157\141\165\164\x68\137\154\x6f\147\151\x6e\x5f\x69\143\157\156\137\143\x75\x73\164\x6f\x6d\137\x73\x69\x7a\145");
$this->mo_oauth_client_delete_option("\x6d\157\x5f\157\x61\x75\164\x68\137\154\157\x67\151\156\x5f\151\143\x6f\156\137\x63\x75\x73\164\157\155\x5f\x63\x6f\154\x6f\162");
$this->mo_oauth_client_delete_option("\x6d\x6f\x5f\x6f\141\165\x74\150\x5f\154\157\147\x69\156\137\x69\143\x6f\x6e\x5f\143\165\163\x74\x6f\x6d\x5f\x62\157\165\156\144\141\162\171");
}
public function base64url_encode($XC)
{
return rtrim(strtr(base64_encode($XC), "\x2b\57", "\55\x5f"), "\x3d");
}
public function base64url_decode($XC)
{
return base64_decode(str_pad(strtr($XC, "\x2d\x5f", "\x2b\57"), strlen($XC) % 4, "\75", STR_PAD_RIGHT));
}
function export_plugin_config($kM = false)
{
$xr = [];
$nk = [];
$oE = [];
$xr = $this->get_plugin_config();
$nk = get_site_option("\x6d\157\x5f\157\x61\165\164\150\x5f\141\x70\x70\x73\137\x6c\151\x73\164");
if (empty($xr)) {
goto DP;
}
$xr = $xr->get_current_config();
DP:
if (!is_array($nk)) {
goto It;
}
foreach ($nk as $Vk => $FX) {
if (!is_array($FX)) {
goto RR;
}
$FX = new App($FX);
RR:
$mG = $FX->get_app_config('', false);
if (!$kM) {
goto Bn;
}
unset($mG["\143\x6c\x69\x65\156\164\x5f\x69\144"]);
unset($mG["\143\x6c\151\145\x6e\x74\x5f\x73\x65\x63\162\145\164"]);
Bn:
$oE[$Vk] = $mG;
nD:
}
bQ:
It:
$J_ = ["\x70\154\x75\147\x69\156\x5f\x63\157\156\x66\151\147" => $xr, "\141\x70\x70\x5f\x63\x6f\156\x66\151\x67\x73" => $oE];
$J_ = apply_filters("\155\157\137\x74\x72\137\147\145\x74\x5f\154\151\143\x65\x6e\x73\145\x5f\x63\x6f\x6e\146\151\x67", $J_);
return $J_;
}
private function verify_lk()
{
$z5 = new \MoOauthClient\Standard\Customer();
$do = $this->mo_oauth_client_get_option("\x6d\157\x5f\x6f\x61\165\164\x68\x5f\x6c\151\143\145\156\163\145\x5f\x6b\x65\x79");
if (!empty($do)) {
goto P7;
}
return 0;
P7:
$ll = $z5->XfskodsfhHJ($do);
$ll = json_decode($ll, true);
return isset($ll["\x73\x74\141\164\x75\163"]) && "\x53\125\103\x43\105\x53\123" === $ll["\163\x74\x61\164\165\163"];
}
public function is_valid_jwt($lm = '')
{
$Tq = explode("\56", $lm);
if (!(count($Tq) === 3)) {
goto bY;
}
return true;
bY:
return false;
}
public function validate_appslist($Zc)
{
if (is_array($Zc)) {
goto hO;
}
return false;
hO:
foreach ($Zc as $ct => $qg) {
if (!$qg instanceof \MoOauthClient\App) {
goto D3;
}
goto iM;
D3:
return false;
iM:
}
dg:
return true;
}
public function handle_error($oC)
{
do_action("\155\x6f\137\x74\x72\x5f\x6c\157\147\x69\156\x5f\x65\162\x72\x6f\162\x73", $oC);
}
public function set_transient($ct, $MA, $cA)
{
return is_multisite() && $this->is_multisite ? set_site_transient($ct, $MA, $cA) : set_transient($ct, $MA, $cA);
}
public function get_transient($ct)
{
return is_multisite() && $this->is_multisite ? get_site_transient($ct) : get_transient($ct);
}
public function delete_transient($ct)
{
return is_multisite() && $this->is_multisite ? delete_site_transient($ct) : delete_transient($ct);
}
}
Function Calls
| None |
Stats
| MD5 | 85f718bd5506070b99f580d58cdac9e1 |
| Eval Count | 0 |
| Decode Time | 82 ms |