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 defined("\x5f\112\x45\130\x45\x43") or die("\x52\x65\163\x74\x72\151\143\164\14..

Decoded Output download

<?php 
 
 
defined("_JEXEC") or die("Restricted access"); 
require_once JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . "components" . DIRECTORY_SEPARATOR . "com_miniorange_dirsync" . DIRECTORY_SEPARATOR . "helpers" . DIRECTORY_SEPARATOR . "mo_dirsync_utility.php"; 
if (!defined("_JEXEC")) { 
    goto T_; 
} 
class plgauthenticationmoldap extends JPlugin 
{ 
    function onUserAuthenticate($G6, $jx, &$bE) 
    { 
        $tC = JFactory::getApplication("site"); 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select("*"); 
        $f6->from($PT->quoteName("#__miniorange_dirsync_config")); 
        $f6->where($PT->quoteName("id") . " = 1"); 
        $PT->setQuery($f6); 
        $sB = $PT->loadAssoc(); 
        $aO = $sB["allow_login"]; 
        $O9 = JURI::root(); 
        $vx = $G6["username"]; 
        $C_ = $G6["password"]; 
        if (!($C_ == '' || $C_ == " ")) { 
            goto vr; 
        } 
        $bE->status = JAuthentication::STATUS_FAILURE; 
        $tC->enqueueMessage("Kindly please enter the password.", "warning"); 
        return; 
        vr: 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select("*"); 
        $f6->from($PT->quoteName("#__miniorange_dirsync_config")); 
        $f6->where($PT->quoteName("id") . " = 1"); 
        $PT->setQuery($f6); 
        $sB = $PT->loadAssoc(); 
        if ($sB["ldap_login"] == "ch") { 
            goto eW; 
        } 
        $bE->status = JAuthentication::STATUS_FAILURE; 
        $tC->enqueueMessage("You are not enabled LDAP login. Please contact administrator.", "error"); 
        goto mz; 
        eW: 
        $Aj = $sB["ldap_server_url"]; 
        $Aj = MoDirsyncUtility::decrypt($Aj); 
        $JJ = Self::getConnection($Aj); 
        if (!$JJ) { 
            goto Ha; 
        } 
        $jy = $sB["service_account_dn"]; 
        $jy = MoDirsyncUtility::decrypt($jy); 
        $Tr = $sB["service_account_password"]; 
        $Tr = MoDirsyncUtility::decrypt($Tr); 
        $f1 = $sB["search_base"]; 
        $f1 = MoDirsyncUtility::decrypt($f1); 
        $vm = explode(",", $f1); 
        $su = $sB["search_filter"]; 
        $Rj = str_replace("?", $vx, $su); 
        $af = null; 
        $lJ = null; 
        $LF = null; 
        $Fi = @ldap_bind($JJ, $jy, $Tr); 
        $sX = ldap_error($JJ); 
        if (!(strtolower($sX) == "success")) { 
            goto JB; 
        } 
        if (!ldap_search($JJ, $f1, $Rj)) { 
            goto KJ; 
        } 
        $af = ldap_search($JJ, $f1, $Rj); 
        $LF = ldap_first_entry($JJ, $af); 
        $lJ = ldap_get_entries($JJ, $af); 
        if (!$LF) { 
            goto rk; 
        } 
        $Gt = @ldap_bind($JJ, $lJ[0]["dn"], $C_); 
        rk: 
        if (!isset($lJ[0][$sB["email"]][0])) { 
            goto mb; 
        } 
        $dD = self::get_user_from_joomla($lJ[0][$sB["email"]][0]); 
        mb: 
        if (!(isset($dD) && $dD)) { 
            goto oM; 
        } 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $vs = array($PT->quoteName("user_already_exist") . " = " . $PT->quote(1)); 
        $Zn = array($PT->quoteName("id") . " = " . $PT->quote($dD->id)); 
        $f6->update($PT->quoteName("#__users"))->set($vs)->where($Zn); 
        $PT->setQuery($f6); 
        $PT->execute(); 
        oM: 
        if (isset($Gt) && $Gt) { 
            goto S9; 
        } 
        if (!isset($lJ[0]["mail"][0])) { 
            goto Ts; 
        } 
        $bE->email = $lJ[0]["mail"][0]; 
        Ts: 
        $bE->status = JAuthentication::STATUS_FAILURE; 
        return; 
        goto KV; 
        S9: 
        $bE->type = "Ldap"; 
        $bE->error_message = ''; 
        $bE->fullname = $lJ[0]["givenname"][0] . " " . $lJ[0]["sn"][0]; 
        $bE->username = $lJ[0][$sB["username"]][0]; 
        if (!isset($lJ[0][$sB["email"]][0])) { 
            goto ir; 
        } 
        $bE->email = $lJ[0][$sB["email"]][0]; 
        ir: 
        $bE->status = JAuthentication::STATUS_SUCCESS; 
        KV: 
        KJ: 
        JB: 
        Ha: 
        mz: 
    } 
    public static function getConnection($Aj) 
    { 
        $JJ = ldap_connect($Aj); 
        if (!(version_compare(PHP_VERSION, "5.3.0") >= 0)) { 
            goto gE; 
        } 
        ldap_set_option($JJ, LDAP_OPT_NETWORK_TIMEOUT, 5); 
        gE: 
        ldap_set_option($JJ, LDAP_OPT_PROTOCOL_VERSION, 3); 
        ldap_set_option($JJ, LDAP_OPT_REFERRALS, 0); 
        return $JJ; 
    } 
    public static function selectMaxOrdering($df) 
    { 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select("MAX(ordering)"); 
        $f6->from($PT->quoteName("#__user_profiles")); 
        $f6->where($PT->quoteName("user_id") . " = " . $PT->quote($df)); 
        $PT->setQuery($f6); 
        $UX = $PT->loadResult(); 
        return isset($UX) && !empty($UX) ? $UX : "0"; 
    } 
    public static function get_user_from_joomla($uj) 
    { 
        $PT = JFactory::getDBO(); 
        $f6 = $PT->getQuery(true)->select("id")->from("#__users")->where("email=" . $PT->quote($uj)); 
        $PT->setQuery($f6); 
        $sB = $PT->loadObject(); 
        return $sB; 
    } 
    public static function onUserAfterLogin() 
    { 
        $post = JFactory::getApplication()->input->post->getArray(); 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select("*"); 
        $f6->from($PT->quoteName("#__miniorange_dirsync_config")); 
        $f6->where($PT->quoteName("id") . " = 1"); 
        $PT->setQuery($f6); 
        $sB = $PT->loadAssoc(); 
        $user = $post["username"]; 
        $R0 = JFactory::getUser(); 
        $vx = $user; 
        $Aj = $sB["ldap_server_url"]; 
        $Aj = MoDirsyncUtility::decrypt($Aj); 
        $JJ = Self::getConnection($Aj); 
        $jy = $sB["service_account_dn"]; 
        $jy = MoDirsyncUtility::decrypt($jy); 
        $Tr = $sB["service_account_password"]; 
        $Tr = MoDirsyncUtility::decrypt($Tr); 
        $f1 = $sB["search_base"]; 
        $f1 = MoDirsyncUtility::decrypt($f1); 
        $vm = explode(",", $f1); 
        $su = $sB["search_filter"]; 
        $Rj = str_replace("?", $vx, $su); 
        $af = null; 
        $lJ = null; 
        $LF = null; 
        $Fi = @ldap_bind($JJ, $jy, $Tr); 
        $af = ldap_search($JJ, $f1, $Rj); 
        if (!$af) { 
            goto x4; 
        } 
        $LF = ldap_first_entry($JJ, $af); 
        $lJ = ldap_get_entries($JJ, $af); 
        x4: 
        if (!$LF) { 
            goto CE; 
        } 
        if (!($lJ[0][$sB["username"]][0] && $lJ[0][$sB["email"]][0])) { 
            goto Id; 
        } 
        $vx = $lJ[0][$sB["username"]][0]; 
        $VS = $lJ[0][$sB["email"]][0]; 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $vs = array($PT->quoteName("email") . " = " . $PT->quote($VS)); 
        $Zn = array($PT->quoteName("id") . " = " . $PT->quote($R0->id)); 
        $f6->update($PT->quoteName("#__users"))->set($vs)->where($Zn); 
        $PT->setQuery($f6); 
        $g0 = $PT->execute(); 
        Id: 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select(array("profile_key", "profile_value", "ordering")); 
        $f6->from($PT->quoteName("#__user_profiles")); 
        $f6->where($PT->quoteName("user_id") . " =" . $PT->quote($R0->id)); 
        $PT->setQuery($f6); 
        $Yt = $PT->loadRowList(); 
        if (!$Yt) { 
            goto El; 
        } 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->delete($PT->quoteName("#__user_profiles")); 
        $f6->where($PT->quoteName("user_id") . " =" . $PT->quote($R0->id)); 
        $PT->setQuery($f6); 
        $Yt = $PT->execute(); 
        El: 
        if (!1) { 
            goto Km; 
        } 
        $sa = $sB["user_profile_attributes"]; 
        $df = $R0->id; 
        $C6 = 0; 
        if (!(isset($sa) && !empty($sa))) { 
            goto io; 
        } 
        $sa = json_decode($sa, true); 
        $Fr = Self::selectMaxOrdering($df); 
        foreach ($sa as $Be) { 
            $X2 = strtolower($Be["attr_name"]); 
            $Ju = strtolower($Be["attr_value"]); 
            if (!isset($lJ[0][$Ju][0])) { 
                goto Wh; 
            } 
            if (is_array($lJ[0][$Ju])) { 
                goto qX; 
            } 
            $Ju = isset($lJ[0][$Ju]) ? $lJ[0][$Ju] : ''; 
            goto Gc; 
            qX: 
            $Ju = isset($lJ[0][$Ju][0]) ? $lJ[0][$Ju][0] : ''; 
            Gc: 
            $PT = JFactory::getDbo(); 
            $f6 = $PT->getQuery(true); 
            $ze = array("user_id", "profile_key", "profile_value", "ordering"); 
            $Lj = array($df, $PT->quote("profile." . $X2), $PT->quote($Ju), ++$Fr); 
            $f6->insert($PT->quoteName("#__user_profiles"))->columns($PT->quoteName($ze))->values(implode(",", $Lj)); 
            $PT->setQuery($f6); 
            $PT->execute(); 
            Wh: 
            aa: 
        } 
        pL: 
        io: 
        Km: 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select("*"); 
        $f6->from($PT->quoteName("#__miniorange_ldap_role_mapping")); 
        $f6->where($PT->quoteName("id") . " = 1"); 
        $PT->setQuery($f6); 
        $sB = $PT->loadAssoc(); 
        $PT = JFactory::getDbo(); 
        $f6 = $PT->getQuery(true); 
        $f6->select("user_already_exist"); 
        $f6->from($PT->quoteName("#__users")); 
        $f6->where($PT->quoteName("id") . " = " . $PT->quote($R0->id)); 
        $PT->setQuery($f6); 
        $Zf = $PT->loadAssoc(); 
        if (!($Zf["user_already_exist"] != 1 || $sB["disable_update_existing_users_role"] != 1)) { 
            goto k2; 
        } 
        $TV = $sB["mapping_value_default"]; 
        if (isset($R0->groups[8])) { 
            goto yt; 
        } 
        $ku = 1; 
        goto ok; 
        yt: 
        $ku = 0; 
        ok: 
        if (!($sB["enable_ldap_role_mapping"] && $ku)) { 
            goto zp; 
        } 
        JUserHelper::addUserToGroup($R0->id, $TV); 
        if (!($Zf["user_already_exist"] != 1 || $sB["disable_update_existing_users_role"] != 1)) { 
            goto DL; 
        } 
        foreach ($R0->groups as $TD) { 
            if (!($TD != $TV && $TD != "8")) { 
                goto zX; 
            } 
            JUserHelper::removeUserFromGroup($R0->id, $TD); 
            zX: 
            K9: 
        } 
        J3: 
        DL: 
        zp: 
        k2: 
        if (!(($Zf["user_already_exist"] != 1 || $sB["disable_update_existing_users_role"] != 1) && $sB["enable_ldap_role_mapping"])) { 
            goto cp; 
        } 
        $Fi = @ldap_bind($JJ, $jy, $Tr); 
        $nw = array("memberof"); 
        if (!isset($sB["mapping_memberof_attribute"])) { 
            goto pR; 
        } 
        $nw = array($sB["mapping_memberof_attribute"]); 
        pR: 
        $af = ldap_search($JJ, $f1, $Rj, $nw); 
        if (!$af) { 
            goto FC; 
        } 
        $LF = ldap_first_entry($JJ, $af); 
        $lJ = ldap_get_entries($JJ, $af); 
        FC: 
        $YU = $sB["role_mapping_key_value"]; 
        $YU = json_decode($YU, true); 
        $cv = $sB["role_mapping_groupvalue"]; 
        $cv = json_decode($cv, true); 
        $C6 = 1; 
        foreach ($YU as $KJ) { 
            if (empty($lJ[0]["memberof"])) { 
                goto bT; 
            } 
            if (!in_array($KJ, $lJ[0]["memberof"])) { 
                goto Xh; 
            } 
            JUserHelper::addUserToGroup($R0->id, $cv[$C6]); 
            Xh: 
            bT: 
            $C6++; 
            kj: 
        } 
        Sk: 
        cp: 
        CE: 
    } 
} 
T_: 
 ?>

Did this file decode correctly?

Original Code

<?php


defined("\x5f\112\x45\130\x45\x43") or die("\x52\x65\163\x74\x72\151\143\164\145\x64\40\141\x63\143\145\x73\163");
require_once JPATH_ADMINISTRATOR . DIRECTORY_SEPARATOR . "\143\x6f\x6d\160\157\156\145\x6e\x74\163" . DIRECTORY_SEPARATOR . "\143\x6f\x6d\x5f\155\x69\156\x69\157\162\x61\x6e\x67\x65\x5f\144\151\x72\x73\171\x6e\x63" . DIRECTORY_SEPARATOR . "\x68\145\x6c\x70\x65\162\x73" . DIRECTORY_SEPARATOR . "\155\x6f\x5f\144\x69\x72\x73\171\156\x63\x5f\165\164\151\154\151\x74\x79\56\160\x68\160";
if (!defined("\137\x4a\x45\130\x45\x43")) {
    goto T_;
}
class plgauthenticationmoldap extends JPlugin
{
    function onUserAuthenticate($G6, $jx, &$bE)
    {
        $tC = JFactory::getApplication("\163\x69\x74\145");
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select("\52");
        $f6->from($PT->quoteName("\x23\137\137\155\x69\156\151\157\162\x61\x6e\147\x65\x5f\x64\151\x72\x73\x79\156\143\x5f\x63\157\x6e\146\x69\x67"));
        $f6->where($PT->quoteName("\x69\x64") . "\40\75\x20\x31");
        $PT->setQuery($f6);
        $sB = $PT->loadAssoc();
        $aO = $sB["\141\154\x6c\x6f\167\x5f\154\x6f\147\x69\156"];
        $O9 = JURI::root();
        $vx = $G6["\165\x73\x65\162\x6e\x61\155\x65"];
        $C_ = $G6["\160\141\163\163\167\157\162\x64"];
        if (!($C_ == '' || $C_ == "\x20")) {
            goto vr;
        }
        $bE->status = JAuthentication::STATUS_FAILURE;
        $tC->enqueueMessage("\113\x69\156\x64\x6c\x79\x20\x70\x6c\145\x61\x73\x65\x20\145\156\x74\145\162\x20\x74\150\145\40\160\141\x73\163\167\157\x72\x64\x2e", "\167\x61\162\x6e\151\x6e\x67");
        return;
        vr:
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select("\52");
        $f6->from($PT->quoteName("\43\137\137\155\151\156\x69\x6f\162\x61\156\147\x65\137\x64\151\x72\163\x79\156\143\137\x63\x6f\x6e\x66\x69\x67"));
        $f6->where($PT->quoteName("\x69\x64") . "\40\75\x20\x31");
        $PT->setQuery($f6);
        $sB = $PT->loadAssoc();
        if ($sB["\154\144\x61\160\137\154\x6f\x67\151\x6e"] == "\x63\x68") {
            goto eW;
        }
        $bE->status = JAuthentication::STATUS_FAILURE;
        $tC->enqueueMessage("\131\157\x75\40\x61\162\145\x20\156\x6f\x74\40\x65\156\x61\x62\x6c\x65\144\x20\114\104\101\120\x20\x6c\157\147\151\x6e\x2e\x20\120\154\x65\x61\x73\145\x20\143\157\156\164\x61\x63\164\40\141\x64\x6d\151\x6e\x69\163\164\162\141\164\x6f\162\56", "\x65\162\x72\x6f\162");
        goto mz;
        eW:
        $Aj = $sB["\x6c\x64\141\x70\137\x73\x65\x72\x76\x65\162\x5f\x75\162\154"];
        $Aj = MoDirsyncUtility::decrypt($Aj);
        $JJ = Self::getConnection($Aj);
        if (!$JJ) {
            goto Ha;
        }
        $jy = $sB["\163\145\x72\x76\x69\x63\x65\137\x61\x63\143\x6f\x75\x6e\x74\x5f\144\x6e"];
        $jy = MoDirsyncUtility::decrypt($jy);
        $Tr = $sB["\163\x65\x72\166\151\x63\x65\x5f\x61\x63\143\157\x75\156\x74\137\x70\x61\163\x73\167\157\x72\144"];
        $Tr = MoDirsyncUtility::decrypt($Tr);
        $f1 = $sB["\163\145\x61\x72\x63\150\137\x62\141\163\x65"];
        $f1 = MoDirsyncUtility::decrypt($f1);
        $vm = explode("\x2c", $f1);
        $su = $sB["\x73\145\141\162\x63\150\137\x66\151\x6c\164\145\162"];
        $Rj = str_replace("\x3f", $vx, $su);
        $af = null;
        $lJ = null;
        $LF = null;
        $Fi = @ldap_bind($JJ, $jy, $Tr);
        $sX = ldap_error($JJ);
        if (!(strtolower($sX) == "\163\165\143\x63\x65\163\163")) {
            goto JB;
        }
        if (!ldap_search($JJ, $f1, $Rj)) {
            goto KJ;
        }
        $af = ldap_search($JJ, $f1, $Rj);
        $LF = ldap_first_entry($JJ, $af);
        $lJ = ldap_get_entries($JJ, $af);
        if (!$LF) {
            goto rk;
        }
        $Gt = @ldap_bind($JJ, $lJ[0]["\144\156"], $C_);
        rk:
        if (!isset($lJ[0][$sB["\145\155\x61\151\154"]][0])) {
            goto mb;
        }
        $dD = self::get_user_from_joomla($lJ[0][$sB["\x65\x6d\x61\151\x6c"]][0]);
        mb:
        if (!(isset($dD) && $dD)) {
            goto oM;
        }
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $vs = array($PT->quoteName("\x75\x73\145\162\x5f\x61\x6c\162\x65\x61\144\x79\137\x65\170\x69\163\164") . "\x20\x3d\x20" . $PT->quote(1));
        $Zn = array($PT->quoteName("\x69\x64") . "\40\75\40" . $PT->quote($dD->id));
        $f6->update($PT->quoteName("\43\137\137\x75\163\145\162\x73"))->set($vs)->where($Zn);
        $PT->setQuery($f6);
        $PT->execute();
        oM:
        if (isset($Gt) && $Gt) {
            goto S9;
        }
        if (!isset($lJ[0]["\x6d\x61\x69\x6c"][0])) {
            goto Ts;
        }
        $bE->email = $lJ[0]["\x6d\141\x69\x6c"][0];
        Ts:
        $bE->status = JAuthentication::STATUS_FAILURE;
        return;
        goto KV;
        S9:
        $bE->type = "\114\144\141\x70";
        $bE->error_message = '';
        $bE->fullname = $lJ[0]["\147\x69\x76\x65\156\156\141\x6d\145"][0] . "\40" . $lJ[0]["\x73\156"][0];
        $bE->username = $lJ[0][$sB["\x75\163\145\162\156\141\x6d\145"]][0];
        if (!isset($lJ[0][$sB["\145\155\141\x69\x6c"]][0])) {
            goto ir;
        }
        $bE->email = $lJ[0][$sB["\145\155\x61\x69\x6c"]][0];
        ir:
        $bE->status = JAuthentication::STATUS_SUCCESS;
        KV:
        KJ:
        JB:
        Ha:
        mz:
    }
    public static function getConnection($Aj)
    {
        $JJ = ldap_connect($Aj);
        if (!(version_compare(PHP_VERSION, "\x35\x2e\63\56\60") >= 0)) {
            goto gE;
        }
        ldap_set_option($JJ, LDAP_OPT_NETWORK_TIMEOUT, 5);
        gE:
        ldap_set_option($JJ, LDAP_OPT_PROTOCOL_VERSION, 3);
        ldap_set_option($JJ, LDAP_OPT_REFERRALS, 0);
        return $JJ;
    }
    public static function selectMaxOrdering($df)
    {
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select("\115\x41\130\x28\x6f\x72\x64\145\x72\x69\x6e\x67\51");
        $f6->from($PT->quoteName("\x23\x5f\x5f\x75\x73\x65\162\x5f\x70\x72\157\x66\x69\154\x65\163"));
        $f6->where($PT->quoteName("\x75\163\145\x72\x5f\151\144") . "\x20\x3d\40" . $PT->quote($df));
        $PT->setQuery($f6);
        $UX = $PT->loadResult();
        return isset($UX) && !empty($UX) ? $UX : "\x30";
    }
    public static function get_user_from_joomla($uj)
    {
        $PT = JFactory::getDBO();
        $f6 = $PT->getQuery(true)->select("\151\x64")->from("\43\137\x5f\x75\x73\145\x72\163")->where("\x65\x6d\141\x69\154\75" . $PT->quote($uj));
        $PT->setQuery($f6);
        $sB = $PT->loadObject();
        return $sB;
    }
    public static function onUserAfterLogin()
    {
        $post = JFactory::getApplication()->input->post->getArray();
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select("\52");
        $f6->from($PT->quoteName("\x23\x5f\137\x6d\x69\x6e\x69\157\162\x61\x6e\147\x65\x5f\x64\151\x72\163\171\x6e\x63\137\143\157\x6e\146\151\147"));
        $f6->where($PT->quoteName("\151\144") . "\x20\75\40\61");
        $PT->setQuery($f6);
        $sB = $PT->loadAssoc();
        $user = $post["\x75\163\x65\162\156\x61\x6d\x65"];
        $R0 = JFactory::getUser();
        $vx = $user;
        $Aj = $sB["\154\x64\x61\x70\137\x73\145\x72\166\x65\x72\137\165\162\154"];
        $Aj = MoDirsyncUtility::decrypt($Aj);
        $JJ = Self::getConnection($Aj);
        $jy = $sB["\x73\145\162\166\x69\x63\x65\137\141\143\143\x6f\165\156\x74\x5f\144\x6e"];
        $jy = MoDirsyncUtility::decrypt($jy);
        $Tr = $sB["\163\x65\x72\x76\x69\x63\x65\137\141\143\x63\157\165\x6e\164\x5f\x70\x61\163\x73\x77\x6f\162\x64"];
        $Tr = MoDirsyncUtility::decrypt($Tr);
        $f1 = $sB["\163\145\x61\162\143\x68\137\x62\141\163\145"];
        $f1 = MoDirsyncUtility::decrypt($f1);
        $vm = explode("\x2c", $f1);
        $su = $sB["\x73\x65\x61\x72\x63\150\x5f\146\151\154\x74\145\x72"];
        $Rj = str_replace("\x3f", $vx, $su);
        $af = null;
        $lJ = null;
        $LF = null;
        $Fi = @ldap_bind($JJ, $jy, $Tr);
        $af = ldap_search($JJ, $f1, $Rj);
        if (!$af) {
            goto x4;
        }
        $LF = ldap_first_entry($JJ, $af);
        $lJ = ldap_get_entries($JJ, $af);
        x4:
        if (!$LF) {
            goto CE;
        }
        if (!($lJ[0][$sB["\165\x73\x65\162\156\x61\155\x65"]][0] && $lJ[0][$sB["\x65\x6d\x61\x69\x6c"]][0])) {
            goto Id;
        }
        $vx = $lJ[0][$sB["\165\163\x65\162\156\x61\x6d\x65"]][0];
        $VS = $lJ[0][$sB["\x65\x6d\x61\x69\154"]][0];
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $vs = array($PT->quoteName("\x65\155\141\151\154") . "\40\75\x20" . $PT->quote($VS));
        $Zn = array($PT->quoteName("\x69\x64") . "\x20\75\40" . $PT->quote($R0->id));
        $f6->update($PT->quoteName("\43\137\137\x75\x73\145\162\163"))->set($vs)->where($Zn);
        $PT->setQuery($f6);
        $g0 = $PT->execute();
        Id:
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select(array("\160\162\157\x66\151\x6c\145\137\153\x65\171", "\x70\162\x6f\146\x69\154\145\137\166\141\154\165\x65", "\157\x72\144\x65\162\151\156\147"));
        $f6->from($PT->quoteName("\x23\137\x5f\165\x73\145\x72\137\160\162\x6f\146\151\x6c\x65\163"));
        $f6->where($PT->quoteName("\165\x73\x65\162\x5f\151\144") . "\x20\x3d" . $PT->quote($R0->id));
        $PT->setQuery($f6);
        $Yt = $PT->loadRowList();
        if (!$Yt) {
            goto El;
        }
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->delete($PT->quoteName("\43\x5f\x5f\x75\163\x65\x72\137\160\162\157\x66\x69\x6c\x65\x73"));
        $f6->where($PT->quoteName("\165\163\x65\x72\137\151\x64") . "\x20\75" . $PT->quote($R0->id));
        $PT->setQuery($f6);
        $Yt = $PT->execute();
        El:
        if (!1) {
            goto Km;
        }
        $sa = $sB["\x75\x73\145\162\x5f\x70\162\157\x66\151\154\145\137\141\x74\x74\162\x69\142\165\x74\x65\x73"];
        $df = $R0->id;
        $C6 = 0;
        if (!(isset($sa) && !empty($sa))) {
            goto io;
        }
        $sa = json_decode($sa, true);
        $Fr = Self::selectMaxOrdering($df);
        foreach ($sa as $Be) {
            $X2 = strtolower($Be["\x61\164\164\162\137\156\141\x6d\145"]);
            $Ju = strtolower($Be["\x61\164\x74\162\x5f\166\x61\x6c\x75\145"]);
            if (!isset($lJ[0][$Ju][0])) {
                goto Wh;
            }
            if (is_array($lJ[0][$Ju])) {
                goto qX;
            }
            $Ju = isset($lJ[0][$Ju]) ? $lJ[0][$Ju] : '';
            goto Gc;
            qX:
            $Ju = isset($lJ[0][$Ju][0]) ? $lJ[0][$Ju][0] : '';
            Gc:
            $PT = JFactory::getDbo();
            $f6 = $PT->getQuery(true);
            $ze = array("\165\x73\x65\x72\137\151\144", "\160\162\x6f\x66\151\154\145\x5f\x6b\x65\171", "\160\x72\157\x66\x69\154\x65\137\166\x61\154\165\x65", "\x6f\x72\144\x65\162\x69\x6e\x67");
            $Lj = array($df, $PT->quote("\160\162\157\x66\x69\x6c\x65\x2e" . $X2), $PT->quote($Ju), ++$Fr);
            $f6->insert($PT->quoteName("\x23\x5f\137\165\163\x65\162\137\160\162\x6f\146\x69\x6c\x65\163"))->columns($PT->quoteName($ze))->values(implode("\54", $Lj));
            $PT->setQuery($f6);
            $PT->execute();
            Wh:
            aa:
        }
        pL:
        io:
        Km:
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select("\52");
        $f6->from($PT->quoteName("\x23\x5f\x5f\x6d\x69\x6e\x69\157\162\141\x6e\x67\145\137\x6c\x64\141\160\x5f\162\x6f\154\x65\x5f\155\141\x70\160\x69\156\x67"));
        $f6->where($PT->quoteName("\x69\x64") . "\40\75\x20\61");
        $PT->setQuery($f6);
        $sB = $PT->loadAssoc();
        $PT = JFactory::getDbo();
        $f6 = $PT->getQuery(true);
        $f6->select("\165\x73\145\162\x5f\141\154\162\145\141\x64\171\x5f\x65\x78\x69\163\164");
        $f6->from($PT->quoteName("\x23\137\137\x75\163\145\x72\163"));
        $f6->where($PT->quoteName("\x69\144") . "\40\x3d\40" . $PT->quote($R0->id));
        $PT->setQuery($f6);
        $Zf = $PT->loadAssoc();
        if (!($Zf["\x75\x73\x65\x72\x5f\x61\x6c\162\145\141\144\x79\137\x65\170\x69\x73\164"] != 1 || $sB["\144\151\x73\x61\142\x6c\145\137\165\160\144\141\x74\x65\x5f\x65\x78\151\x73\x74\151\156\147\x5f\165\x73\x65\162\x73\137\162\x6f\154\145"] != 1)) {
            goto k2;
        }
        $TV = $sB["\155\141\x70\x70\151\156\x67\x5f\x76\141\154\165\x65\137\144\x65\146\141\165\154\x74"];
        if (isset($R0->groups[8])) {
            goto yt;
        }
        $ku = 1;
        goto ok;
        yt:
        $ku = 0;
        ok:
        if (!($sB["\145\156\x61\x62\154\145\137\x6c\x64\141\x70\137\162\x6f\x6c\145\137\155\x61\160\160\x69\x6e\147"] && $ku)) {
            goto zp;
        }
        JUserHelper::addUserToGroup($R0->id, $TV);
        if (!($Zf["\x75\163\145\x72\x5f\141\154\x72\x65\x61\x64\171\137\x65\170\x69\x73\x74"] != 1 || $sB["\144\x69\x73\x61\142\x6c\145\x5f\165\160\x64\141\164\145\137\x65\170\x69\163\164\x69\x6e\147\x5f\x75\x73\x65\x72\x73\137\x72\157\x6c\145"] != 1)) {
            goto DL;
        }
        foreach ($R0->groups as $TD) {
            if (!($TD != $TV && $TD != "\70")) {
                goto zX;
            }
            JUserHelper::removeUserFromGroup($R0->id, $TD);
            zX:
            K9:
        }
        J3:
        DL:
        zp:
        k2:
        if (!(($Zf["\x75\163\145\162\137\141\154\162\x65\x61\144\x79\x5f\145\x78\151\x73\x74"] != 1 || $sB["\144\x69\x73\141\142\x6c\x65\137\165\x70\144\141\164\x65\137\x65\x78\x69\163\164\151\x6e\x67\x5f\x75\163\x65\162\163\x5f\x72\x6f\x6c\145"] != 1) && $sB["\145\156\141\x62\154\x65\137\x6c\x64\x61\x70\137\162\x6f\154\x65\137\x6d\x61\x70\x70\x69\x6e\147"])) {
            goto cp;
        }
        $Fi = @ldap_bind($JJ, $jy, $Tr);
        $nw = array("\x6d\x65\x6d\142\x65\x72\x6f\x66");
        if (!isset($sB["\x6d\x61\x70\160\x69\x6e\x67\137\155\x65\155\142\x65\x72\157\146\x5f\x61\164\x74\x72\151\x62\x75\164\145"])) {
            goto pR;
        }
        $nw = array($sB["\x6d\141\x70\160\x69\x6e\x67\137\155\145\x6d\x62\x65\x72\x6f\146\x5f\141\x74\164\x72\151\x62\x75\x74\x65"]);
        pR:
        $af = ldap_search($JJ, $f1, $Rj, $nw);
        if (!$af) {
            goto FC;
        }
        $LF = ldap_first_entry($JJ, $af);
        $lJ = ldap_get_entries($JJ, $af);
        FC:
        $YU = $sB["\162\x6f\154\145\137\155\141\160\160\151\x6e\x67\137\153\145\x79\x5f\x76\x61\x6c\165\145"];
        $YU = json_decode($YU, true);
        $cv = $sB["\162\157\154\145\137\x6d\141\160\160\151\156\x67\x5f\x67\x72\157\165\160\x76\x61\154\165\145"];
        $cv = json_decode($cv, true);
        $C6 = 1;
        foreach ($YU as $KJ) {
            if (empty($lJ[0]["\155\x65\155\x62\x65\162\157\146"])) {
                goto bT;
            }
            if (!in_array($KJ, $lJ[0]["\x6d\x65\x6d\x62\x65\162\x6f\x66"])) {
                goto Xh;
            }
            JUserHelper::addUserToGroup($R0->id, $cv[$C6]);
            Xh:
            bT:
            $C6++;
            kj:
        }
        Sk:
        cp:
        CE:
    }
}
T_:

Function Calls

None

Variables

None

Stats

MD5 e3fd86affc734362cb4cf0fc0a80c6f9
Eval Count 0
Decode Time 59 ms