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 include "\170\155\154\x73\x65\143\x6c\x69\x62\x73\123\101\x4d\x4c\56\160\150\16..
Decoded Output download
<?php
include "xmlseclibsSAML.php";
use Joomla\CMS\User\User;
require_once JPATH_SITE . DIRECTORY_SEPARATOR . "administrator" . DIRECTORY_SEPARATOR . "components" . DIRECTORY_SEPARATOR . "com_miniorange_saml" . DIRECTORY_SEPARATOR . "helpers" . DIRECTORY_SEPARATOR . "mo-saml-customer-setup.php";
class UtilitiesSAML
{
public static function getRoleBasedRedirectionConfiguration()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_rolebasedredirection_settings"));
$N5->setQuery($Hx);
return $N5->loadAssoc();
}
public static function isRolebasedRedirectionPluginInstalled()
{
$Ms = array("miniorangerolebasedredirection", "miniorangeauthrolebasedredirection");
foreach ($Ms as $pn) {
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("enabled");
$Hx->from("#__extensions");
$Hx->where($N5->quoteName("element") . " = " . $N5->quote($pn));
$Hx->where($N5->quoteName("type") . " = " . $N5->quote("plugin"));
$N5->setQuery($Hx);
return $N5->loadAssoc();
R6:
}
U4:
}
public static function saveUserInDB($post, $fd)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$aD = date("Y-m-d H:i:s");
$Ik = array("name", "username", "email", "password", "registerDate", "params");
$rS = array($N5->quote($post["name"]), $N5->quote($post["username"]), $N5->quote($post["email"]), $N5->quote($post["password"]), $N5->quote($aD), $N5->quote(''));
$Hx->insert($N5->quoteName("#__users"))->columns($N5->quoteName($Ik))->values(implode(",", $rS));
$N5->setQuery($Hx);
$N5->execute();
}
public static function updateUserGroup($hO, $sm)
{
$hO = (int) $hO;
$sm = (int) $sm;
$user = JFactory::getUser($hO);
$x1 = self::getLoginUserGroupId($hO);
if (\in_array($sm, $x1)) {
goto Ol;
}
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Ik = array("user_id", "group_id");
$rS = array($N5->quote($hO), $N5->quote($sm));
$Hx->insert($N5->quoteName("#__user_usergroup_map"))->columns($N5->quoteName($Ik))->values(implode(",", $rS));
$N5->setQuery($Hx);
$N5->execute();
Ol:
$El = JFactory::getUser($hO);
$El->groups = $user->groups;
if (!JFactory::getSession()->getId()) {
goto r6;
}
$El = JFactory::getUser();
if (!($El->id == $hO)) {
goto b3;
}
$El->groups = $user->groups;
b3:
r6:
return true;
}
public static function removeUserGroups($h8, $xV)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Mf = array($N5->quoteName("user_id") . " = " . $N5->quote($h8), $N5->quoteName("group_id") . " = " . $N5->quote($xV));
$Hx->delete($N5->quoteName("#__user_usergroup_map"));
$Hx->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function addUser($GW)
{
$HM = "#__miniorange_saml_customer_details";
$e6 = array("usrlmt" => $GW + 1);
self::__genDBUpdate($HM, $e6);
}
public static function showErrorMessage($JJ, $dR)
{
echo " <div style="font-family:Calibri;padding:0 3%;">
<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>\xd\xa <div style="color: #a94442;font-size:14pt; margin-bottom:20px;">\xd
<p><strong>Error: </strong> Please contact to your Admnistrator.</p>\xd\xa <p><strong>Possible Cause: </strong>";
echo $JJ;
echo "</p>\xd\xa <p><strong>Reference No: </strong>";
echo $dR;
echo " </div>\xd\xa <form action="";
echo JURI::root();
echo "">\xd\xa <div style="margin:3%;display:block;text-align:center;">
<input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;" type="submit" value="Done" onClick="self.close();">\xd\xa </div>\xd\xa </form>
</div>
\xa ";
exit;
}
public static function getUserGroupID($xV)
{
foreach ($xV as $Ae) {
$OR = $Ae;
jk:
}
Ef:
return $OR;
}
public static function loadUserGroups()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__usergroups"));
$N5->setQuery($Hx);
return $N5->loadRowList();
}
public static function CheckUserGroup($OR)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("title");
$Hx->from($N5->quoteName("#__usergroups"));
$Hx->where($N5->quoteName("id") . " = " . $N5->quote($OR));
$N5->setQuery($Hx);
return $N5->loadResult();
}
public static function getLoginUserGroupId($RW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("group_id");
$Hx->from($N5->quoteName("#__user_usergroup_map"));
$Hx->where($N5->quoteName("user_id") . " = " . $N5->quote($RW));
$N5->setQuery($Hx);
return $N5->loadColumn();
}
public static function isSuperUser()
{
$user = JFactory::getUser();
return $user->get("isRoot");
}
public static function getJoomlaCmsVersion()
{
$La = new JVersion();
return $La->getShortVersion();
}
public static function auto_fetch_details()
{
$WP = 60 * 60 * 24;
$J5 = self::getCustomerDetails();
$Kf = time();
if (!($Kf >= $J5["auto_send_email_time"] || $J5["auto_send_email_time"] == 0)) {
goto mr;
}
$Kf = time() + $WP;
$HM = "#__miniorange_saml_customer_details";
$e6 = array("auto_send_email_time" => $Kf);
self::__genDBUpdate($HM, $e6);
$eV = new Mo_saml_Local_Customer();
$JN = json_decode($eV->submit_feedback_form(1), true);
mr:
}
public static function renewalMessage($D7, $oa, $sR)
{
$vV = " ";
$HQ = " ";
if (!($sR == "plugin")) {
goto Co;
}
$vV = "width:80%;float:left;margin-left:10%";
Co:
if (!($D7["LicenseExpired"] == 1)) {
goto kz;
}
$HQ = "<div class="background_color_update_message ms-auto" style="" . $vV . "display:block;color:red;background-color:rgba(251, 232, 0, 0.15); border:solid 1px rgba(255, 0, 9, 0.36);padding: 10px ;margin: 10px ;">
Your miniOrange Joomla SAML SP plugin license has expired on <strong> " . $oa . "</strong>. This has prevented you from receiving any plugin updates containing security patches, bug fixes, new features, and even compatibility changes. For further inquiry please contact <a style="color:red;" href="mailto:[email protected]"><strong>[email protected]</strong></a>
</div>";
kz:
if (!($D7["LicenseExpiry"] == 1)) {
goto Fz;
}
$HQ = "<div class="background_color_update_message ms-auto" style="" . $vV . "display:block;color:red ; background-color:rgba(251, 232, 0, 0.15); border:solid 1px rgba(255, 0, 9, 0.36);padding: 10px ;margin: 10px;">\xd\xa Your miniOrange Joomla SAML SP plugin license will expire on<strong> " . $oa . "</strong>. This has prevented you from receiving any plugin updates containing security patches, bug fixes, new features, and even compatibility changes. For further inquiry please contact <a style="color:red;" href="mailto:[email protected]"><strong>[email protected]</strong></a>
\xa </div>";
Fz:
return $HQ;
}
public static function checkIsLicenseExpired()
{
$JN = self::getExpiryDate();
$zi = isset($JN["licenseExpiry"]) ? $JN["licenseExpiry"] : "0000-00-00 00:00:00";
$gk = intval((strtotime($zi) - time()) / (60 * 60 * 24));
$D7 = array();
$D7["LicenseExpiry"] = $gk >= 0 && $gk < 31 ? TRUE : FALSE;
$D7["LicenseExpired"] = $gk > -30 && $gk < 0 ? TRUE : FALSE;
$D7["LicenseTrialExpiry"] = $gk > 0 && $gk < 2 ? TRUE : FALSE;
return $D7;
}
public static function getExpiryDate()
{
$N5 = JFactory::getDbo();
$N5->setQuery($N5->getQuery(true)->select("*")->from("#__miniorange_saml_customer_details"));
return $N5->loadAssoc();
}
public static function showLicenseExpiryMessage($D7)
{
$JQ = self::getExpiryDate();
$Tn = strtotime($JQ["licenseExpiry"]);
$Tn = $Tn === FALSE || $Tn <= -62169987208 ? "-" : date("F j, Y, g:i a", $Tn);
$JN = JFactory::getApplication()->input->get->getArray();
$BZ = isset($_SERVER["REQUEST_URI"]) ? $_SERVER["REQUEST_URI"] : '';
$K6 = substr($BZ, "-23");
$Un = isset($JN["option"]) ? $JN["option"] : '';
$Hd = Joomla\CMS\Factory::getApplication();
$v9 = 0;
if (!($Hd->getName() == "administrator")) {
goto k4;
}
$user = JFactory::getUser();
$v9 = self::IsUserSuperUser($user);
k4:
$MI = self::getUpgradeURL(self::getLicenseType());
if (!(($Un === "com_miniorange_saml" || $K6 == "administrator/index.php") && $v9)) {
goto Ep;
}
if ($D7["LicenseExpired"] || $D7["LicenseExpiry"]) {
goto ok;
}
return 0;
goto zv;
ok:
return 1;
zv:
Ep:
}
public static function getLicenseType()
{
return "JOOMLA_SAML_SP_ENTERPRISE_PLUGIN";
}
public static function getUpgradeURL($A3)
{
$O9 = self::getUserEmail();
return "https://login.xecurify.com/moas/login?username=" . $O9 . "&redirectUrl=https://login.xecurify.com/moas/admin/customer/licenserenewals?renewalrequest=" . $A3;
}
public static function getUserEmail()
{
$Eh = self::loadCustomerDetails("#__miniorange_saml_customer_details");
return $u6 = isset($Eh["email"]) ? $Eh["email"] : '';
}
public static function loadCustomerDetails($aO)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName($aO));
$Hx->where($N5->quoteName("id") . " = 1");
$N5->setQuery($Hx);
$ht = $N5->loadAssoc();
return $ht;
}
public static function getGroupNames($iS)
{
$ft = array();
if (!is_array($iS)) {
goto KB;
}
foreach ($iS as $OR) {
array_push($ft, self::CheckUserGroup($OR));
vq:
}
xC:
KB:
return $ft;
}
public static function IsUserSuperUser($user)
{
$iS = UtilitiesSAML::getLoginUserGroupId($user->id);
$ft = UtilitiesSAML::getGroupNames($iS);
if (!(in_array("7", $iS) || in_array("8", $iS) || in_array("administrator", $ft) || in_array("Administrator", $ft) || in_array("Super Users", $ft))) {
goto Ok;
}
return true;
Ok:
return false;
}
public static function IsUserManager($user)
{
$iS = UtilitiesSAML::getLoginUserGroupId($user->id);
$ft = UtilitiesSAML::getGroupNames($iS);
if (!(in_array("6", $iS) || in_array("Manager", $ft) || in_array("manager", $ft))) {
goto Os;
}
return true;
Os:
return false;
}
public static function IsUserSuperUserChild($user)
{
$OR = UtilitiesSAML::getLoginUserGroupId($user->id);
$ft = UtilitiesSAML::getGroupNames($OR);
foreach ($OR as $X5) {
$ch = empty(UtilitiesSAML::CheckUserParentGroup($X5)) ? '' : UtilitiesSAML::CheckUserParentGroup($X5);
$P9 = UtilitiesSAML::getGroupNames($X5);
if (!($ch == "7" || $ch == "8" || in_array("administrator", $P9) || in_array("Administrator", $P9) || in_array("Super Users", $P9))) {
goto dP;
}
return true;
dP:
Va:
}
sl:
return false;
}
public static function IsUserManagerChild($user)
{
$OR = UtilitiesSAML::getLoginUserGroupId($user->id);
foreach ($OR as $X5) {
$ch = empty(UtilitiesSAML::CheckUserParentGroup($X5)) ? '' : UtilitiesSAML::CheckUserParentGroup($X5);
$P9 = UtilitiesSAML::getGroupNames($X5);
if (!($ch == "6" || in_array("Manager", $P9) || in_array("manager", $P9))) {
goto cS;
}
return true;
cS:
ZF:
}
yj:
return false;
}
public static function loadDBValues($iA)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
$Hx->where($N5->quoteName("idp_name") . " = " . $N5->quote($iA));
$N5->setQuery($Hx);
return $N5->loadAssoc();
}
public static function CheckUserParentGroup($OR)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("parent_id");
$Hx->from($N5->quoteName("#__usergroups"));
$Hx->where($N5->quoteName("id") . " = " . $N5->quote($OR));
$N5->setQuery($Hx);
$Xb = $N5->loadResult();
return $Xb;
}
public static function getLicensePlanName()
{
return "joomla_saml_sso_enterprise_plan";
}
public static function generateID()
{
return "_" . self::stringToHex(self::generateRandomBytes(21));
}
public static function stringToHex($bo)
{
$Sf = '';
$pc = 0;
wQ:
if (!($pc < strlen($bo))) {
goto OZ;
}
$Sf .= sprintf("%02x", ord($bo[$pc]));
Oa:
$pc++;
goto wQ;
OZ:
return $Sf;
}
public static function generateRandomBytes($s7, $Nx = TRUE)
{
return openssl_random_pseudo_bytes($s7);
}
public static function _custom_redirect($HQ, $ec)
{
$Hd = JFactory::getApplication();
$Hd->enqueueMessage($HQ, $ec);
$Hd->redirect(JRoute::_("index.php?option=com_miniorange_saml&tab=domain_mapping"));
}
public static function getUserProfileData($R9, $sn)
{
$vk = array();
if (!(isset($sn) && !empty($sn))) {
goto tX;
}
$sn = json_decode($sn, true);
foreach ($sn as $k0) {
$pn = $k0["attr_name"];
$pm = $k0["attr_value"];
if (!(isset($R9[$pm]) && !empty($R9[$pm]))) {
goto uq;
}
$xp = array();
$xp["profile_key"] = $pn;
$Ba = $R9[$pm];
if (!is_array($Ba)) {
goto yF;
}
$Ba = $Ba[0];
yF:
if (!(isset($Ba) && !empty($Ba))) {
goto Ub;
}
$xp["profile_value"] = trim($Ba);
array_push($vk, $xp);
Ub:
uq:
L3:
}
Q4:
tX:
return $vk;
}
public static function checkIfContactExist($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("id");
$Hx->from("#__contact_details");
$Hx->where($N5->quoteName("user_id") . " = " . $N5->quote($j_));
$N5->setQuery($Hx);
return $N5->loadResult();
}
public static function removeIfExistsUserId($j_)
{
$Eh = self::getUserFieldDataFromTable($j_);
if (!$Eh) {
goto wT;
}
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Mf = array($N5->quoteName("item_id") . " = " . $N5->quote($j_));
$Hx->delete($N5->quoteName("#__fields_values"));
$Hx->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
wT:
}
public static function getUserFieldDataFromTable($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("field_id");
$Hx->from("#__fields_values");
$Hx->where($N5->quoteName("item_id") . " = " . $N5->quote($j_));
$N5->setQuery($Hx);
return $N5->loadColumn();
}
public static function gttrlval()
{
$J5 = UtilitiesSAML::getCustomerDetails();
$ec = $J5["status"];
if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($ec) == "true")) {
goto s3;
}
$eV = new Mo_saml_Local_Customer();
$a5 = $J5["customer_key"];
$w9 = $J5["api_key"];
$JN = json_decode($eV->ccl($a5, $w9), true);
if (!($JN != "null")) {
goto gw;
}
self::saveTvalue($JN["trial"]);
gw:
s3:
}
public static function getUserProfileDataFromTable($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("profile_key");
$Hx->from("#__user_profiles");
$Hx->where($N5->quoteName("user_id") . " = " . $N5->quote($j_));
$N5->setQuery($Hx);
return $N5->loadColumn();
}
public static function getIdFromFields($lF)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("id");
$Hx->from("#__fields");
$Hx->where($N5->quoteName("name") . " = " . $N5->quote($lF));
$N5->setQuery($Hx);
return $N5->loadObject();
}
public static function selectMaxOrdering($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("MAX(ordering)");
$Hx->from($N5->quoteName("#__user_profiles"));
$Hx->where($N5->quoteName("user_id") . " = " . $N5->quote($j_));
$N5->setQuery($Hx);
$GT = $N5->loadResult();
return isset($GT) && !empty($GT) ? $GT : "0";
}
public static function saveTvalue($pm)
{
$pm = Mo_saml_Local_Util::encrypt($pm);
$HM = "#__miniorange_saml_customer_details";
$e6 = array("trists" => $pm);
self::__genDBUpdate($HM, $e6);
}
public static function _remove_domain_mapp($Bj)
{
if (empty($Bj) || '' == $Bj) {
goto uS;
}
self::__remove_domain_mapping_value($Bj);
$HQ = "Domain has been removed successfully.";
$ec = "success";
self::_custom_redirect($HQ, $ec);
goto tC;
uS:
$HQ = "Error processing your request. Please try again.";
$ec = "error";
self::_custom_redirect($HQ, $ec);
tC:
}
public static function rmvlk()
{
$Hd = JFactory::getApplication();
$eV = new Mo_saml_Local_Customer();
$bG = json_decode($eV->update_status(), true);
$eV->submit_feedback_form(0);
if (strcasecmp($bG["status"], "SUCCESS") == 0) {
goto o0;
}
$X3 = "Error removing your license key. Please try again or contact us at <a href="mailto:[email protected]">[email protected] </a>";
$Hd->enqueueMessage($X3, "error");
goto e9;
o0:
$HM = "#__miniorange_saml_customer_details";
$e6 = array("email" => '', "password" => '', "admin_phone" => '', "customer_key" => '', "customer_token" => '', "api_key" => '', "login_status" => 1, "status" => '', "sml_lk" => '', "status" => '', "new_registration" => 0, "email_count" => 0, "in_cmp" => '', "trists" => false, "usrlmt" => 0, "licenseExpiry" => "0000-00-00 00:00:00", "supportExpiry" => "0000-00-00 00:00:00", "noSP" => 0, "auto_send_email_time" => '');
self::__genDBUpdate($HM, $e6);
$Hd->enqueueMessage("Your account has been removed successfully.", "success");
e9:
}
public static function __remove_domain_mapping_value($Bj)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->clear("*");
$t7 = array($N5->quoteName("domain_mapping") . " = " . $N5->quote(''));
$Mf = array($N5->quoteName("idp_name") . " = " . $N5->quote($Bj));
$Hx->update($N5->quoteName("#__miniorange_saml_config"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function fetchTLicense()
{
$J5 = self::getCustomerDetails();
$a5 = $J5["customer_key"];
$w9 = $J5["api_key"];
$eV = new Mo_saml_Local_Customer();
$JN = json_decode($eV->ccl($a5, $w9), true);
$t1 = $JN["licenseExpiry"];
$dM = $JN["supportExpiry"];
$pm = Mo_saml_Local_Util::encrypt($JN["trial"]);
$W2 = $JN["noOfSP"];
$Qn = self::getExpiryDate();
$Tn = strtotime($Qn["licenseExpiry"]);
$Uk = strtotime($Qn["supportExpiry"]);
$Vp = $Qn["trists"];
$SN = $Qn["noSP"];
$EO = isset($J5["miniorange_lexp_notification_sent"]) ? $J5["miniorange_lexp_notification_sent"] : 0;
if (!$EO) {
goto DS;
}
$HM = "#__miniorange_saml_customer_details";
$e6 = array("miniorange_fifteen_days_before_lexp" => 0, "miniorange_five_days_before_lexp" => 0, "miniorange_after_lexp" => 0, "miniorange_after_five_days_lexp" => 0, "miniorange_lexp_notification_sent" => 0);
self::__genDBUpdate($HM, $e6);
DS:
if (!(strtotime($t1) > $Tn)) {
goto i3;
}
$HM = "#__miniorange_saml_customer_details";
$e6 = array("licenseExpiry" => $t1);
self::__genDBUpdate($HM, $e6);
i3:
if (!(strtotime($dM) > $Uk)) {
goto Ki;
}
$HM = "#__miniorange_saml_customer_details";
$e6 = array("supportExpiry" => $dM);
self::__genDBUpdate($HM, $e6);
Ki:
if (!($pm != $Vp)) {
goto Rx;
}
$HM = "#__miniorange_saml_customer_details";
$e6 = array("trists" => $Vp);
self::__genDBUpdate($HM, $e6);
Rx:
if (!($W2 != $SN)) {
goto rn;
}
$HM = "#__miniorange_saml_customer_details";
$e6 = array("noSP" => $W2);
UtilitiesSAML::__genDBUpdate($HM, $e6);
rn:
}
public static function createAuthnRequest($rH, $Ah, $SA, $In, $jd, $WO = "false", $HX = "HTTP-Redirect")
{
self::createAndUpdateUpgardeUrl();
$Br = "<?xml version="1.0" encoding="UTF-8"?>" . "<samlp:AuthnRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="" . self::generateID() . "" Version="2.0" IssueInstant="" . self::generateTimestamp() . """;
if (!($WO == "true")) {
goto Kj;
}
$Br .= " ForceAuthn="true"";
Kj:
$Br .= " ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST" AssertionConsumerServiceURL="" . $rH . "" Destination="" . $SA . "">
<saml:Issuer>" . $Ah . "</saml:Issuer><samlp:NameIDPolicy AllowCreate="true" Format="" . $In . ""/>\xd\xa <samlp:RequestedAuthnContext Comparison="exact">\xd\xa <saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:" . $jd . "</saml:AuthnContextClassRef>\xd
</samlp:RequestedAuthnContext>
</samlp:AuthnRequest>";
if (!(empty($HX) || $HX == "HTTP-Redirect")) {
goto r1;
}
$W1 = gzdeflate($Br);
$MJ = base64_encode($W1);
$Kp = urlencode($MJ);
$Br = $Kp;
r1:
return $Br;
}
public static function gt_lk_trl()
{
$J5 = self::getCustomerDetails();
$a5 = $J5["customer_key"];
$w9 = $J5["api_key"];
$eV = new Mo_saml_Local_Customer();
$JN = json_decode($eV->ccl($a5, $w9), true);
$Ag = self::getExpiryDate();
if ($JN != "null") {
goto T5;
}
$oa = $JN["licenseExpiry"];
$bb = 10;
goto Px;
T5:
$oa = isset($JN["licenseExpiry"]) ? $JN["licenseExpiry"] : $Ag["licenseExpiry"];
$bb = isset($JN["noOfUsers"]) ? $JN["noOfUsers"] : 10;
Px:
$gk = intval((strtotime($oa) - time()) / (60 * 60 * 24));
$D7 = array();
$D7["LicenseExpired"] = 0 > $gk ? TRUE : FALSE;
$D7["NoofUsers"] = $bb;
return $D7;
}
public static function createLogoutRequest($bF, $Ah, $SA, $Az = "HTTP-Redirect", $MC = '')
{
$Br = "<?xml version="1.0" encoding="UTF-8"?>" . "<samlp:LogoutRequest xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" ID="" . self::generateID() . "" IssueInstant="" . self::generateTimestamp() . "" Version="2.0" Destination="" . $SA . "">\xd\xa\x9 \x9\x9 \x9<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">" . $Ah . "</saml:Issuer>
\xa\x9 \x9<saml:NameID xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">" . $bF . "</saml:NameID>";
if (empty($MC)) {
goto bJ;
}
$Br .= "<samlp:SessionIndex>" . $MC . "</samlp:SessionIndex>";
bJ:
$Br .= "</samlp:LogoutRequest>";
if (!(empty($Az) || $Az == "HTTP-Redirect")) {
goto pG;
}
$W1 = gzdeflate($Br);
$MJ = base64_encode($W1);
$Kp = urlencode($MJ);
$Br = $Kp;
pG:
return $Br;
}
public static function rmvextnsns()
{
self::rmvlk();
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("enabled") . " = " . $N5->quote(0));
$Mf = array($N5->quoteName("element") . " = " . $N5->quote("pkg_miniorangesamlsso") . "OR" . $N5->quoteName("element") . " = " . $N5->quote("samlredirect") . "OR" . $N5->quoteName("element") . " = " . $N5->quote("miniorangesaml") . "OR" . $N5->quoteName("element") . " = " . $N5->quote("miniorangesamlplugin") . "OR" . $N5->quoteName("element") . " = " . $N5->quote("com_miniorange_saml") . "OR" . $N5->quoteName("element") . " = " . $N5->quote("samllogout"));
$Hx->update($N5->quoteName("#__extensions"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$Eh = $N5->execute();
$Hd = JFactory::getApplication();
$Hd->enqueueMessage("Your Trial period has expired", "error");
$Hd->redirect(JRoute::_("index.php"));
}
public static function createLogoutResponse($rY, $Ah, $SA, $Az = "HTTP-Redirect")
{
$Br = "<?xml version="1.0" encoding="UTF-8"?>" . "<samlp:LogoutResponse xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" " . "ID="" . self::generateID() . "" " . "Version="2.0" IssueInstant="" . self::generateTimestamp() . "" " . "Destination="" . $SA . "" " . "InResponseTo="" . $rY . "">" . "<saml:Issuer xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion">" . $Ah . "</saml:Issuer>" . "<samlp:Status><samlp:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/></samlp:Status></samlp:LogoutResponse>";
if (!(empty($Az) || $Az == "HTTP-Redirect")) {
goto PY;
}
$W1 = gzdeflate($Br);
$MJ = base64_encode($W1);
$Kp = urlencode($MJ);
$Br = $Kp;
PY:
return $Br;
}
public static function generateTimestamp($cQ = NULL)
{
if (!($cQ === NULL)) {
goto sg;
}
$cQ = time();
sg:
return gmdate("Y-m-d\TH:i:s\Z", $cQ);
}
public static function xpQuery(DOMNode $WC, $Hx)
{
static $Ki = NULL;
if ($WC instanceof DOMDocument) {
goto tk;
}
$T6 = $WC->ownerDocument;
goto Lu;
tk:
$T6 = $WC;
Lu:
if (!($Ki === NULL || !$Ki->document->isSameNode($T6))) {
goto l1;
}
$Ki = new DOMXPath($T6);
$Ki->registerNamespace("soap-env", "http://schemas.xmlsoap.org/soap/envelope/");
$Ki->registerNamespace("saml_protocol", "urn:oasis:names:tc:SAML:2.0:protocol");
$Ki->registerNamespace("saml_assertion", "urn:oasis:names:tc:SAML:2.0:assertion");
$Ki->registerNamespace("saml_metadata", "urn:oasis:names:tc:SAML:2.0:metadata");
$Ki->registerNamespace("ds", "http://www.w3.org/2000/09/xmldsig#");
$Ki->registerNamespace("xenc", "http://www.w3.org/2001/04/xmlenc#");
l1:
$Ry = $Ki->query($Hx, $WC);
$Sf = array();
$pc = 0;
ZL:
if (!($pc < $Ry->length)) {
goto B2;
}
$Sf[$pc] = $Ry->item($pc);
of:
$pc++;
goto ZL;
B2:
return $Sf;
}
public static function parseNameId(DOMElement $Zo)
{
$Sf = array("Value" => trim($Zo->textContent));
foreach (array("NameQualifier", "SPNameQualifier", "Format") as $Xx) {
if (!$Zo->hasAttribute($Xx)) {
goto Y5;
}
$Sf[$Xx] = $Zo->getAttribute($Xx);
Y5:
iL:
}
qZ:
return $Sf;
}
public static function get_message_and_cause($D7, $yc)
{
$At = array();
if ($D7 && $yc) {
goto J0;
}
if ($D7) {
goto X0;
}
if (!$yc) {
goto ud;
}
$At["msg"] = "Please contact your administrator.";
$At["cause"] = "User limit exceeded.";
ud:
goto Cw;
X0:
$At["msg"] = "Please contact your administrator.";
$At["cause"] = "License expiry date exceeded.";
Cw:
goto NU;
J0:
$At["msg"] = "Please contact your administrator.";
$At["cause"] = "License expiry date and user limit exceeded.";
NU:
return $At;
}
public static function xsDateTimeToTimestamp($Kf)
{
$vb = array();
$Aq = "/^(\d\d\d\d)-(\d\d)-(\d\d)T(\d\d):(\d\d):(\d\d)(?:\.\d+)?Z$/D";
if (!(preg_match($Aq, $Kf, $vb) == 0)) {
goto KP;
}
throw new Exception("Invalid SAML2 timestamp passed to xsDateTimeToTimestamp: " . $Kf);
KP:
$uY = intval($vb[1]);
$c3 = intval($vb[2]);
$Q4 = intval($vb[3]);
$Gz = intval($vb[4]);
$J0 = intval($vb[5]);
$An = intval($vb[6]);
$eb = gmmktime($Gz, $J0, $An, $c3, $Q4, $uY);
return $eb;
}
public static function extractStrings(DOMElement $gP, $nQ, $e7)
{
$Sf = array();
$WC = $gP->firstChild;
xt:
if (!($WC !== NULL)) {
goto V2;
}
if (!($WC->namespaceURI !== $nQ || $WC->localName !== $e7)) {
goto nZ;
}
goto i0;
nZ:
$Sf[] = trim($WC->textContent);
i0:
$WC = $WC->nextSibling;
goto xt;
V2:
return $Sf;
}
public static function validateElement(DOMElement $MG)
{
$J1 = new XMLSecurityDSigSAML();
$J1->idKeys[] = "ID";
$U1 = self::xpQuery($MG, "./ds:Signature");
if (count($U1) === 0) {
goto bR;
}
if (count($U1) > 1) {
goto DW;
}
goto Ra;
bR:
return FALSE;
goto Ra;
DW:
echo "XMLSec: more than one signature element in root.";
exit;
Ra:
$U1 = $U1[0];
$J1->sigNode = $U1;
$J1->canonicalizeSignedInfo();
if ($J1->validateReference()) {
goto aO;
}
echo "XMLsec: digest validation failed";
exit;
aO:
$AW = FALSE;
foreach ($J1->getValidatedNodes() as $sU) {
if ($sU->isSameNode($MG)) {
goto Lm;
}
if ($MG->parentNode instanceof DOMDocument && $sU->isSameNode($MG->ownerDocument)) {
goto ya;
}
goto eV;
Lm:
$AW = TRUE;
goto tK;
goto eV;
ya:
$AW = TRUE;
goto tK;
eV:
LB:
}
tK:
if ($AW) {
goto vP;
}
echo "XMLSec: The root element is not signed.";
exit;
vP:
$r_ = array();
foreach (self::xpQuery($U1, "./ds:KeyInfo/ds:X509Data/ds:X509Certificate") as $kn) {
$R6 = trim($kn->textContent);
$R6 = str_replace(array("\xd", "
", " ", " "), '', $R6);
$r_[] = $R6;
Kn:
}
IB:
$Sf = array("Signature" => $J1, "Certificates" => $r_);
return $Sf;
}
public static function show_error_messages($HQ, $ZY)
{
echo " <div style="font-family:Calibri;padding:0 3%;">\xd\xa <div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>\xd
<div style="color: #a94442;font-size:14pt; margin-bottom:20px;">
\xa <p><strong>Error: </strong>";
echo $HQ;
echo "</p>\xd
<p><strong>Possible Cause: </strong>";
echo $ZY;
echo "</p>\xd
</div>
\xa <form action="";
echo JURI::root();
echo "">
\xa <div style="margin:3%;display:block;text-align:center;">\xd
<input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;" type="submit" value="Done" onClick="self.close();">\xd
</div>\xd
</form>\xd
</div>\xd
";
exit;
}
public static function validateSignature(array $wA, XMLSecurityKeySAML $pn)
{
$J1 = $wA["Signature"];
$wT = self::xpQuery($J1->sigNode, "./ds:SignedInfo/ds:SignatureMethod");
if (!empty($wT)) {
goto ye;
}
throw new Exception("Missing SignatureMethod element.");
ye:
$wT = $wT[0];
if ($wT->hasAttribute("Algorithm")) {
goto Oh;
}
throw new Exception("Missing Algorithm-attribute on SignatureMethod element.");
Oh:
$rE = $wT->getAttribute("Algorithm");
if (!($pn->type === XMLSecurityKeySAML::RSA_SHA1 && $rE !== $pn->type)) {
goto uJ;
}
$pn = self::castKey($pn, $rE);
uJ:
if ($J1->verify($pn)) {
goto NV;
}
throw new Exception("Unable to validate Signature");
NV:
}
public static function castKey(XMLSecurityKeySAML $pn, $hA, $Xs = "public")
{
if (!($pn->type === $hA)) {
goto DG;
}
return $pn;
DG:
$gD = openssl_pkey_get_details($pn->key);
if (!($gD === FALSE)) {
goto OM;
}
throw new Exception("Unable to get key details from XMLSecurityKeySAML.");
OM:
if (isset($gD["key"])) {
goto EN;
}
throw new Exception("Missing key in public key details.");
EN:
$Q0 = new XMLSecurityKeySAML($hA, array("type" => $Xs));
$Q0->loadKey($gD["key"]);
return $Q0;
}
public static function processResponse($o_, $IT, $y3, SAML2_Response $bG, $Bs, $A1)
{
$MV = $bG->getDestination();
if (!($MV !== NULL && $MV !== $o_)) {
goto fi;
}
echo "Destination in response doesn't match the current URL. Destination is "" . $MV . "", current URL is "" . $o_ . "".";
exit;
fi:
try {
$DG = self::checkSign($IT, $y3, $Bs, $A1);
} catch (Exception $LD) {
}
return $DG;
}
public static function checkSign($IT, $y3, $Bs, $A1)
{
$r_ = $y3["Certificates"];
if (count($r_) === 0) {
goto Kg;
}
$c7 = self::findCertificate($IT, $r_, $A1);
goto Dy;
Kg:
$pk = $Bs;
$pk = explode(";", $pk);
$c7 = $pk[0];
Dy:
$TK = NULL;
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA1, array("type" => "public"));
$pn->loadKey($c7);
try {
self::validateSignature($y3, $pn);
return TRUE;
} catch (Exception $LD) {
echo "Validation with key failed with exception: " . $LD->getMessage();
$TK = $LD;
}
if ($TK !== NULL) {
goto bh;
}
return FALSE;
goto mg;
bh:
throw $TK;
mg:
}
public static function validateIssuerAndAudience($Je, $Tt, $pz)
{
$Ah = current($Je->getAssertions())->getIssuer();
$ti = current(current($Je->getAssertions())->getValidAudiences());
if (strcmp($pz, $Ah) === 0) {
goto G0;
}
echo "Issuer cannot be verified.";
exit;
goto wC;
G0:
if (strcmp($ti, $Tt) === 0) {
goto Ss;
}
$A5 = "Invalid audience URI.";
$ZY = "The value of <strong>IdP Entity ID or Issuer or Audience URI</strong> in Joomla SAML SP plugin and the configured Entity ID in your IDP are different.<br>";
$ZY .= "<strong>Expected Entity ID:</strong> " . $Tt . "<br> ";
$ZY .= "<strong>Entity ID configured at IDP:</strong> " . $ti . "<br> ";
self::show_error_messages($A5, $ZY);
goto Yg;
Ss:
return TRUE;
Yg:
wC:
}
private static function findCertificate($rj, $r_, $A1)
{
$f5 = $r_[0];
foreach ($r_ as $pk) {
$r3 = strtolower(sha1(base64_decode($pk)));
if (!in_array($r3, $rj, TRUE)) {
goto Hq;
}
$uw = "-----BEGIN CERTIFICATE-----
" . chunk_split($pk, 64) . "-----END CERTIFICATE-----\xa";
return $uw;
Hq:
BG:
}
j4:
$f5 = self::sanitize_certificate($f5);
$kR = Jfactory::getApplication()->input->request->getArray();
if (array_key_exists("RelayState", $kR) && $kR["RelayState"] == "testValidate") {
goto Wf;
}
echo " <div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><b>Error: </b>We could not sign you in. Please contact your Administrator.</p></div>";
goto Vg;
Wf:
echo "<div style="font-family:Calibri;padding:0 3%;">\xd
<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>
\xa\x9\x9 <div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><strong>Error: </strong>Unable to find a certificate matching the configured fingerprint.</p>
\xa <p><strong>Possible Cause: </strong>Content of 'X.509 Certificate' field in Service Provider Settings is incorrect</p>
\x9 \x9 <p><b>Expected value:</b>" . $f5 . "</p>";
echo str_repeat(" ", 15);
echo "</div>
\xa <div style="margin:3%;display:block;text-align:center;">
\xa\x9 <form action="index.php">
\xa\x9\x9 \x9 <div style="margin:3%;display:block;text-align:center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
Vg:
exit;
}
private static function doDecryptElement(DOMElement $VK, XMLSecurityKeySAML $z9, array &$Ot)
{
$m9 = new XMLSecEncSAML();
$m9->setNode($VK);
$m9->type = $VK->getAttribute("Type");
$io = $m9->locateKey($VK);
if ($io) {
goto sT;
}
throw new Exception("Could not locate key algorithm in encrypted data.");
sT:
$Ir = $m9->locateKeyInfo($io);
if ($Ir) {
goto ID;
}
throw new Exception("Could not locate <dsig:KeyInfo> for the encrypted key.");
ID:
$Pw = $z9->getAlgorith();
if ($Ir->isEncrypted) {
goto aD;
}
$m0 = $io->getAlgorith();
if (!($Pw !== $m0)) {
goto FV;
}
throw new Exception("Algorithm mismatch between input key and key in message. " . "Key was: " . var_export($Pw, TRUE) . "; message was: " . var_export($m0, TRUE));
FV:
$io = $z9;
goto Xx;
aD:
$p7 = $Ir->getAlgorith();
if (!in_array($p7, $Ot, TRUE)) {
goto w7;
}
throw new Exception("Algorithm disabled: " . var_export($p7, TRUE));
w7:
if (!($p7 === XMLSecurityKeySAML::RSA_OAEP_MGF1P && $Pw === XMLSecurityKeySAML::RSA_1_5)) {
goto Ag;
}
$Pw = XMLSecurityKeySAML::RSA_OAEP_MGF1P;
Ag:
if (!($Pw !== $p7)) {
goto Lg;
}
throw new Exception("Algorithm mismatch between input key and key used to encrypt " . " the symmetric key for the message. Key was: " . var_export($Pw, TRUE) . "; message was: " . var_export($p7, TRUE));
Lg:
$sb = $Ir->encryptedCtx;
$Ir->key = $z9->key;
$P6 = $io->getSymmetricKeySize();
if (!($P6 === NULL)) {
goto ry;
}
throw new Exception("Unknown key size for encryption algorithm: " . var_export($io->type, TRUE));
ry:
try {
$pn = $sb->decryptKey($Ir);
if (!(strlen($pn) != $P6)) {
goto hj;
}
throw new Exception("Unexpected key size (" . strlen($pn) * 8 . "bits) for encryption algorithm: " . var_export($io->type, TRUE));
hj:
} catch (Exception $LD) {
$X2 = $sb->getCipherValue();
$Ql = openssl_pkey_get_details($Ir->key);
$Ql = sha1(serialize($Ql), TRUE);
$pn = sha1($X2 . $Ql, TRUE);
if (strlen($pn) > $P6) {
goto k1;
}
if (strlen($pn) < $P6) {
goto wu;
}
goto s4;
k1:
$pn = substr($pn, 0, $P6);
goto s4;
wu:
$pn = str_pad($pn, $P6);
s4:
}
$io->loadkey($pn);
Xx:
$hA = $io->getAlgorith();
if (!in_array($hA, $Ot, TRUE)) {
goto Bg;
}
throw new Exception("Algorithm disabled: " . var_export($hA, TRUE));
Bg:
$z8 = $m9->decryptNode($io, FALSE);
$Zo = "<root xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" " . "xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">" . $z8 . "</root>";
$RZ = new DOMDocument();
if (@$RZ->loadXML($Zo)) {
goto pU;
}
throw new Exception("Failed to parse decrypted XML. Maybe the wrong sharedkey was used?");
pU:
$Ic = $RZ->firstChild->firstChild;
if (!($Ic === NULL)) {
goto Eh;
}
throw new Exception("Missing encrypted element.");
Eh:
if ($Ic instanceof DOMElement) {
goto dq;
}
throw new Exception("Decrypted element was not actually a DOMElement.");
dq:
return $Ic;
}
public static function decryptElement(DOMElement $VK, XMLSecurityKeySAML $z9, array $Ot = array())
{
try {
return self::doDecryptElement($VK, $z9, $Ot);
} catch (Exception $LD) {
$bD = UtilitiesSAML::getSAMLConfiguration();
$zs = self::get_public_private_certificate($bD, "public_certificate");
$ez = JPATH_BASE . DIRECTORY_SEPARATOR . "plugins" . DIRECTORY_SEPARATOR . "authentication" . DIRECTORY_SEPARATOR . "miniorangesaml" . DIRECTORY_SEPARATOR . "saml2" . DIRECTORY_SEPARATOR . "cert" . DIRECTORY_SEPARATOR . "sp-certificate.crt";
if (!empty($zs)) {
goto Cv;
}
$f5 = file_get_contents($ez);
$HQ = "<strong>Possible Cause: </strong>If you have removed custom certificate then please update this default public certificate in your IDP side.";
goto Ji;
Cv:
$f5 = $zs;
$HQ = "<strong>Possible Cause: </strong>If you have uploaded custom certificate then please update this new custom public certificate in your IDP side.";
Ji:
echo "<div style="font-family:Calibri;padding:0 3%;">";
echo "<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;"> ERROR</div>
\xa <div style="color: #a94442;font-size:14pt; margin-bottom:20px;"><p><strong>Error: </strong>Unable to find a certificate matching the configured fingerprint.</p>\xd
<p>" . $HQ . "</p>\xd
<p><b>Expected value: </b>" . $f5 . "</p>";
echo str_repeat(" ", 15);
echo "</div>\xd
<div style="margin:3%;display:block;text-align:center;">
<form action="index.php">
\xa <div style="margin:3%;display:block;text-align:center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
exit;
}
}
public static function get_mapped_groups($FB, $kT)
{
$Ae = array();
foreach ($FB as $BL => $L1) {
if (!(!empty($BL) && in_array(trim($BL), $kT))) {
goto z7;
}
$Ae[] = $L1;
z7:
T2:
}
qm:
return array_unique($Ae);
}
public static function get_role_based_redirect_values($FB, $kT)
{
$Ae = array();
foreach ($FB as $BL => $L1) {
if (empty($BL)) {
goto br;
}
if (!($BL == $kT)) {
goto UZ;
}
$Ae = $L1;
UZ:
br:
PA:
}
D9:
return $Ae;
}
public static function get_user_from_joomla($fd, $Hv, $u6)
{
$N5 = JFactory::getDBO();
switch ($fd) {
case "username":
$Hx = $N5->getQuery(true)->select("id")->from("#__users")->where("username=" . $N5->quote($Hv));
goto Si;
case "email":
$Hx = $N5->getQuery(true)->select("id")->from("#__users")->where("email=" . $N5->quote($u6));
goto Si;
}
XG:
Si:
$N5->setQuery($Hx);
$Eh = $N5->loadObject();
return $Eh;
}
public static function get_user_credentials($Hv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true)->select("id, password")->from("#__users")->where("username=" . $N5->quote($Hv));
$N5->setQuery($Hx);
return $N5->loadObject();
}
public static function getEncryptionAlgorithm($Es)
{
switch ($Es) {
case "http://www.w3.org/2001/04/xmlenc#tripledes-cbc":
return XMLSecurityKeySAML::TRIPLEDES_CBC;
goto gf;
case "http://www.w3.org/2001/04/xmlenc#aes128-cbc":
return XMLSecurityKeySAML::AES128_CBC;
case "http://www.w3.org/2001/04/xmlenc#aes192-cbc":
return XMLSecurityKeySAML::AES192_CBC;
goto gf;
case "http://www.w3.org/2001/04/xmlenc#aes256-cbc":
return XMLSecurityKeySAML::AES256_CBC;
goto gf;
case "http://www.w3.org/2001/04/xmlenc#rsa-1_5":
return XMLSecurityKeySAML::RSA_1_5;
goto gf;
case "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p":
return XMLSecurityKeySAML::RSA_OAEP_MGF1P;
goto gf;
case "http://www.w3.org/2000/09/xmldsig#dsa-sha1":
return XMLSecurityKeySAML::DSA_SHA1;
goto gf;
case "http://www.w3.org/2000/09/xmldsig#rsa-sha1":
return XMLSecurityKeySAML::RSA_SHA1;
goto gf;
case "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256":
return XMLSecurityKeySAML::RSA_SHA256;
goto gf;
case "http://www.w3.org/2001/04/xmldsig-more#rsa-sha384":
return XMLSecurityKeySAML::RSA_SHA384;
goto gf;
case "http://www.w3.org/2001/04/xmldsig-more#rsa-sha512":
return XMLSecurityKeySAML::RSA_SHA512;
goto gf;
default:
throw new Exception("Invalid Encryption Method: " . $Es);
goto gf;
}
na:
gf:
}
public static function sanitize_certificate($op)
{
$op = preg_replace("/[\xd
]+/", '', $op);
$op = str_replace("-", '', $op);
$op = str_replace("BEGIN CERTIFICATE", '', $op);
$op = str_replace("END CERTIFICATE", '', $op);
$op = str_replace(" ", '', $op);
$op = chunk_split($op, 64, "
");
$op = "-----BEGIN CERTIFICATE-----
\xa" . $op . "-----END CERTIFICATE-----";
return $op;
}
public static function desanitize_certificate($op)
{
$op = preg_replace("/[
\xa]+/", '', $op);
$op = str_replace("-----BEGIN CERTIFICATE-----", '', $op);
$op = str_replace("-----END CERTIFICATE-----", '', $op);
$op = str_replace(" ", '', $op);
return $op;
}
public static function mo_saml_show_test_result($Hv, $tO, $ov)
{
ob_end_clean();
$ov = $ov . "/plugins/authentication/miniorangesaml/";
echo "<div style="font-family:Calibri;padding:0 3%;">";
if (!empty($Hv)) {
goto pm;
}
echo "<div style="color: #a94442;background-color: #f2dede;padding: 15px;margin-bottom: 20px;text-align:center;border:1px solid #E6B3B2;font-size:18pt;">TEST FAILED</div>
<div style="color: #a94442;font-size:14pt; margin-bottom:20px;">WARNING: Some Attributes Did Not Match.</div>
<div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="" . $ov . "images/wrong.png"></div>";
goto Ur;
pm:
echo "<div style="color: #3c763d;\xd\xa background-color: #dff0d8; padding:2%;margin-bottom:20px;text-align:center; border:1px solid #AEDB9A; font-size:18pt;">TEST SUCCESSFUL</div>
<div style="display:block;text-align:center;margin-bottom:4%;"><img style="width:15%;"src="" . $ov . "images/green_check.png"></div>";
Ur:
echo "<span style="font-size:14pt;"><b>Hello</b>, " . $Hv . "</span><br/><p style="font-weight:bold;font-size:14pt;margin-left:1%;">ATTRIBUTES RECEIVED:</p>
\xa <table style="border-collapse:collapse;border-spacing:0; display:table;width:100%; font-size:14pt;background-color:#EDEDED;">
\xa <tr style="text-align:center;"><td style="font-weight:bold;border:2px solid #949090;padding:2%;">ATTRIBUTE NAME</td><td style="font-weight:bold;padding:2%;border:2px solid #949090; word-wrap:break-word;">ATTRIBUTE VALUE</td></tr>";
if (!empty($tO)) {
goto ej;
}
echo "No Attributes Received.";
goto O1;
ej:
foreach ($tO as $pn => $pm) {
echo "<tr><td style='font-weight:bold;border:2px solid #949090;padding:2%;'>" . $pn . "</td><td style='padding:2%;border:2px solid #949090; word-wrap:break-word;'>" . implode("<br/>", (array) $pm) . "</td></tr>";
z_:
}
g9:
O1:
echo "</table></div>";
echo "<div style="margin:3%;display:block;text-align:center;"><input style="padding:1%;width:100px;background: #0091CD none repeat scroll 0% 0%;cursor: pointer;font-size:15px;border-width: 1px;border-style: solid;border-radius: 3px;white-space: nowrap;box-sizing: border-box;border-color: #0073AA;box-shadow: 0px 1px 0px rgba(120, 200, 230, 0.6) inset;color: #FFF;"type="button" value="Done" onClick="self.close();"></div>";
exit;
}
public static function postSAMLRequest($gs, $QU, $A1)
{
echo "<html><head><script src='https://code.jquery.com/jquery-1.11.3.min.js'></script><script type="text/javascript">$(function(){document.forms['saml-request-form'].submit();});</script></head><body>Please wait...<form action="" . $gs . "" method="post" id="saml-request-form"><input type="hidden" name="SAMLRequest" value="" . $QU . "" /><input type="hidden" name="RelayState" value="" . htmlentities($A1) . "" /></form></body></html>";
exit;
}
public static function postSAMLResponse($gs, $n3, $A1)
{
echo "<html><head><script src='https://code.jquery.com/jquery-1.11.3.min.js'></script><script type="text/javascript">$(function(){document.forms['saml-request-form'].submit();});</script></head><body>Please wait...<form action="" . $gs . "" method="post" id="saml-request-form"><input type="hidden" name="SAMLResponse" value="" . $n3 . "" /><input type="hidden" name="RelayState" value="" . htmlentities($A1) . "" /></form></body></html>";
exit;
}
public static function insertSignature(XMLSecurityKeySAML $pn, array $r_, DOMElement $MG = NULL, DOMNode $BF = NULL)
{
$J1 = new XMLSecurityDSigSAML();
$J1->setCanonicalMethod(XMLSecurityDSigSAML::EXC_C14N);
switch ($pn->type) {
case XMLSecurityKeySAML::RSA_SHA256:
$Xs = XMLSecurityDSigSAML::SHA256;
goto U3;
case XMLSecurityKeySAML::RSA_SHA384:
$Xs = XMLSecurityDSigSAML::SHA384;
goto U3;
case XMLSecurityKeySAML::RSA_SHA512:
$Xs = XMLSecurityDSigSAML::SHA512;
goto U3;
default:
$Xs = XMLSecurityDSigSAML::SHA1;
}
AX:
U3:
$J1->addReferenceList(array($MG), $Xs, array("http://www.w3.org/2000/09/xmldsig#enveloped-signature", XMLSecurityDSigSAML::EXC_C14N), array("id_name" => "ID", "overwrite" => FALSE));
$J1->sign($pn);
foreach ($r_ as $op) {
$J1->add509Cert($op, TRUE);
Sr:
}
NF:
$J1->insertSignature($MG, $BF);
}
public static function __genDBUpdate($HM, $e6)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
foreach ($e6 as $pn => $pm) {
$xl[] = $N5->quoteName($pn) . " = " . $N5->quote($pm);
VV:
}
e6:
$Hx->update($N5->quoteName($HM))->set($xl)->where($N5->quoteName("id") . " = 1");
$N5->setQuery($Hx);
$N5->execute();
}
public static function signXML($Zo, $ez, $HU, $j0, $xQ = '')
{
$rm = array("type" => "private");
if ($j0 == "RSA_SHA256") {
goto zS;
}
if ($j0 == "RSA_SHA384") {
goto X3;
}
if ($j0 == "RSA_SHA512") {
goto d7;
}
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA1, $rm);
goto xM;
zS:
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA256, $rm);
goto xM;
X3:
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA384, $rm);
goto xM;
d7:
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA512, $rm);
xM:
$pn->loadKey($HU, TRUE);
$Nr = file_get_contents($ez);
$ZL = new DOMDocument();
$ZL->loadXML($Zo);
$QJ = $ZL->firstChild;
if (!empty($xQ)) {
goto mE;
}
self::insertSignature($pn, array($Nr), $QJ);
goto ZY;
mE:
$SQ = $ZL->getElementsByTagName($xQ)->item(0);
self::insertSignature($pn, array($Nr), $QJ, $SQ);
ZY:
$rV = $QJ->ownerDocument->saveXML($QJ);
$uD = base64_encode($rV);
return $uD;
}
public static function getSAMLConfiguration($x4 = '')
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
if (empty($x4)) {
goto uW;
}
$Mf = array($N5->quoteName("idp_entity_id") . " = " . $N5->quote($x4));
$Hx->where($Mf);
uW:
$N5->setQuery($Hx);
$R9 = $N5->loadAssocList();
return $R9;
}
public static function getRoleMapping($u0)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_saml_role_mapping"));
$Hx->where($N5->quoteName("idp_id") . " = " . $u0["id"]);
$N5->setQuery($Hx);
$NR = $N5->loadAssoc();
return $NR;
}
public static function updateCurrentUserName($RW, $lF, $Hv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("name") . " = " . $N5->quote($lF), $N5->quoteName("username") . " = " . $N5->quote($Hv));
$Mf = array($N5->quoteName("id") . " = " . $N5->quote($RW));
$Hx->update($N5->quoteName("#__users"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function updateUsernameToSessionId($Hv, $Rc)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("username") . " = " . $N5->quote($Hv));
$Mf = array($N5->quoteName("session_id") . " = " . $N5->quote($Rc));
$Hx->update($N5->quoteName("#__session"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function auto_update_metadata($rf)
{
$sg = $rf["mdata_sync_interval"];
$RW = $rf["id"];
$Kf = time();
if (!($Kf >= $rf["metadata_check_timestamp"] || $rf["metadata_check_timestamp"] == 0)) {
goto BW;
}
if ($sg == "hourly") {
goto QV;
}
if ($sg == "daily") {
goto NW;
}
if ($sg == "weekly") {
goto rP;
}
$WP = 60 * 60 * 24 * 7 * 30;
goto Rb;
rP:
$WP = 60 * 60 * 24 * 7;
Rb:
goto q8;
NW:
$WP = 60 * 60 * 24;
q8:
goto eY;
QV:
$WP = 60 * 60;
eY:
$Kf = time() + $WP;
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("metadata_check_timestamp") . " = " . $N5->quote($Kf));
$Mf = array($N5->quoteName("id") . " = " . $N5->quote($RW));
$Hx->update($N5->quoteName("#__miniorange_saml_config"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
$gs = $rf["metadata_url"];
if (!($rf["auto_sync_enable"] == "on")) {
goto FQ;
}
require_once JPATH_SITE . DIRECTORY_SEPARATOR . "administrator" . DIRECTORY_SEPARATOR . "components" . DIRECTORY_SEPARATOR . "com_miniorange_saml" . DIRECTORY_SEPARATOR . "controllers" . DIRECTORY_SEPARATOR . "myaccount.php";
$gs = filter_var($gs, FILTER_SANITIZE_URL);
$iT = array("ssl" => array("verify_peer" => false, "verify_peer_name" => false));
$JY = file_get_contents($gs, false, stream_context_create($iT));
UtilitiesSAML::auto_upload_metadata($JY, $RW);
FQ:
BW:
}
public static function auto_upload_metadata($JY, $RW)
{
require_once JPATH_SITE . DIRECTORY_SEPARATOR . "administrator" . DIRECTORY_SEPARATOR . "components" . DIRECTORY_SEPARATOR . "com_miniorange_saml" . DIRECTORY_SEPARATOR . "helpers" . DIRECTORY_SEPARATOR . "MetadataReader.php";
$ZL = new DOMDocument();
$ZL->loadXML($JY);
restore_error_handler();
$Ju = $ZL->firstChild;
if (!empty($Ju)) {
goto rs;
}
return;
goto m4;
rs:
$GY = new IDPMetadataReader($ZL);
$p8 = $GY->getIdentityProviders();
if (!empty($p8)) {
goto v_;
}
return;
v_:
foreach ($p8 as $pn => $eh) {
$jv = $eh->getLoginURL("HTTP-Redirect");
$LT = $eh->getLogoutURL("HTTP-Redirect");
$b_ = $eh->getEntityID();
$AH = $eh->getSigningCertificate();
$g1 = implode(";", $AH);
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("idp_entity_id") . " = " . $N5->quote(isset($b_) ? $b_ : 0), $N5->quoteName("single_signon_service_url") . " = " . $N5->quote(isset($jv) ? $jv : 0), $N5->quoteName("single_logout_url") . " = " . $N5->quote(isset($LT) ? $LT : 0), $N5->quoteName("binding") . " = " . $N5->quote("HTTP-Redirect"), $N5->quoteName("certificate") . " = " . $N5->quote(isset($AH) ? $g1 : 0));
$Mf = array($N5->quoteName("id") . " =" . $N5->quote($RW));
$Hx->update($N5->quoteName("#__miniorange_saml_config"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
goto Pj;
yf:
}
Pj:
return;
m4:
}
public static function getCustomerDetails()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_saml_customer_details"));
$Hx->where($N5->quoteName("id") . " = 1");
$N5->setQuery($Hx);
$XB = $N5->loadAssoc();
return $XB;
}
public static function getCustomerincmk_lk($FW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select($FW);
$Hx->from("#__miniorange_saml_customer_details");
$Hx->where($N5->quoteName("id") . " = " . $N5->quote(1));
$N5->setQuery($Hx);
$Eh = $N5->loadColumn();
return $Eh;
}
public static function nOfSP()
{
$J5 = Mo_Saml_Local_Util::getCustomerDetails();
$eV = new Mo_saml_Local_Customer();
$a5 = $J5["customer_key"];
$w9 = $J5["api_key"];
$bG = json_decode($eV->ccl($a5, $w9), true);
$Kx = isset($bG["noOfSP"]) ? $bG["noOfSP"] : 0;
return $Kx;
}
public static function idpCnt()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select(array("*"));
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
$N5->setQuery($Hx);
$XB = $N5->loadAssocList();
$KQ = count($XB);
return $KQ;
}
public static function isIDPConfigured()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select($N5->quoteName(array("id")));
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
$N5->setQuery($Hx);
$XB = $N5->loadObjectList();
return $XB;
}
public static function generateCertificate($b9, $M2, $UH, $w2)
{
$M3 = JPATH_BASE;
$dz = substr($M3, 0, strrpos($M3, "administrator"));
$gx = $dz . "plugins" . DIRECTORY_SEPARATOR . "authentication" . DIRECTORY_SEPARATOR . "miniorangesaml" . DIRECTORY_SEPARATOR . "saml2" . DIRECTORY_SEPARATOR . "cert" . DIRECTORY_SEPARATOR . "openssl.cnf";
$uM = array("config" => $gx, "digest_alg" => "{$M2}", "private_key_bits" => $UH, "private_key_type" => OPENSSL_KEYTYPE_RSA);
$dv = openssl_pkey_new($uM);
$Gr = openssl_csr_new($b9, $dv, $uM);
$eY = openssl_csr_sign($Gr, null, $dv, $w2, $uM, time());
openssl_x509_export($eY, $NC);
openssl_pkey_export($dv, $Eq, null, $uM);
openssl_csr_export($Gr, $F1);
Ae:
if (!(($LD = openssl_error_string()) !== false)) {
goto Ri;
}
error_log($LD);
goto Ae;
Ri:
$r_ = array("public_key" => $NC, "private_key" => $Eq);
$oH = UtilitiesSAML::getCustom_CertificatePath("CustomPublicCertificate.crt");
file_put_contents($oH, $r_["public_key"]);
$Yn = UtilitiesSAML::getCustom_CertificatePath("CustomPrivateCertificate.key");
file_put_contents($Yn, $r_["private_key"]);
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("public_certificate") . " = " . $N5->quote(isset($r_["public_key"]) ? $r_["public_key"] : null), $N5->quoteName("private_certificate") . " = " . $N5->quote(isset($r_["private_key"]) ? $r_["private_key"] : null));
$Hx->update($N5->quoteName("#__miniorange_saml_config"))->set($t7);
$N5->setQuery($Hx);
$N5->execute();
}
public static function getCustom_CertificatePath($so)
{
$M3 = JPATH_BASE;
$dz = substr($M3, 0, strrpos($M3, "administrator"));
$Xd = $dz . "plugins" . DIRECTORY_SEPARATOR . "authentication" . DIRECTORY_SEPARATOR . "miniorangesaml" . DIRECTORY_SEPARATOR . "saml2" . DIRECTORY_SEPARATOR . "cert" . DIRECTORY_SEPARATOR . $so;
return $Xd;
}
public static function get_public_private_certificate($bD, $lz)
{
if (!isset($bD)) {
goto df;
}
foreach ($bD as $pn => $pm) {
foreach ($pm as $I_ => $mC) {
if (!($lz == "public_certificate" && $I_ == "public_certificate")) {
goto tt;
}
return $mC;
tt:
if (!($lz == "private_certificate" && $I_ == "private_certificate")) {
goto vn;
}
return $mC;
vn:
d5:
}
Dk:
ow:
}
zA:
df:
}
public static function updateActivationStatusForUser($Hv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("activation") . " = 0", $N5->quoteName("block") . " = 0");
$Mf = array($N5->quoteName("username") . " = " . $N5->quote($Hv));
$Hx->update($N5->quoteName("#__users"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function getDomainMapping()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select(array("idp_entity_id", "domain_mapping"));
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
$N5->setQuery($Hx);
$R9 = $N5->loadAssocList();
return $R9;
}
public static function getConifById($RW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
$Hx->where($N5->quoteName("id") . " = " . $N5->quote($RW));
$N5->setQuery($Hx);
$bD = $N5->loadAssoc();
return $bD;
}
public static function isCustomerRegistered()
{
$J5 = Mo_Saml_Local_Util::getCustomerDetails();
$ec = $J5["status"];
if (!Mo_Saml_Local_Util::is_customer_registered() || Mo_Saml_Local_Util::check($ec) != "true") {
goto yY;
}
return $Cy = '';
goto se;
yY:
return $Cy = "disabled";
se:
}
public static function createUpdateUrl($wp, $jW, $bE, $w9, $Jr, $VG, $KN)
{
$Ug = "1111111111111111" . $wp;
$gs = $VG . "/moas/api/plugin/drupalJoomlaUpdate/" . $Jr . "/" . $jW . "/" . $bE . "/";
$Ad = openssl_cipher_iv_length($ZQ = "AES-128-CBC");
$Df = openssl_random_pseudo_bytes($Ad);
$aw = openssl_encrypt($Ug, $ZQ, $w9, $bw = OPENSSL_RAW_DATA, $Df);
return $gs . str_replace(["+", "/", "="], ["-", "_", ''], base64_encode($aw)) . "/" . $KN . "/joomla";
}
public static function updateUpgardeUrlInDb($tF)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$xl[] = $N5->quoteName("location") . " = " . $N5->quote($tF);
$Ng = "MiniorangeSamlSSO";
$Hx->update($N5->quoteName("#__update_sites"))->set($xl)->where($N5->quoteName("name") . " = '" . $Ng . "'");
$N5->setQuery($Hx);
$N5->execute();
}
public static function getHostname()
{
return "https://login.xecurify.com";
}
public static function createAndUpdateUpgardeUrl()
{
if (!(in_array("openssl", get_loaded_extensions()) === FALSE)) {
goto JW;
}
return;
JW:
$TW = self::getHostname();
$J5 = self::getCustomerDetails();
if (!self::doWeHaveCorrectUpgardeUrl()) {
goto aF;
}
return;
aF:
$tF = self::createUpdateUrl(self::decrypt($J5["sml_lk"], $J5["customer_token"]), UtilitiesSAML::getLicensePlanName(), "JOOMLA_SAML_SP_ENTERPRISE_PLUGIN", $J5["api_key"], $J5["customer_key"], $TW, "com_miniorange_saml");
self::updateUpgardeUrlInDb($tF);
}
public static function doWeHaveCorrectUpgardeUrl()
{
$Ng = "MiniorangeSamlSSO";
$aO = "#__update_sites";
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName($aO));
$Hx->where($N5->quoteName("name") . " = '" . $Ng . "'");
$N5->setQuery($Hx);
$V3 = $N5->loadAssocList();
foreach ($V3 as $pn => $pm) {
if (!(stristr($pm["location"], "drupalJoomlaUpdate") !== FALSE)) {
goto qB;
}
return TRUE;
qB:
SL:
}
Vs:
return FALSE;
}
public static function decrypt($ZQ, $pn)
{
$co = rtrim(openssl_decrypt(base64_decode($ZQ), "aes-128-ecb", $pn, OPENSSL_RAW_DATA), "\0");
return trim($co, "\x0..\x1a");
}
public static function GetPluginVersion()
{
$N5 = JFactory::getDbo();
$sq = $N5->getQuery(true)->select("manifest_cache")->from($N5->quoteName("#__extensions"))->where($N5->quoteName("element") . " = " . $N5->quote("com_miniorange_saml"));
$N5->setQuery($sq);
$Qo = json_decode($N5->loadResult());
return $Qo->version;
}
public static function getPluginConfigurations($RW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("*");
$Hx->from($N5->quoteName("#__miniorange_saml_config"));
$Mf = array($N5->quoteName("id") . " = " . $N5->quote($RW));
$Hx->where($Mf);
$N5->setQuery($Hx);
$R9 = $N5->loadAssocList();
return $R9;
}
public static function fetchDetails($OC, $E6, $Es, $KG = TRUE)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select($OC);
$Hx->from($N5->quoteName($E6));
if (!($KG !== TRUE)) {
goto Ft;
}
foreach ($KG as $pn => $pm) {
$Hx->where($N5->quoteName($pn) . " = " . $N5->quote($pm));
rS:
}
Qr:
Ft:
$N5->setQuery($Hx);
if ($Es == "loadColumn") {
goto u9;
}
if ($Es == "loadObjectList") {
goto gm;
}
if ($Es == "loadObject") {
goto Su;
}
if ($Es == "loadResult") {
goto v8;
}
if ($Es == "loadRow") {
goto Bv;
}
if ($Es == "loadRowList") {
goto im;
}
if ($Es == "loadAssocList") {
goto BD;
}
return $N5->loadAssoc();
goto qU;
BD:
return $N5->loadAssocList();
qU:
goto QC;
im:
return $N5->loadRowList();
QC:
goto ln;
Bv:
return $N5->loadRow();
ln:
goto Fy;
v8:
return $N5->loadResult();
Fy:
goto aH;
Su:
return $N5->loadObject();
aH:
goto oD;
gm:
return $N5->loadObjectList();
oD:
goto b6;
u9:
return $N5->loadColumn();
b6:
}
public static function isLoginReportAddonEnable()
{
$Ms = array("miniorangeloginreport");
foreach ($Ms as $pn) {
return self::checkExtensionEnabled($pn);
Fl:
}
Zw:
}
public static function checkExtensionEnabled($Lv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("enabled");
$Hx->from("#__extensions");
$Hx->where($N5->quoteName("element") . " = " . $N5->quote($Lv));
$Hx->where($N5->quoteName("type") . " = " . $N5->quote("plugin"));
$N5->setQuery($Hx);
return $N5->loadAssoc();
}
public static function mo_log($zy)
{
$Fh = $_SERVER["DOCUMENT_ROOT"] . "/log/log.log";
$U2 = $_SERVER["DOCUMENT_ROOT"] . "/log";
if (file_exists($U2)) {
goto ta;
}
mkdir($U2, 0777, true);
ta:
file_put_contents($Fh, $zy . "\xa", FILE_APPEND);
}
public static function check_table_present($Fr)
{
$Hf = 0;
$W4 = JFactory::getDbo()->getTableList();
foreach ($W4 as $aO) {
if (!(strpos($aO, $Fr) !== FALSE)) {
goto Pp;
}
$Hf = 1;
Pp:
z8:
}
b1:
return $Hf;
}
public static function _cuc()
{
$JN = self::loadCustomerDetails("#__miniorange_saml_customer_details");
$gI = strtotime($JN["licenseExpiry"]);
$gI = $gI === FALSE || $gI <= -62169987208 ? "-" : date("F j, Y, g:i a", $gI);
$pV = self::licenseExpiryDay();
$uM = JFactory::getConfig();
$hY = $uM->get("sitename");
$AF = "JOOMLA SAML SP Enterprise";
$n2 = "License Expire of Joomla SAML Single Sign-On |" . $hY;
$V5 = "Hello,<br /><br />Your license for <b>" . $AF . "</b> plan is going to expire on " . $gI . " for your website: <b>" . $hY . "</b>.<br /> <br /> Please renew your license as soon as possible to receive plugin updates providing security patches, bug fixes, new features, or even compatibility adjustments. If you want to renew your license please reach out to us at <b>[email protected]</b><br /><br />Thanks,<br />miniOrange Team";
$MZ = "Hello,<br /><br />Your license for <b>" . $AF . "</b> plan has expired on " . $gI . " for your website: <b>" . $hY . "</b>.<br /> <br /> Please renew your license as soon as possible to receive plugin updates providing security patches, bug fixes, new features, or even compatibility adjustments. If you want to renew your license please reach out to us at <b>[email protected]</b><br /><br />Thanks,<br />miniOrange Team";
$HM = "#__miniorange_saml_customer_details";
$eV = new Mo_saml_Local_Customer();
if ($pV <= 15 && $pV > 5 && !$JN["miniorange_fifteen_days_before_lexp"]) {
goto g3;
}
if ($pV <= 5 && $pV > 0 && !$JN["miniorange_five_days_before_lexp"]) {
goto SI;
}
if ($pV <= 0 && $pV > -5 && !$JN["miniorange_after_lexp"]) {
goto tJ;
}
if (!($pV == -5 && !$JN["miniorange_after_five_days_lexp"])) {
goto nv;
}
if (self::licensevalidity($gI)) {
goto Pt;
}
self::_update_lid("miniorange_after_five_days_lexp");
json_decode($eV->send_email_alert($n2, $MZ), true);
Pt:
nv:
goto vR;
tJ:
if (self::licensevalidity($gI)) {
goto gA;
}
self::_update_lid("miniorange_after_lexp");
json_decode($eV->send_email_alert($n2, $MZ), true);
gA:
vR:
goto Eo;
SI:
if (self::licensevalidity($gI)) {
goto ma;
}
self::_update_lid("miniorange_five_days_before_lexp");
json_decode($eV->send_email_alert($n2, $V5), true);
ma:
Eo:
goto fY;
g3:
if (self::licensevalidity($gI)) {
goto l_;
}
self::_update_lid("miniorange_fifteen_days_before_lexp");
json_decode($eV->send_email_alert($n2, $V5), true);
l_:
fY:
}
public static function licenseExpiryDay()
{
$JN = self::getExpiryDate();
$gk = intval((strtotime($JN["licenseExpiry"]) - time()) / (60 * 60 * 24));
return $gk;
}
public static function licensevalidity($X8)
{
$J5 = self::loadCustomerDetails("#__miniorange_saml_customer_details");
$a5 = isset($J5["customer_key"]) ? $J5["customer_key"] : '';
$w9 = isset($J5["api_key"]) ? $J5["api_key"] : '';
$eV = new Mo_saml_Local_Customer();
$Bn = json_decode($eV->ccl($a5, $w9), true);
$Ro = $Bn["licenseExpiry"];
if ($Ro > $X8) {
goto kb;
}
return FALSE;
goto Fi;
kb:
$HM = "#__miniorange_saml_customer_details";
$e6 = array("licenseExpiry" => $Ro);
self::__genDBUpdate($HM, $e6);
return TRUE;
Fi:
}
public static function _update_lid($mC)
{
$N5 = jFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName($mC) . " = " . $N5->quote(1));
$Mf = array($N5->quoteName("id") . " = " . $N5->quote(1));
$Hx->update($N5->quoteName("#__miniorange_saml_customer_details"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
}
?>
Did this file decode correctly?
Original Code
<?php
include "\170\155\154\x73\x65\143\x6c\x69\x62\x73\123\101\x4d\x4c\56\160\150\160";
use Joomla\CMS\User\User;
require_once JPATH_SITE . DIRECTORY_SEPARATOR . "\141\144\x6d\x69\x6e\151\163\x74\162\x61\x74\x6f\x72" . DIRECTORY_SEPARATOR . "\x63\x6f\x6d\160\157\156\145\156\164\163" . DIRECTORY_SEPARATOR . "\143\x6f\x6d\x5f\x6d\x69\x6e\x69\x6f\x72\141\156\x67\145\137\163\x61\155\x6c" . DIRECTORY_SEPARATOR . "\150\x65\x6c\160\x65\x72\x73" . DIRECTORY_SEPARATOR . "\x6d\x6f\x2d\163\x61\155\154\55\x63\x75\163\x74\157\155\x65\162\x2d\163\x65\x74\x75\x70\56\x70\x68\x70";
class UtilitiesSAML
{
public static function getRoleBasedRedirectionConfiguration()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\43\x5f\x5f\x6d\151\x6e\x69\157\x72\x61\156\x67\x65\137\162\x6f\x6c\145\x62\141\163\x65\144\x72\145\x64\x69\162\x65\143\x74\151\x6f\x6e\137\x73\145\164\164\151\156\147\x73"));
$N5->setQuery($Hx);
return $N5->loadAssoc();
}
public static function isRolebasedRedirectionPluginInstalled()
{
$Ms = array("\x6d\151\x6e\x69\157\162\x61\156\x67\x65\x72\157\154\x65\x62\141\x73\145\x64\162\x65\x64\x69\x72\145\143\164\x69\157\156", "\x6d\151\156\151\x6f\162\x61\156\x67\145\x61\x75\x74\x68\162\157\x6c\x65\x62\x61\x73\x65\144\162\145\144\151\x72\x65\x63\164\x69\x6f\x6e");
foreach ($Ms as $pn) {
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x65\x6e\141\x62\154\145\x64");
$Hx->from("\43\x5f\137\x65\x78\164\145\156\163\151\157\x6e\x73");
$Hx->where($N5->quoteName("\x65\154\x65\x6d\x65\x6e\x74") . "\40\x3d\40" . $N5->quote($pn));
$Hx->where($N5->quoteName("\164\x79\x70\x65") . "\40\x3d\40" . $N5->quote("\160\x6c\x75\147\151\156"));
$N5->setQuery($Hx);
return $N5->loadAssoc();
R6:
}
U4:
}
public static function saveUserInDB($post, $fd)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$aD = date("\x59\x2d\155\x2d\144\x20\x48\72\x69\x3a\163");
$Ik = array("\x6e\x61\155\145", "\165\x73\145\x72\x6e\141\x6d\x65", "\x65\x6d\141\151\x6c", "\x70\x61\163\x73\x77\157\162\x64", "\x72\145\147\151\x73\x74\145\162\104\141\164\x65", "\160\141\162\141\x6d\x73");
$rS = array($N5->quote($post["\156\141\x6d\145"]), $N5->quote($post["\x75\x73\x65\162\x6e\x61\155\145"]), $N5->quote($post["\x65\155\x61\x69\154"]), $N5->quote($post["\160\141\x73\163\167\157\162\x64"]), $N5->quote($aD), $N5->quote(''));
$Hx->insert($N5->quoteName("\43\137\x5f\165\163\x65\x72\163"))->columns($N5->quoteName($Ik))->values(implode("\54", $rS));
$N5->setQuery($Hx);
$N5->execute();
}
public static function updateUserGroup($hO, $sm)
{
$hO = (int) $hO;
$sm = (int) $sm;
$user = JFactory::getUser($hO);
$x1 = self::getLoginUserGroupId($hO);
if (\in_array($sm, $x1)) {
goto Ol;
}
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Ik = array("\165\x73\145\x72\137\x69\x64", "\x67\162\157\x75\160\137\x69\x64");
$rS = array($N5->quote($hO), $N5->quote($sm));
$Hx->insert($N5->quoteName("\43\137\137\x75\163\x65\162\137\x75\163\x65\x72\x67\162\157\165\160\x5f\x6d\141\160"))->columns($N5->quoteName($Ik))->values(implode("\54", $rS));
$N5->setQuery($Hx);
$N5->execute();
Ol:
$El = JFactory::getUser($hO);
$El->groups = $user->groups;
if (!JFactory::getSession()->getId()) {
goto r6;
}
$El = JFactory::getUser();
if (!($El->id == $hO)) {
goto b3;
}
$El->groups = $user->groups;
b3:
r6:
return true;
}
public static function removeUserGroups($h8, $xV)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Mf = array($N5->quoteName("\165\x73\145\162\x5f\151\144") . "\40\75\x20" . $N5->quote($h8), $N5->quoteName("\147\x72\157\x75\160\137\151\144") . "\x20\x3d\x20" . $N5->quote($xV));
$Hx->delete($N5->quoteName("\43\137\137\165\163\145\162\x5f\x75\x73\x65\x72\147\x72\157\165\x70\x5f\x6d\141\160"));
$Hx->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function addUser($GW)
{
$HM = "\43\x5f\137\155\x69\156\x69\x6f\162\141\156\x67\145\137\163\x61\155\x6c\x5f\143\x75\163\x74\x6f\x6d\x65\162\x5f\x64\x65\x74\x61\x69\154\x73";
$e6 = array("\165\163\162\154\155\x74" => $GW + 1);
self::__genDBUpdate($HM, $e6);
}
public static function showErrorMessage($JJ, $dR)
{
echo "\40\x20\x20\x20\x20\40\40\x20\x3c\x64\151\166\40\163\164\171\154\145\x3d\x22\146\157\156\x74\x2d\146\141\155\x69\154\x79\x3a\103\141\154\151\x62\162\151\73\160\141\x64\144\x69\156\x67\x3a\x30\x20\63\x25\73\x22\x3e\15\12\x20\x20\40\x20\40\x20\x20\x20\40\x20\40\x20\74\x64\x69\166\x20\163\164\171\154\145\x3d\x22\x63\x6f\x6c\157\x72\x3a\x20\x23\x61\x39\x34\x34\x34\62\x3b\142\x61\x63\153\x67\x72\157\165\x6e\144\55\x63\x6f\x6c\157\x72\x3a\x20\43\x66\62\x64\145\x64\x65\73\x70\x61\x64\144\151\x6e\147\72\40\x31\65\x70\x78\x3b\x6d\x61\162\x67\x69\x6e\55\x62\x6f\x74\x74\x6f\x6d\x3a\x20\62\x30\x70\x78\x3b\x74\145\x78\x74\55\x61\154\x69\147\x6e\x3a\x63\x65\x6e\x74\145\162\73\142\157\x72\x64\145\x72\x3a\x31\160\170\x20\163\x6f\x6c\x69\x64\40\x23\105\x36\x42\x33\102\62\73\146\x6f\156\164\x2d\163\x69\172\x65\x3a\61\x38\x70\x74\73\42\x3e\x20\x45\x52\x52\x4f\122\74\x2f\144\x69\166\76\xd\xa\40\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\40\x3c\144\x69\x76\x20\x73\x74\171\x6c\x65\x3d\42\x63\x6f\154\157\x72\72\x20\x23\141\71\x34\64\64\62\73\146\x6f\x6e\164\55\163\151\172\145\x3a\61\x34\160\x74\x3b\40\x6d\141\162\147\151\156\x2d\142\157\x74\164\157\x6d\72\x32\x30\x70\170\x3b\x22\76\xd\12\40\40\x20\40\x20\x20\40\40\40\40\x20\40\x20\40\x20\x20\74\160\76\74\x73\164\x72\x6f\x6e\147\76\105\162\162\x6f\162\x3a\x20\x3c\57\x73\x74\x72\157\156\x67\76\40\120\154\x65\x61\x73\x65\x20\143\157\156\x74\141\x63\164\40\x74\x6f\40\171\x6f\165\162\40\x41\x64\155\156\151\x73\164\162\141\x74\157\x72\x2e\x3c\57\160\76\xd\xa\40\40\x20\x20\x20\40\x20\x20\40\40\x20\x20\40\x20\x20\x20\74\x70\76\74\x73\x74\162\157\156\x67\x3e\x50\x6f\x73\163\151\x62\154\x65\x20\x43\141\165\x73\145\72\40\x3c\x2f\163\164\162\x6f\x6e\147\76";
echo $JJ;
echo "\74\57\x70\x3e\xd\xa\x20\40\x20\40\40\x20\40\40\40\x20\x20\x20\40\x20\40\x20\74\x70\76\x3c\x73\x74\x72\157\156\x67\x3e\122\145\146\145\162\145\156\143\x65\40\x4e\x6f\72\x20\x3c\57\x73\164\162\157\x6e\147\x3e";
echo $dR;
echo "\x20\x20\40\40\40\x20\40\40\40\x20\40\40\74\x2f\x64\151\x76\x3e\xd\xa\x20\x20\x20\x20\40\40\40\40\40\x20\40\x20\x3c\x66\157\162\x6d\40\x61\143\164\151\x6f\156\x3d\x22";
echo JURI::root();
echo "\42\76\xd\xa\x20\40\x20\40\x20\40\x20\40\x20\40\40\x20\x20\40\x20\40\74\x64\151\166\x20\x73\x74\x79\154\145\x3d\42\x6d\141\x72\147\151\x6e\72\x33\x25\73\x64\151\163\x70\x6c\x61\x79\72\x62\x6c\157\143\153\73\164\145\170\164\55\x61\x6c\x69\x67\x6e\x3a\143\x65\x6e\164\x65\162\x3b\x22\x3e\15\12\x20\40\40\40\x20\x20\40\40\40\40\40\x20\x20\40\40\x20\x20\x20\40\x20\x3c\x69\156\160\x75\164\40\163\x74\171\154\x65\x3d\x22\160\141\x64\x64\151\x6e\x67\72\61\45\73\167\x69\144\x74\150\72\61\60\x30\x70\170\x3b\142\x61\143\153\147\162\x6f\165\156\144\72\x20\x23\x30\60\71\x31\x43\x44\x20\156\x6f\x6e\145\40\162\145\x70\145\x61\x74\x20\x73\143\162\x6f\154\x6c\x20\60\45\x20\x30\45\x3b\143\x75\162\163\157\x72\72\40\x70\157\x69\156\x74\x65\162\73\x66\157\156\x74\55\x73\151\x7a\145\x3a\x31\x35\160\170\x3b\x62\157\162\x64\145\162\x2d\x77\151\144\x74\x68\x3a\x20\61\x70\170\x3b\142\x6f\162\144\145\162\55\163\164\x79\154\145\72\40\x73\x6f\x6c\151\144\x3b\x62\157\162\x64\x65\x72\x2d\162\x61\x64\151\x75\x73\72\40\63\160\170\73\x77\150\151\x74\x65\55\x73\x70\141\143\x65\72\40\x6e\x6f\x77\162\x61\160\x3b\142\x6f\x78\x2d\x73\x69\172\x69\156\x67\72\40\142\157\x72\144\145\162\55\x62\x6f\x78\x3b\142\157\162\x64\145\162\x2d\143\157\154\157\162\72\40\x23\x30\x30\67\x33\101\101\x3b\142\157\x78\x2d\163\150\141\144\157\x77\72\x20\x30\160\170\x20\61\160\x78\40\60\x70\170\x20\162\147\142\x61\50\x31\62\x30\54\40\x32\x30\x30\54\40\x32\63\60\x2c\x20\60\x2e\66\x29\x20\151\x6e\x73\x65\x74\73\143\x6f\x6c\157\162\72\x20\43\106\106\x46\x3b\42\40\164\x79\160\x65\75\42\x73\x75\142\155\151\x74\42\x20\166\141\154\165\145\x3d\42\x44\157\156\x65\x22\40\157\156\103\x6c\151\143\x6b\x3d\x22\163\145\x6c\x66\56\x63\154\157\x73\145\x28\51\73\42\76\xd\xa\x20\40\40\40\40\40\x20\x20\40\x20\40\x20\x20\40\40\40\x3c\x2f\x64\151\166\x3e\xd\xa\x20\40\x20\x20\x20\x20\x20\x20\40\x20\x20\x20\74\57\x66\157\162\155\x3e\15\12\x20\40\40\40\x20\x20\40\x20\x3c\57\144\x69\166\x3e\15\xa\40\40\40\x20\40\40\x20\x20";
exit;
}
public static function getUserGroupID($xV)
{
foreach ($xV as $Ae) {
$OR = $Ae;
jk:
}
Ef:
return $OR;
}
public static function loadUserGroups()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\x23\x5f\x5f\165\x73\x65\162\147\162\157\x75\x70\163"));
$N5->setQuery($Hx);
return $N5->loadRowList();
}
public static function CheckUserGroup($OR)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x74\x69\x74\154\145");
$Hx->from($N5->quoteName("\x23\137\137\165\x73\x65\x72\x67\x72\x6f\x75\160\x73"));
$Hx->where($N5->quoteName("\151\x64") . "\40\x3d\40" . $N5->quote($OR));
$N5->setQuery($Hx);
return $N5->loadResult();
}
public static function getLoginUserGroupId($RW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\147\162\x6f\165\160\137\x69\144");
$Hx->from($N5->quoteName("\43\137\137\165\163\145\162\137\x75\163\x65\162\x67\162\x6f\x75\x70\137\155\141\x70"));
$Hx->where($N5->quoteName("\x75\x73\145\x72\137\151\144") . "\x20\75\x20" . $N5->quote($RW));
$N5->setQuery($Hx);
return $N5->loadColumn();
}
public static function isSuperUser()
{
$user = JFactory::getUser();
return $user->get("\x69\x73\122\157\x6f\164");
}
public static function getJoomlaCmsVersion()
{
$La = new JVersion();
return $La->getShortVersion();
}
public static function auto_fetch_details()
{
$WP = 60 * 60 * 24;
$J5 = self::getCustomerDetails();
$Kf = time();
if (!($Kf >= $J5["\x61\165\x74\x6f\x5f\x73\x65\x6e\x64\137\x65\155\x61\151\x6c\x5f\x74\x69\155\x65"] || $J5["\141\x75\164\157\x5f\163\145\x6e\x64\137\x65\155\141\151\154\137\x74\151\155\x65"] == 0)) {
goto mr;
}
$Kf = time() + $WP;
$HM = "\x23\137\137\155\x69\156\x69\157\162\x61\x6e\147\x65\x5f\x73\141\x6d\x6c\137\x63\x75\163\x74\x6f\x6d\145\162\137\144\145\164\x61\x69\154\x73";
$e6 = array("\141\165\x74\x6f\x5f\163\x65\x6e\x64\137\145\155\141\151\154\137\164\x69\155\x65" => $Kf);
self::__genDBUpdate($HM, $e6);
$eV = new Mo_saml_Local_Customer();
$JN = json_decode($eV->submit_feedback_form(1), true);
mr:
}
public static function renewalMessage($D7, $oa, $sR)
{
$vV = "\40";
$HQ = "\40";
if (!($sR == "\x70\154\x75\x67\x69\x6e")) {
goto Co;
}
$vV = "\x77\x69\144\164\x68\x3a\x38\60\45\x3b\146\154\x6f\141\x74\x3a\154\145\x66\164\73\x6d\x61\162\x67\x69\156\55\154\x65\146\164\x3a\x31\60\x25";
Co:
if (!($D7["\114\151\143\x65\x6e\163\145\105\170\160\x69\162\145\x64"] == 1)) {
goto kz;
}
$HQ = "\74\144\x69\166\x20\143\154\x61\163\163\75\x22\142\141\143\153\x67\x72\x6f\x75\x6e\144\137\x63\157\154\157\162\x5f\x75\160\x64\x61\x74\145\x5f\155\145\x73\163\x61\x67\145\40\155\163\x2d\x61\x75\x74\157\42\x20\x73\164\x79\154\145\x3d\x22" . $vV . "\x64\151\163\x70\x6c\141\171\72\x62\x6c\157\143\x6b\x3b\x63\x6f\x6c\157\162\x3a\162\145\x64\73\142\141\143\153\x67\162\157\x75\156\144\x2d\x63\x6f\154\157\162\x3a\x72\147\142\x61\x28\62\x35\x31\x2c\40\x32\63\x32\x2c\40\60\54\x20\60\x2e\61\65\x29\x3b\40\142\x6f\162\144\145\x72\72\x73\x6f\x6c\x69\x64\x20\x31\x70\x78\x20\162\147\x62\x61\x28\62\x35\x35\x2c\x20\60\x2c\x20\x39\x2c\40\x30\56\63\x36\x29\73\160\x61\x64\x64\151\x6e\147\x3a\40\61\60\x70\170\x20\x3b\155\x61\x72\147\151\156\x3a\x20\x31\60\x70\170\x20\73\42\x3e\15\12\x20\40\x20\x20\40\40\x20\40\x20\40\x20\x20\131\157\165\x72\40\155\151\156\x69\x4f\162\x61\156\x67\x65\40\112\157\x6f\155\x6c\x61\40\x53\101\115\114\x20\x53\120\x20\160\x6c\x75\x67\x69\156\40\x6c\151\x63\145\156\x73\x65\40\x68\141\163\40\x65\170\160\x69\x72\145\x64\x20\157\x6e\x20\74\x73\164\162\157\156\147\76\x20" . $oa . "\x3c\57\x73\x74\x72\x6f\x6e\x67\x3e\x2e\x20\x54\x68\x69\163\x20\x68\x61\x73\x20\x70\x72\145\166\x65\x6e\164\x65\x64\x20\171\x6f\165\40\x66\162\x6f\x6d\x20\162\x65\143\145\x69\x76\151\x6e\147\x20\141\156\171\40\x70\154\165\147\x69\156\x20\x75\160\144\141\164\x65\163\40\x63\x6f\156\x74\x61\151\156\x69\x6e\147\x20\x73\145\x63\x75\x72\151\x74\x79\x20\160\x61\164\143\150\x65\163\x2c\x20\x62\x75\147\40\x66\x69\170\x65\163\54\40\156\x65\x77\x20\146\x65\141\164\165\x72\145\163\54\40\141\x6e\x64\x20\x65\x76\145\156\40\143\x6f\x6d\x70\141\x74\x69\142\151\x6c\x69\x74\x79\x20\143\150\x61\156\x67\145\x73\56\40\106\157\162\40\x66\165\162\164\150\x65\162\x20\x69\x6e\161\x75\x69\162\171\x20\160\x6c\145\x61\x73\145\x20\x63\x6f\x6e\164\141\143\164\40\x3c\x61\40\163\164\x79\154\145\75\x22\x63\157\154\x6f\x72\72\x72\145\144\73\42\40\x68\x72\x65\x66\x3d\x22\155\141\151\154\164\x6f\72\152\157\157\155\x6c\141\163\165\x70\160\x6f\162\164\x40\170\x65\143\x69\162\x69\x66\171\56\x63\x6f\x6d\x22\76\74\163\x74\162\157\x6e\147\x3e\x6a\157\x6f\x6d\154\141\x73\x75\160\x70\157\162\x74\x40\170\x65\x63\x75\162\x69\146\171\56\143\157\x6d\74\x2f\163\164\162\157\156\x67\76\74\57\141\76\15\12\40\40\40\40\40\x20\x20\40\x20\40\x20\x20\x3c\57\144\151\x76\76";
kz:
if (!($D7["\x4c\151\x63\x65\156\163\x65\105\170\160\151\x72\171"] == 1)) {
goto Fz;
}
$HQ = "\74\x64\151\x76\x20\143\x6c\141\163\163\x3d\x22\x62\141\x63\153\x67\162\x6f\x75\x6e\144\x5f\x63\x6f\x6c\157\162\137\165\x70\144\x61\164\x65\x5f\x6d\145\163\x73\x61\147\145\40\155\x73\x2d\141\165\x74\157\42\40\163\164\x79\x6c\x65\75\x22" . $vV . "\x64\151\163\x70\x6c\141\x79\72\x62\x6c\157\143\153\73\x63\157\x6c\x6f\162\x3a\x72\145\144\x20\x3b\40\142\x61\143\153\x67\162\157\x75\x6e\x64\x2d\x63\157\x6c\x6f\x72\72\162\147\x62\x61\x28\x32\x35\61\x2c\40\x32\x33\62\54\x20\x30\54\x20\60\56\61\65\x29\x3b\40\142\x6f\162\144\145\x72\x3a\163\x6f\154\x69\144\40\x31\x70\x78\x20\x72\x67\142\x61\x28\62\65\65\x2c\x20\60\x2c\x20\x39\54\x20\60\x2e\63\66\x29\73\160\141\x64\x64\151\x6e\147\x3a\x20\x31\60\160\x78\x20\x3b\155\x61\x72\x67\x69\x6e\72\x20\x31\60\x70\170\73\42\76\xd\xa\x20\x20\40\x20\40\x20\40\40\x20\40\x20\x20\x59\157\165\162\x20\155\x69\156\151\117\162\141\156\147\x65\40\112\x6f\157\155\154\x61\40\x53\x41\x4d\114\x20\x53\120\40\160\154\165\x67\x69\156\x20\x6c\x69\x63\145\x6e\163\x65\x20\x77\151\x6c\x6c\x20\145\x78\160\x69\x72\145\40\157\156\74\163\164\x72\x6f\156\147\76\x20" . $oa . "\x3c\x2f\163\164\x72\157\x6e\x67\x3e\56\40\x54\150\151\x73\40\x68\141\163\40\x70\162\145\x76\145\156\164\x65\144\x20\171\157\x75\x20\146\x72\157\155\x20\x72\x65\143\145\151\x76\151\156\147\x20\141\x6e\x79\x20\x70\154\x75\x67\151\x6e\x20\x75\160\x64\x61\x74\x65\x73\40\x63\x6f\x6e\164\x61\151\156\x69\156\x67\40\163\145\x63\165\162\x69\x74\171\x20\160\141\x74\143\x68\145\163\x2c\x20\142\165\147\x20\146\x69\170\145\x73\54\40\x6e\x65\167\40\146\x65\141\x74\165\162\145\x73\54\40\x61\x6e\x64\40\x65\x76\x65\156\40\x63\x6f\x6d\x70\141\164\x69\x62\x69\154\151\x74\171\40\143\150\x61\156\x67\145\163\x2e\40\x46\157\162\40\x66\165\x72\164\x68\145\x72\x20\x69\x6e\161\165\151\x72\x79\40\x70\154\x65\141\163\x65\x20\x63\x6f\x6e\164\x61\x63\164\40\74\x61\x20\x73\x74\x79\154\x65\x3d\42\143\157\x6c\157\x72\x3a\162\145\x64\x3b\42\40\x68\162\145\146\x3d\x22\155\141\151\154\x74\157\72\152\x6f\157\155\x6c\141\x73\x75\160\160\157\x72\x74\x40\170\145\x63\151\162\151\146\x79\x2e\x63\x6f\155\x22\76\x3c\x73\164\162\x6f\x6e\147\x3e\152\157\157\155\154\141\163\165\x70\x70\157\162\x74\100\x78\145\143\165\162\151\146\x79\56\x63\157\x6d\74\x2f\163\164\x72\x6f\156\147\76\74\57\x61\76\15\xa\40\40\40\x20\x20\x20\x20\40\x20\x20\40\x20\x3c\x2f\x64\x69\166\76";
Fz:
return $HQ;
}
public static function checkIsLicenseExpired()
{
$JN = self::getExpiryDate();
$zi = isset($JN["\x6c\x69\x63\145\156\163\x65\x45\170\160\x69\x72\171"]) ? $JN["\x6c\151\143\145\x6e\163\x65\x45\170\x70\x69\x72\x79"] : "\x30\60\x30\60\55\60\x30\55\x30\x30\40\x30\60\72\x30\60\72\x30\x30";
$gk = intval((strtotime($zi) - time()) / (60 * 60 * 24));
$D7 = array();
$D7["\x4c\151\x63\145\156\x73\145\105\170\160\151\162\171"] = $gk >= 0 && $gk < 31 ? TRUE : FALSE;
$D7["\114\x69\x63\x65\x6e\x73\x65\x45\170\160\x69\162\145\144"] = $gk > -30 && $gk < 0 ? TRUE : FALSE;
$D7["\x4c\x69\x63\145\x6e\163\145\x54\x72\x69\x61\x6c\105\170\x70\x69\x72\x79"] = $gk > 0 && $gk < 2 ? TRUE : FALSE;
return $D7;
}
public static function getExpiryDate()
{
$N5 = JFactory::getDbo();
$N5->setQuery($N5->getQuery(true)->select("\52")->from("\x23\x5f\137\x6d\151\x6e\x69\157\x72\x61\156\x67\x65\x5f\163\x61\155\x6c\x5f\143\x75\163\164\x6f\x6d\x65\x72\137\144\x65\164\141\x69\154\x73"));
return $N5->loadAssoc();
}
public static function showLicenseExpiryMessage($D7)
{
$JQ = self::getExpiryDate();
$Tn = strtotime($JQ["\x6c\151\143\x65\156\x73\x65\x45\x78\x70\x69\x72\171"]);
$Tn = $Tn === FALSE || $Tn <= -62169987208 ? "\x2d" : date("\x46\40\x6a\54\40\131\x2c\x20\x67\x3a\x69\x20\x61", $Tn);
$JN = JFactory::getApplication()->input->get->getArray();
$BZ = isset($_SERVER["\122\x45\x51\x55\x45\x53\x54\x5f\125\x52\x49"]) ? $_SERVER["\122\x45\x51\125\x45\123\124\137\x55\x52\111"] : '';
$K6 = substr($BZ, "\55\x32\x33");
$Un = isset($JN["\157\x70\x74\151\x6f\156"]) ? $JN["\x6f\x70\x74\x69\x6f\x6e"] : '';
$Hd = Joomla\CMS\Factory::getApplication();
$v9 = 0;
if (!($Hd->getName() == "\x61\144\155\151\x6e\151\x73\164\162\x61\x74\157\x72")) {
goto k4;
}
$user = JFactory::getUser();
$v9 = self::IsUserSuperUser($user);
k4:
$MI = self::getUpgradeURL(self::getLicenseType());
if (!(($Un === "\x63\x6f\x6d\137\x6d\151\x6e\x69\x6f\162\x61\x6e\147\145\137\163\141\155\x6c" || $K6 == "\x61\144\155\151\156\151\x73\164\162\x61\164\x6f\162\57\x69\156\144\x65\x78\x2e\x70\150\x70") && $v9)) {
goto Ep;
}
if ($D7["\114\x69\143\145\x6e\163\145\x45\170\160\151\162\x65\144"] || $D7["\114\x69\x63\145\156\x73\145\105\x78\160\151\162\171"]) {
goto ok;
}
return 0;
goto zv;
ok:
return 1;
zv:
Ep:
}
public static function getLicenseType()
{
return "\112\x4f\117\115\x4c\x41\137\123\101\x4d\114\137\123\x50\x5f\105\116\124\105\122\x50\x52\x49\x53\105\x5f\120\x4c\125\107\x49\x4e";
}
public static function getUpgradeURL($A3)
{
$O9 = self::getUserEmail();
return "\x68\164\x74\160\163\72\x2f\x2f\x6c\157\147\151\x6e\56\x78\x65\x63\165\x72\x69\x66\x79\56\x63\x6f\x6d\x2f\155\x6f\x61\163\x2f\x6c\x6f\x67\x69\x6e\x3f\165\x73\x65\162\x6e\x61\155\145\75" . $O9 . "\x26\x72\x65\144\151\x72\x65\143\164\125\162\154\75\150\x74\x74\160\163\72\57\x2f\x6c\157\147\x69\156\x2e\170\145\143\x75\x72\151\146\x79\x2e\143\x6f\x6d\x2f\x6d\157\x61\163\57\141\144\155\x69\x6e\x2f\x63\x75\x73\x74\x6f\x6d\x65\162\x2f\154\x69\143\x65\x6e\163\x65\162\x65\156\145\x77\x61\154\163\x3f\x72\x65\156\x65\167\x61\x6c\x72\145\161\165\145\163\164\75" . $A3;
}
public static function getUserEmail()
{
$Eh = self::loadCustomerDetails("\x23\x5f\137\x6d\x69\156\151\x6f\162\141\x6e\x67\145\137\x73\x61\x6d\154\x5f\x63\x75\x73\164\x6f\155\x65\x72\137\144\x65\x74\x61\151\154\x73");
return $u6 = isset($Eh["\145\155\x61\151\x6c"]) ? $Eh["\145\x6d\x61\151\154"] : '';
}
public static function loadCustomerDetails($aO)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName($aO));
$Hx->where($N5->quoteName("\151\144") . "\x20\75\40\61");
$N5->setQuery($Hx);
$ht = $N5->loadAssoc();
return $ht;
}
public static function getGroupNames($iS)
{
$ft = array();
if (!is_array($iS)) {
goto KB;
}
foreach ($iS as $OR) {
array_push($ft, self::CheckUserGroup($OR));
vq:
}
xC:
KB:
return $ft;
}
public static function IsUserSuperUser($user)
{
$iS = UtilitiesSAML::getLoginUserGroupId($user->id);
$ft = UtilitiesSAML::getGroupNames($iS);
if (!(in_array("\67", $iS) || in_array("\70", $iS) || in_array("\141\144\x6d\151\156\151\x73\x74\162\x61\x74\157\x72", $ft) || in_array("\x41\x64\x6d\x69\x6e\x69\x73\164\x72\x61\164\157\x72", $ft) || in_array("\x53\x75\x70\x65\162\x20\125\163\x65\x72\x73", $ft))) {
goto Ok;
}
return true;
Ok:
return false;
}
public static function IsUserManager($user)
{
$iS = UtilitiesSAML::getLoginUserGroupId($user->id);
$ft = UtilitiesSAML::getGroupNames($iS);
if (!(in_array("\x36", $iS) || in_array("\115\141\x6e\x61\147\x65\162", $ft) || in_array("\155\141\156\x61\147\145\x72", $ft))) {
goto Os;
}
return true;
Os:
return false;
}
public static function IsUserSuperUserChild($user)
{
$OR = UtilitiesSAML::getLoginUserGroupId($user->id);
$ft = UtilitiesSAML::getGroupNames($OR);
foreach ($OR as $X5) {
$ch = empty(UtilitiesSAML::CheckUserParentGroup($X5)) ? '' : UtilitiesSAML::CheckUserParentGroup($X5);
$P9 = UtilitiesSAML::getGroupNames($X5);
if (!($ch == "\67" || $ch == "\x38" || in_array("\x61\144\x6d\151\156\151\163\164\162\141\164\157\162", $P9) || in_array("\101\x64\155\x69\x6e\151\163\x74\x72\x61\164\x6f\x72", $P9) || in_array("\123\x75\x70\x65\162\40\125\x73\x65\x72\163", $P9))) {
goto dP;
}
return true;
dP:
Va:
}
sl:
return false;
}
public static function IsUserManagerChild($user)
{
$OR = UtilitiesSAML::getLoginUserGroupId($user->id);
foreach ($OR as $X5) {
$ch = empty(UtilitiesSAML::CheckUserParentGroup($X5)) ? '' : UtilitiesSAML::CheckUserParentGroup($X5);
$P9 = UtilitiesSAML::getGroupNames($X5);
if (!($ch == "\x36" || in_array("\115\x61\156\141\147\x65\x72", $P9) || in_array("\x6d\x61\x6e\141\147\x65\x72", $P9))) {
goto cS;
}
return true;
cS:
ZF:
}
yj:
return false;
}
public static function loadDBValues($iA)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\x23\x5f\x5f\x6d\151\x6e\x69\x6f\x72\x61\x6e\x67\x65\137\x73\141\x6d\154\137\x63\157\156\146\x69\147"));
$Hx->where($N5->quoteName("\x69\x64\x70\137\156\x61\x6d\x65") . "\x20\75\40" . $N5->quote($iA));
$N5->setQuery($Hx);
return $N5->loadAssoc();
}
public static function CheckUserParentGroup($OR)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x70\x61\162\145\156\164\137\x69\144");
$Hx->from($N5->quoteName("\x23\x5f\x5f\x75\163\x65\162\x67\162\157\165\160\x73"));
$Hx->where($N5->quoteName("\x69\x64") . "\x20\x3d\x20" . $N5->quote($OR));
$N5->setQuery($Hx);
$Xb = $N5->loadResult();
return $Xb;
}
public static function getLicensePlanName()
{
return "\x6a\157\x6f\155\154\141\x5f\x73\x61\155\x6c\x5f\x73\x73\157\x5f\x65\156\x74\145\162\160\162\x69\x73\145\137\x70\154\x61\x6e";
}
public static function generateID()
{
return "\137" . self::stringToHex(self::generateRandomBytes(21));
}
public static function stringToHex($bo)
{
$Sf = '';
$pc = 0;
wQ:
if (!($pc < strlen($bo))) {
goto OZ;
}
$Sf .= sprintf("\x25\60\62\170", ord($bo[$pc]));
Oa:
$pc++;
goto wQ;
OZ:
return $Sf;
}
public static function generateRandomBytes($s7, $Nx = TRUE)
{
return openssl_random_pseudo_bytes($s7);
}
public static function _custom_redirect($HQ, $ec)
{
$Hd = JFactory::getApplication();
$Hd->enqueueMessage($HQ, $ec);
$Hd->redirect(JRoute::_("\x69\x6e\144\145\x78\x2e\x70\150\x70\x3f\x6f\160\164\x69\157\156\75\x63\x6f\x6d\137\x6d\151\x6e\151\157\x72\141\x6e\147\145\137\x73\x61\x6d\x6c\46\x74\x61\x62\x3d\144\157\155\141\151\x6e\x5f\x6d\141\160\x70\x69\156\147"));
}
public static function getUserProfileData($R9, $sn)
{
$vk = array();
if (!(isset($sn) && !empty($sn))) {
goto tX;
}
$sn = json_decode($sn, true);
foreach ($sn as $k0) {
$pn = $k0["\x61\x74\x74\x72\137\x6e\141\x6d\145"];
$pm = $k0["\x61\164\164\162\137\x76\x61\x6c\x75\x65"];
if (!(isset($R9[$pm]) && !empty($R9[$pm]))) {
goto uq;
}
$xp = array();
$xp["\x70\x72\157\146\151\x6c\145\x5f\x6b\145\x79"] = $pn;
$Ba = $R9[$pm];
if (!is_array($Ba)) {
goto yF;
}
$Ba = $Ba[0];
yF:
if (!(isset($Ba) && !empty($Ba))) {
goto Ub;
}
$xp["\160\x72\157\x66\151\x6c\x65\x5f\166\x61\x6c\x75\x65"] = trim($Ba);
array_push($vk, $xp);
Ub:
uq:
L3:
}
Q4:
tX:
return $vk;
}
public static function checkIfContactExist($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\151\144");
$Hx->from("\43\x5f\x5f\143\157\x6e\x74\x61\x63\x74\x5f\x64\145\x74\141\151\154\163");
$Hx->where($N5->quoteName("\165\163\145\162\x5f\x69\x64") . "\40\75\x20" . $N5->quote($j_));
$N5->setQuery($Hx);
return $N5->loadResult();
}
public static function removeIfExistsUserId($j_)
{
$Eh = self::getUserFieldDataFromTable($j_);
if (!$Eh) {
goto wT;
}
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Mf = array($N5->quoteName("\x69\x74\145\155\x5f\151\x64") . "\x20\x3d\x20" . $N5->quote($j_));
$Hx->delete($N5->quoteName("\43\137\x5f\146\x69\x65\154\x64\x73\137\x76\141\154\165\x65\163"));
$Hx->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
wT:
}
public static function getUserFieldDataFromTable($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\146\151\x65\x6c\x64\x5f\x69\144");
$Hx->from("\43\137\x5f\x66\x69\145\154\144\163\x5f\166\141\154\165\x65\x73");
$Hx->where($N5->quoteName("\x69\164\x65\155\137\x69\144") . "\40\75\x20" . $N5->quote($j_));
$N5->setQuery($Hx);
return $N5->loadColumn();
}
public static function gttrlval()
{
$J5 = UtilitiesSAML::getCustomerDetails();
$ec = $J5["\x73\164\x61\164\x75\163"];
if (!(Mo_Saml_Local_Util::is_customer_registered() && Mo_Saml_Local_Util::check($ec) == "\x74\x72\165\x65")) {
goto s3;
}
$eV = new Mo_saml_Local_Customer();
$a5 = $J5["\143\165\x73\164\x6f\x6d\145\162\137\153\145\x79"];
$w9 = $J5["\141\160\x69\x5f\153\145\x79"];
$JN = json_decode($eV->ccl($a5, $w9), true);
if (!($JN != "\156\x75\154\x6c")) {
goto gw;
}
self::saveTvalue($JN["\164\162\151\x61\x6c"]);
gw:
s3:
}
public static function getUserProfileDataFromTable($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\160\162\x6f\146\151\154\145\137\x6b\x65\x79");
$Hx->from("\43\137\137\165\163\x65\x72\x5f\160\162\157\x66\151\154\145\x73");
$Hx->where($N5->quoteName("\x75\x73\145\162\x5f\x69\144") . "\x20\x3d\x20" . $N5->quote($j_));
$N5->setQuery($Hx);
return $N5->loadColumn();
}
public static function getIdFromFields($lF)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x69\x64");
$Hx->from("\x23\x5f\x5f\146\151\145\x6c\x64\163");
$Hx->where($N5->quoteName("\x6e\141\155\145") . "\x20\75\x20" . $N5->quote($lF));
$N5->setQuery($Hx);
return $N5->loadObject();
}
public static function selectMaxOrdering($j_)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\115\101\130\50\157\x72\x64\x65\162\x69\156\x67\x29");
$Hx->from($N5->quoteName("\x23\x5f\137\165\x73\x65\162\x5f\160\162\157\x66\151\154\145\163"));
$Hx->where($N5->quoteName("\165\x73\145\x72\x5f\x69\x64") . "\40\x3d\x20" . $N5->quote($j_));
$N5->setQuery($Hx);
$GT = $N5->loadResult();
return isset($GT) && !empty($GT) ? $GT : "\60";
}
public static function saveTvalue($pm)
{
$pm = Mo_saml_Local_Util::encrypt($pm);
$HM = "\x23\x5f\137\155\x69\x6e\x69\x6f\162\141\156\x67\145\137\163\x61\155\x6c\x5f\x63\x75\163\x74\x6f\x6d\145\162\137\144\145\x74\141\x69\154\x73";
$e6 = array("\164\x72\x69\x73\164\x73" => $pm);
self::__genDBUpdate($HM, $e6);
}
public static function _remove_domain_mapp($Bj)
{
if (empty($Bj) || '' == $Bj) {
goto uS;
}
self::__remove_domain_mapping_value($Bj);
$HQ = "\104\x6f\155\141\x69\x6e\40\150\141\163\40\x62\145\x65\x6e\40\x72\x65\155\157\x76\x65\x64\40\163\x75\x63\143\x65\x73\163\x66\165\x6c\x6c\x79\x2e";
$ec = "\163\x75\143\143\145\x73\163";
self::_custom_redirect($HQ, $ec);
goto tC;
uS:
$HQ = "\105\x72\162\x6f\x72\x20\x70\162\157\x63\145\x73\163\151\x6e\x67\40\171\x6f\x75\162\40\162\x65\x71\165\145\x73\x74\x2e\40\120\154\145\141\x73\145\40\x74\x72\x79\40\141\147\141\151\156\56";
$ec = "\145\162\x72\157\x72";
self::_custom_redirect($HQ, $ec);
tC:
}
public static function rmvlk()
{
$Hd = JFactory::getApplication();
$eV = new Mo_saml_Local_Customer();
$bG = json_decode($eV->update_status(), true);
$eV->submit_feedback_form(0);
if (strcasecmp($bG["\x73\x74\x61\164\165\x73"], "\x53\125\103\x43\105\123\x53") == 0) {
goto o0;
}
$X3 = "\105\162\162\x6f\x72\40\x72\x65\x6d\x6f\166\151\156\x67\x20\x79\157\165\x72\x20\x6c\x69\x63\x65\x6e\163\145\x20\153\x65\x79\56\40\120\x6c\145\x61\x73\x65\40\164\162\x79\40\x61\x67\x61\151\156\40\x6f\162\x20\x63\x6f\156\x74\141\143\164\40\x75\163\40\x61\x74\40\x3c\x61\40\x68\x72\145\x66\75\42\155\141\x69\x6c\x74\x6f\x3a\152\157\x6f\155\154\141\x73\x75\160\160\157\162\x74\x40\170\145\x63\165\x72\x69\146\x79\x2e\x63\157\155\42\x3e\x6a\x6f\x6f\155\154\x61\163\x75\160\160\157\x72\164\100\x78\145\x63\165\162\x69\x66\x79\x2e\143\157\x6d\40\x3c\57\141\x3e";
$Hd->enqueueMessage($X3, "\145\x72\162\x6f\162");
goto e9;
o0:
$HM = "\43\137\x5f\155\x69\x6e\151\x6f\x72\141\156\147\145\x5f\163\x61\x6d\154\x5f\x63\165\163\x74\157\155\x65\162\x5f\144\x65\164\x61\151\x6c\x73";
$e6 = array("\x65\x6d\141\x69\154" => '', "\160\141\163\163\167\157\162\x64" => '', "\x61\x64\x6d\151\156\137\x70\x68\x6f\156\x65" => '', "\x63\165\163\x74\x6f\155\x65\162\137\x6b\x65\171" => '', "\x63\165\163\164\x6f\x6d\145\x72\137\164\157\x6b\145\x6e" => '', "\x61\x70\x69\137\x6b\x65\171" => '', "\154\157\x67\x69\156\x5f\163\164\x61\x74\x75\x73" => 1, "\x73\164\141\x74\x75\163" => '', "\163\x6d\154\x5f\x6c\x6b" => '', "\163\x74\x61\x74\x75\x73" => '', "\x6e\145\167\x5f\x72\x65\147\x69\x73\x74\x72\x61\x74\151\x6f\x6e" => 0, "\145\x6d\x61\151\154\x5f\x63\157\x75\156\164" => 0, "\151\x6e\137\143\x6d\x70" => '', "\x74\x72\151\x73\164\x73" => false, "\165\163\162\x6c\x6d\x74" => 0, "\154\151\143\145\156\163\145\105\x78\160\x69\x72\171" => "\60\x30\x30\x30\x2d\60\x30\x2d\x30\x30\x20\x30\x30\72\x30\x30\72\60\x30", "\x73\165\160\x70\x6f\x72\x74\x45\x78\160\151\162\171" => "\60\60\60\60\x2d\x30\60\x2d\x30\x30\x20\x30\60\72\x30\60\x3a\60\60", "\x6e\x6f\x53\120" => 0, "\141\165\164\x6f\137\163\x65\x6e\x64\x5f\145\155\141\151\154\x5f\x74\x69\155\x65" => '');
self::__genDBUpdate($HM, $e6);
$Hd->enqueueMessage("\x59\x6f\x75\x72\40\141\143\x63\157\x75\156\164\x20\150\x61\163\40\142\x65\145\x6e\40\x72\x65\x6d\x6f\x76\x65\x64\x20\x73\165\143\x63\x65\x73\163\146\x75\154\154\x79\56", "\163\x75\x63\143\145\163\163");
e9:
}
public static function __remove_domain_mapping_value($Bj)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->clear("\52");
$t7 = array($N5->quoteName("\144\157\155\141\x69\156\137\155\x61\160\x70\151\156\x67") . "\40\75\x20" . $N5->quote(''));
$Mf = array($N5->quoteName("\x69\144\160\137\156\141\x6d\145") . "\40\x3d\40" . $N5->quote($Bj));
$Hx->update($N5->quoteName("\x23\137\x5f\155\151\x6e\151\157\162\x61\156\x67\x65\137\163\x61\x6d\154\x5f\143\157\156\146\x69\147"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function fetchTLicense()
{
$J5 = self::getCustomerDetails();
$a5 = $J5["\x63\165\163\164\x6f\155\x65\162\137\153\145\x79"];
$w9 = $J5["\x61\x70\151\x5f\x6b\x65\171"];
$eV = new Mo_saml_Local_Customer();
$JN = json_decode($eV->ccl($a5, $w9), true);
$t1 = $JN["\154\x69\143\x65\x6e\x73\x65\x45\x78\160\151\162\x79"];
$dM = $JN["\x73\x75\160\160\x6f\x72\164\x45\170\160\x69\162\x79"];
$pm = Mo_saml_Local_Util::encrypt($JN["\164\162\x69\141\x6c"]);
$W2 = $JN["\156\157\x4f\146\x53\120"];
$Qn = self::getExpiryDate();
$Tn = strtotime($Qn["\x6c\151\143\145\156\x73\x65\x45\170\160\151\162\x79"]);
$Uk = strtotime($Qn["\x73\165\160\160\x6f\x72\x74\105\170\160\x69\162\171"]);
$Vp = $Qn["\164\162\x69\163\x74\x73"];
$SN = $Qn["\x6e\157\x53\x50"];
$EO = isset($J5["\155\151\156\151\x6f\x72\x61\156\x67\x65\137\x6c\145\x78\x70\137\x6e\x6f\164\151\146\151\x63\141\164\x69\x6f\156\137\x73\x65\156\x74"]) ? $J5["\155\x69\156\151\157\162\141\x6e\147\145\x5f\154\x65\x78\160\137\x6e\157\x74\151\x66\151\143\x61\164\x69\157\x6e\x5f\163\x65\156\164"] : 0;
if (!$EO) {
goto DS;
}
$HM = "\43\x5f\x5f\x6d\x69\156\x69\x6f\162\x61\156\x67\145\x5f\163\141\155\154\137\143\165\163\x74\x6f\x6d\145\162\137\144\145\x74\141\x69\154\x73";
$e6 = array("\155\151\156\x69\x6f\x72\x61\156\147\x65\x5f\x66\x69\146\x74\145\145\x6e\137\144\x61\x79\163\x5f\142\x65\146\157\162\145\137\x6c\145\170\160" => 0, "\155\151\x6e\151\157\162\x61\156\x67\x65\x5f\x66\151\x76\145\137\x64\x61\171\x73\137\x62\145\x66\157\162\x65\137\x6c\x65\170\160" => 0, "\155\151\x6e\151\157\162\x61\156\147\145\x5f\141\146\x74\x65\x72\x5f\x6c\x65\x78\160" => 0, "\155\x69\x6e\151\157\162\x61\156\147\145\x5f\141\146\x74\x65\x72\137\x66\x69\x76\145\x5f\x64\141\171\163\x5f\154\x65\170\x70" => 0, "\x6d\x69\x6e\151\157\x72\x61\x6e\147\x65\x5f\154\x65\170\160\x5f\x6e\157\x74\151\146\x69\143\x61\164\151\x6f\x6e\x5f\163\x65\156\164" => 0);
self::__genDBUpdate($HM, $e6);
DS:
if (!(strtotime($t1) > $Tn)) {
goto i3;
}
$HM = "\43\137\x5f\x6d\x69\x6e\x69\157\x72\141\x6e\x67\145\x5f\x73\141\x6d\154\x5f\143\165\163\164\157\x6d\145\x72\137\x64\x65\164\x61\151\154\x73";
$e6 = array("\154\151\143\x65\x6e\x73\145\x45\x78\x70\x69\162\x79" => $t1);
self::__genDBUpdate($HM, $e6);
i3:
if (!(strtotime($dM) > $Uk)) {
goto Ki;
}
$HM = "\43\137\x5f\155\151\156\151\x6f\x72\141\x6e\x67\x65\x5f\x73\x61\x6d\154\137\x63\x75\x73\164\157\155\145\x72\137\144\145\164\141\151\x6c\163";
$e6 = array("\x73\165\x70\160\x6f\x72\x74\105\x78\160\151\162\171" => $dM);
self::__genDBUpdate($HM, $e6);
Ki:
if (!($pm != $Vp)) {
goto Rx;
}
$HM = "\43\137\x5f\155\151\x6e\x69\x6f\x72\x61\156\x67\145\x5f\163\141\x6d\154\137\x63\x75\x73\164\x6f\x6d\x65\162\137\x64\x65\x74\141\151\154\163";
$e6 = array("\x74\x72\x69\x73\164\x73" => $Vp);
self::__genDBUpdate($HM, $e6);
Rx:
if (!($W2 != $SN)) {
goto rn;
}
$HM = "\x23\137\x5f\155\151\156\x69\157\162\141\x6e\147\145\137\163\141\155\x6c\x5f\x63\165\163\164\x6f\x6d\145\x72\137\144\x65\x74\141\x69\x6c\x73";
$e6 = array("\156\157\x53\120" => $W2);
UtilitiesSAML::__genDBUpdate($HM, $e6);
rn:
}
public static function createAuthnRequest($rH, $Ah, $SA, $In, $jd, $WO = "\146\141\x6c\x73\x65", $HX = "\110\x54\x54\120\55\122\145\144\151\162\145\x63\x74")
{
self::createAndUpdateUpgardeUrl();
$Br = "\x3c\x3f\x78\155\x6c\x20\166\145\162\163\151\157\156\75\42\x31\56\x30\x22\x20\145\156\x63\x6f\144\x69\156\147\75\x22\x55\x54\x46\x2d\x38\x22\77\x3e" . "\74\x73\141\x6d\x6c\x70\72\x41\165\x74\x68\x6e\122\145\x71\x75\145\x73\164\40\x78\155\x6c\x6e\x73\72\x73\141\x6d\154\160\75\x22\165\x72\x6e\72\157\141\163\x69\x73\x3a\156\x61\x6d\145\163\72\x74\143\72\x53\101\x4d\x4c\72\x32\56\60\x3a\160\x72\157\164\157\x63\157\154\x22\40\x78\155\154\156\163\x3a\x73\141\155\154\x3d\42\165\162\156\x3a\157\141\163\151\x73\72\156\x61\x6d\145\x73\72\x74\x63\72\x53\x41\x4d\x4c\72\62\x2e\60\x3a\141\163\163\x65\x72\164\151\157\156\x22\40\111\104\75\x22" . self::generateID() . "\x22\40\x56\145\x72\163\151\157\x6e\75\42\x32\x2e\60\42\40\x49\163\163\x75\x65\111\x6e\163\x74\x61\x6e\x74\75\x22" . self::generateTimestamp() . "\42";
if (!($WO == "\164\162\x75\145")) {
goto Kj;
}
$Br .= "\40\106\x6f\x72\143\145\101\165\x74\x68\x6e\75\x22\164\162\165\x65\x22";
Kj:
$Br .= "\x20\120\162\x6f\x74\x6f\x63\157\154\102\x69\x6e\144\151\156\x67\x3d\x22\x75\162\x6e\x3a\157\141\163\x69\x73\72\156\141\155\145\x73\x3a\164\143\x3a\123\101\x4d\x4c\x3a\62\56\60\72\142\x69\x6e\144\x69\x6e\x67\x73\x3a\x48\x54\x54\x50\x2d\120\x4f\123\x54\x22\x20\101\163\x73\145\x72\x74\x69\157\156\x43\157\156\x73\165\x6d\145\162\123\145\x72\166\x69\x63\x65\125\x52\114\75\42" . $rH . "\x22\40\104\145\163\x74\x69\x6e\x61\164\x69\157\156\x3d\x22" . $SA . "\42\76\15\12\40\x20\40\40\x20\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\x20\40\x20\x20\40\x20\40\x20\40\x20\x20\74\163\141\155\154\72\111\x73\163\x75\145\162\x3e" . $Ah . "\74\x2f\x73\x61\155\x6c\72\x49\x73\163\165\145\162\x3e\x3c\163\x61\155\154\160\x3a\x4e\141\155\x65\x49\x44\120\x6f\x6c\x69\x63\171\x20\101\x6c\154\x6f\167\x43\x72\145\141\x74\x65\x3d\x22\164\162\165\x65\42\40\106\157\x72\155\x61\x74\x3d\x22" . $In . "\x22\x2f\x3e\xd\xa\40\x20\x20\x20\40\40\40\x20\40\x20\x20\x20\40\x20\x20\40\40\40\40\x20\x20\x20\x20\40\x20\x20\x20\x20\x3c\163\x61\x6d\154\x70\72\122\145\x71\165\145\x73\x74\145\x64\x41\x75\164\x68\156\x43\x6f\156\164\x65\170\164\x20\x43\157\155\x70\141\162\x69\x73\157\x6e\x3d\x22\x65\170\141\143\x74\x22\76\xd\xa\40\40\40\x20\x20\40\x20\40\x20\x20\40\40\40\x20\x20\40\x20\x20\x20\40\40\40\40\40\40\x20\40\x20\x20\40\40\40\x3c\x73\141\155\154\x3a\101\x75\164\x68\x6e\103\157\x6e\x74\145\170\x74\103\154\x61\163\163\x52\x65\146\x3e\165\x72\156\x3a\x6f\141\x73\151\x73\x3a\156\x61\x6d\x65\x73\72\164\143\72\123\101\x4d\x4c\72\x32\56\x30\72\x61\x63\72\x63\x6c\141\163\x73\x65\163\x3a" . $jd . "\x3c\57\x73\x61\x6d\154\x3a\x41\165\164\150\x6e\103\x6f\156\x74\x65\170\x74\x43\x6c\x61\x73\x73\122\145\146\x3e\xd\12\40\40\x20\x20\40\x20\40\40\40\x20\40\x20\x20\40\40\40\x20\40\x20\x20\40\40\40\x20\x20\40\x20\x20\x3c\57\x73\x61\x6d\x6c\x70\72\x52\145\161\165\145\163\x74\x65\144\x41\x75\x74\150\156\x43\x6f\x6e\164\145\x78\164\x3e\15\12\40\40\40\40\40\x20\x20\40\40\x20\x20\40\x20\40\40\x20\40\x20\x20\x20\x20\40\40\40\x20\x20\40\x20\74\x2f\x73\141\x6d\x6c\x70\x3a\101\x75\x74\x68\156\122\x65\161\x75\145\x73\x74\x3e";
if (!(empty($HX) || $HX == "\110\x54\124\x50\x2d\x52\145\144\x69\x72\x65\x63\164")) {
goto r1;
}
$W1 = gzdeflate($Br);
$MJ = base64_encode($W1);
$Kp = urlencode($MJ);
$Br = $Kp;
r1:
return $Br;
}
public static function gt_lk_trl()
{
$J5 = self::getCustomerDetails();
$a5 = $J5["\143\165\x73\x74\157\155\x65\162\137\x6b\145\x79"];
$w9 = $J5["\x61\160\x69\x5f\153\x65\x79"];
$eV = new Mo_saml_Local_Customer();
$JN = json_decode($eV->ccl($a5, $w9), true);
$Ag = self::getExpiryDate();
if ($JN != "\156\165\x6c\x6c") {
goto T5;
}
$oa = $JN["\154\x69\143\145\156\x73\x65\x45\170\160\x69\x72\x79"];
$bb = 10;
goto Px;
T5:
$oa = isset($JN["\154\151\x63\145\x6e\163\x65\105\x78\160\x69\x72\171"]) ? $JN["\x6c\x69\x63\x65\x6e\163\145\x45\x78\160\151\x72\171"] : $Ag["\x6c\151\x63\145\156\163\x65\105\170\x70\x69\x72\x79"];
$bb = isset($JN["\x6e\157\x4f\x66\x55\x73\145\162\x73"]) ? $JN["\x6e\157\x4f\x66\x55\x73\x65\162\163"] : 10;
Px:
$gk = intval((strtotime($oa) - time()) / (60 * 60 * 24));
$D7 = array();
$D7["\x4c\x69\x63\x65\x6e\163\x65\105\170\x70\x69\162\x65\144"] = 0 > $gk ? TRUE : FALSE;
$D7["\x4e\x6f\x6f\x66\125\x73\145\x72\x73"] = $bb;
return $D7;
}
public static function createLogoutRequest($bF, $Ah, $SA, $Az = "\110\124\124\x50\x2d\122\x65\x64\x69\162\145\x63\164", $MC = '')
{
$Br = "\x3c\x3f\x78\x6d\x6c\x20\166\145\162\163\151\157\x6e\x3d\42\x31\x2e\60\42\x20\x65\156\x63\157\x64\x69\156\147\x3d\42\125\124\106\x2d\x38\42\77\76" . "\x3c\x73\x61\x6d\x6c\160\x3a\114\x6f\147\x6f\x75\x74\x52\x65\x71\165\x65\x73\164\x20\170\x6d\x6c\156\x73\x3a\163\x61\x6d\x6c\x70\x3d\x22\165\x72\156\x3a\157\x61\163\x69\x73\72\x6e\141\155\x65\x73\x3a\x74\143\x3a\x53\101\x4d\x4c\x3a\x32\x2e\60\x3a\x70\162\157\x74\x6f\x63\157\x6c\x22\40\170\x6d\x6c\156\163\72\x73\141\155\x6c\75\x22\165\x72\x6e\x3a\x6f\141\x73\151\163\72\156\141\x6d\x65\163\x3a\164\143\x3a\123\101\x4d\114\x3a\x32\x2e\x30\x3a\x61\x73\163\145\162\x74\x69\x6f\x6e\x22\40\111\x44\x3d\x22" . self::generateID() . "\42\40\111\x73\163\165\x65\111\156\x73\164\141\156\164\75\42" . self::generateTimestamp() . "\42\40\126\145\162\163\x69\157\x6e\x3d\x22\x32\x2e\x30\42\40\104\145\x73\164\x69\156\x61\x74\151\157\156\x3d\42" . $SA . "\x22\76\xd\xa\x9\11\x9\x9\11\x9\74\163\x61\155\x6c\72\x49\163\x73\x75\145\162\x20\x78\155\154\156\163\x3a\163\141\155\x6c\75\42\165\x72\x6e\72\x6f\141\163\x69\x73\x3a\x6e\x61\x6d\x65\163\x3a\x74\143\x3a\x53\x41\115\x4c\x3a\62\56\60\x3a\141\x73\x73\145\162\x74\x69\157\x6e\42\x3e" . $Ah . "\x3c\57\163\x61\x6d\x6c\72\x49\163\163\x75\145\162\76\15\xa\x9\11\11\11\11\x9\x3c\x73\x61\x6d\154\72\x4e\141\x6d\x65\x49\x44\x20\170\x6d\x6c\156\x73\x3a\163\141\155\154\75\42\165\162\156\72\x6f\x61\163\x69\163\72\x6e\141\155\145\163\72\x74\x63\72\x53\x41\115\114\72\x32\x2e\60\72\x61\163\163\x65\162\x74\151\x6f\156\42\x3e" . $bF . "\x3c\57\x73\x61\155\x6c\x3a\116\x61\155\145\111\104\76";
if (empty($MC)) {
goto bJ;
}
$Br .= "\x3c\163\141\155\x6c\x70\x3a\x53\x65\x73\x73\151\x6f\x6e\111\156\x64\145\x78\x3e" . $MC . "\74\57\163\x61\155\154\x70\72\x53\145\x73\163\x69\157\156\x49\x6e\144\x65\x78\x3e";
bJ:
$Br .= "\x3c\57\x73\141\x6d\x6c\x70\72\114\x6f\147\157\165\x74\x52\x65\161\165\145\x73\x74\x3e";
if (!(empty($Az) || $Az == "\x48\124\124\120\55\122\x65\x64\151\x72\145\143\164")) {
goto pG;
}
$W1 = gzdeflate($Br);
$MJ = base64_encode($W1);
$Kp = urlencode($MJ);
$Br = $Kp;
pG:
return $Br;
}
public static function rmvextnsns()
{
self::rmvlk();
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\x65\x6e\141\142\154\145\144") . "\40\x3d\40" . $N5->quote(0));
$Mf = array($N5->quoteName("\145\x6c\x65\x6d\x65\x6e\x74") . "\x20\x3d\x20" . $N5->quote("\160\153\x67\137\x6d\151\x6e\x69\157\162\x61\x6e\x67\x65\x73\x61\x6d\x6c\x73\x73\157") . "\117\x52" . $N5->quoteName("\x65\x6c\x65\x6d\x65\156\164") . "\40\x3d\40" . $N5->quote("\163\141\155\154\x72\145\x64\151\x72\145\x63\164") . "\x4f\122" . $N5->quoteName("\145\154\145\155\145\x6e\164") . "\40\75\40" . $N5->quote("\155\x69\x6e\151\157\162\141\156\147\x65\163\x61\155\154") . "\117\x52" . $N5->quoteName("\145\x6c\145\155\x65\156\164") . "\40\x3d\x20" . $N5->quote("\155\151\x6e\x69\x6f\x72\x61\x6e\147\145\163\141\155\x6c\x70\x6c\x75\147\151\156") . "\x4f\x52" . $N5->quoteName("\145\154\145\x6d\x65\x6e\x74") . "\40\x3d\x20" . $N5->quote("\143\x6f\155\137\155\x69\x6e\x69\x6f\162\x61\x6e\x67\145\137\163\141\x6d\154") . "\117\122" . $N5->quoteName("\x65\154\145\x6d\145\156\164") . "\x20\75\x20" . $N5->quote("\163\141\155\154\154\x6f\147\x6f\x75\164"));
$Hx->update($N5->quoteName("\43\x5f\x5f\145\x78\x74\145\156\x73\x69\x6f\156\x73"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$Eh = $N5->execute();
$Hd = JFactory::getApplication();
$Hd->enqueueMessage("\x59\x6f\x75\x72\x20\124\162\151\141\x6c\x20\x70\x65\162\151\157\144\x20\x68\x61\x73\40\x65\x78\x70\x69\162\145\x64", "\x65\x72\162\157\x72");
$Hd->redirect(JRoute::_("\x69\x6e\144\x65\x78\x2e\x70\x68\160"));
}
public static function createLogoutResponse($rY, $Ah, $SA, $Az = "\x48\x54\x54\120\55\122\x65\x64\151\x72\x65\143\164")
{
$Br = "\74\77\170\155\154\x20\x76\x65\162\163\151\157\156\x3d\42\x31\56\60\42\x20\145\156\143\157\144\151\x6e\147\x3d\42\x55\124\x46\x2d\70\42\77\x3e" . "\x3c\x73\x61\155\154\160\72\114\157\x67\x6f\165\164\x52\145\163\160\157\156\x73\145\x20\x78\x6d\154\156\163\x3a\163\x61\155\x6c\x70\x3d\42\x75\x72\x6e\72\x6f\141\x73\x69\163\x3a\x6e\141\x6d\145\x73\x3a\164\x63\x3a\x53\101\x4d\114\72\x32\x2e\60\72\160\162\157\164\157\x63\157\x6c\42\40\x78\155\x6c\156\163\72\x73\141\155\154\75\42\x75\162\x6e\72\157\x61\163\151\x73\x3a\x6e\141\x6d\x65\163\x3a\164\143\x3a\123\x41\x4d\x4c\x3a\x32\56\60\72\x61\163\163\x65\x72\x74\151\157\x6e\42\40" . "\x49\104\75\42" . self::generateID() . "\42\40" . "\x56\145\162\x73\x69\x6f\x6e\75\x22\x32\x2e\x30\x22\40\x49\163\163\x75\145\x49\156\163\x74\141\x6e\164\x3d\x22" . self::generateTimestamp() . "\x22\40" . "\x44\x65\163\164\151\x6e\141\x74\151\157\156\x3d\42" . $SA . "\42\x20" . "\111\x6e\122\x65\x73\x70\157\x6e\x73\x65\x54\157\x3d\x22" . $rY . "\42\x3e" . "\x3c\163\141\155\x6c\72\111\163\163\165\x65\x72\40\x78\x6d\x6c\156\163\x3a\x73\x61\155\x6c\75\x22\x75\x72\156\x3a\x6f\141\x73\151\x73\x3a\156\141\x6d\x65\163\72\x74\143\x3a\123\101\115\x4c\72\62\x2e\60\x3a\x61\x73\x73\x65\162\x74\x69\x6f\x6e\x22\76" . $Ah . "\x3c\57\x73\x61\x6d\154\x3a\x49\163\x73\165\145\x72\x3e" . "\74\x73\141\x6d\154\160\72\123\164\x61\164\x75\163\76\74\x73\141\x6d\x6c\x70\72\123\164\141\164\165\163\x43\157\x64\x65\x20\126\x61\154\x75\145\75\42\x75\x72\x6e\72\x6f\x61\163\x69\x73\x3a\156\x61\155\145\163\x3a\x74\x63\72\123\101\x4d\x4c\x3a\x32\x2e\x30\72\163\164\141\x74\165\x73\x3a\x53\165\x63\143\x65\163\163\x22\x2f\x3e\74\57\163\141\155\154\160\72\123\x74\x61\x74\x75\x73\76\x3c\x2f\163\x61\155\x6c\160\x3a\114\x6f\x67\x6f\165\x74\x52\145\x73\160\x6f\x6e\x73\145\76";
if (!(empty($Az) || $Az == "\110\x54\124\120\55\x52\x65\x64\151\162\x65\x63\164")) {
goto PY;
}
$W1 = gzdeflate($Br);
$MJ = base64_encode($W1);
$Kp = urlencode($MJ);
$Br = $Kp;
PY:
return $Br;
}
public static function generateTimestamp($cQ = NULL)
{
if (!($cQ === NULL)) {
goto sg;
}
$cQ = time();
sg:
return gmdate("\131\x2d\x6d\x2d\144\x5c\124\x48\x3a\151\72\163\134\132", $cQ);
}
public static function xpQuery(DOMNode $WC, $Hx)
{
static $Ki = NULL;
if ($WC instanceof DOMDocument) {
goto tk;
}
$T6 = $WC->ownerDocument;
goto Lu;
tk:
$T6 = $WC;
Lu:
if (!($Ki === NULL || !$Ki->document->isSameNode($T6))) {
goto l1;
}
$Ki = new DOMXPath($T6);
$Ki->registerNamespace("\x73\157\x61\x70\x2d\x65\x6e\x76", "\150\164\164\160\72\x2f\57\x73\143\x68\x65\x6d\x61\x73\x2e\170\x6d\x6c\x73\157\141\x70\56\x6f\x72\x67\x2f\163\x6f\141\x70\57\x65\156\166\x65\x6c\157\160\x65\x2f");
$Ki->registerNamespace("\163\x61\155\x6c\137\x70\x72\x6f\164\157\143\157\x6c", "\165\162\156\72\157\141\163\x69\163\72\x6e\141\x6d\x65\163\x3a\x74\x63\72\x53\x41\x4d\114\72\62\x2e\x30\72\160\x72\x6f\164\157\x63\x6f\154");
$Ki->registerNamespace("\163\x61\x6d\154\x5f\141\x73\163\145\162\x74\x69\157\156", "\165\162\156\x3a\x6f\141\x73\151\163\x3a\156\141\x6d\x65\163\x3a\164\143\72\123\101\x4d\114\x3a\62\x2e\x30\72\141\x73\x73\145\x72\164\151\x6f\x6e");
$Ki->registerNamespace("\x73\x61\x6d\154\x5f\x6d\x65\164\141\x64\141\x74\x61", "\x75\x72\x6e\72\x6f\141\163\151\x73\x3a\x6e\x61\x6d\x65\163\x3a\164\143\x3a\123\x41\x4d\114\72\x32\x2e\x30\72\155\145\164\x61\x64\141\x74\x61");
$Ki->registerNamespace("\x64\x73", "\150\164\x74\x70\72\57\57\x77\167\x77\56\167\63\x2e\x6f\162\147\57\x32\60\x30\60\x2f\x30\x39\x2f\170\x6d\154\144\x73\151\x67\x23");
$Ki->registerNamespace("\x78\145\x6e\x63", "\150\x74\164\160\72\x2f\x2f\x77\x77\167\x2e\167\x33\x2e\x6f\x72\x67\57\62\60\x30\61\57\60\x34\x2f\170\155\154\x65\156\x63\x23");
l1:
$Ry = $Ki->query($Hx, $WC);
$Sf = array();
$pc = 0;
ZL:
if (!($pc < $Ry->length)) {
goto B2;
}
$Sf[$pc] = $Ry->item($pc);
of:
$pc++;
goto ZL;
B2:
return $Sf;
}
public static function parseNameId(DOMElement $Zo)
{
$Sf = array("\x56\141\154\x75\145" => trim($Zo->textContent));
foreach (array("\116\141\x6d\x65\121\x75\x61\154\151\x66\x69\145\x72", "\x53\x50\116\141\x6d\145\x51\x75\141\x6c\x69\146\151\x65\x72", "\106\157\162\155\141\x74") as $Xx) {
if (!$Zo->hasAttribute($Xx)) {
goto Y5;
}
$Sf[$Xx] = $Zo->getAttribute($Xx);
Y5:
iL:
}
qZ:
return $Sf;
}
public static function get_message_and_cause($D7, $yc)
{
$At = array();
if ($D7 && $yc) {
goto J0;
}
if ($D7) {
goto X0;
}
if (!$yc) {
goto ud;
}
$At["\x6d\163\x67"] = "\120\x6c\145\x61\x73\145\x20\x63\x6f\156\164\x61\143\164\x20\x79\x6f\165\162\40\141\144\155\151\x6e\151\x73\164\x72\x61\x74\x6f\162\56";
$At["\x63\x61\x75\163\145"] = "\x55\x73\145\x72\x20\154\151\155\151\x74\x20\x65\x78\x63\x65\145\x64\145\144\56";
ud:
goto Cw;
X0:
$At["\155\163\x67"] = "\120\154\145\141\x73\145\40\x63\x6f\156\164\x61\143\164\40\x79\157\165\162\x20\x61\x64\x6d\151\x6e\151\163\x74\162\141\x74\157\x72\x2e";
$At["\x63\x61\165\x73\145"] = "\x4c\x69\x63\145\x6e\163\145\x20\145\x78\x70\151\162\171\40\x64\x61\164\x65\x20\x65\x78\x63\x65\x65\x64\145\144\x2e";
Cw:
goto NU;
J0:
$At["\x6d\x73\x67"] = "\120\154\x65\141\x73\145\x20\x63\x6f\156\164\141\143\164\40\x79\157\165\x72\40\141\144\x6d\x69\x6e\151\x73\164\x72\x61\x74\x6f\x72\56";
$At["\143\141\x75\163\145"] = "\114\151\x63\145\x6e\x73\145\40\x65\x78\x70\151\162\x79\40\144\x61\164\145\40\x61\x6e\144\x20\165\163\145\162\x20\154\151\155\x69\x74\x20\x65\170\x63\145\145\x64\x65\144\56";
NU:
return $At;
}
public static function xsDateTimeToTimestamp($Kf)
{
$vb = array();
$Aq = "\x2f\x5e\x28\134\x64\134\144\x5c\144\134\x64\51\55\50\x5c\144\x5c\144\51\x2d\50\134\144\x5c\x64\51\x54\50\134\x64\134\x64\x29\x3a\50\134\x64\x5c\x64\51\x3a\x28\x5c\144\x5c\x64\51\50\77\72\134\56\134\x64\x2b\51\x3f\x5a\x24\57\x44";
if (!(preg_match($Aq, $Kf, $vb) == 0)) {
goto KP;
}
throw new Exception("\x49\x6e\166\141\x6c\x69\144\40\x53\101\115\114\x32\40\164\x69\x6d\145\163\x74\141\155\x70\40\160\141\x73\163\x65\144\40\x74\x6f\40\x78\163\104\x61\x74\x65\x54\x69\x6d\x65\x54\x6f\124\x69\x6d\x65\x73\164\x61\155\x70\72\40" . $Kf);
KP:
$uY = intval($vb[1]);
$c3 = intval($vb[2]);
$Q4 = intval($vb[3]);
$Gz = intval($vb[4]);
$J0 = intval($vb[5]);
$An = intval($vb[6]);
$eb = gmmktime($Gz, $J0, $An, $c3, $Q4, $uY);
return $eb;
}
public static function extractStrings(DOMElement $gP, $nQ, $e7)
{
$Sf = array();
$WC = $gP->firstChild;
xt:
if (!($WC !== NULL)) {
goto V2;
}
if (!($WC->namespaceURI !== $nQ || $WC->localName !== $e7)) {
goto nZ;
}
goto i0;
nZ:
$Sf[] = trim($WC->textContent);
i0:
$WC = $WC->nextSibling;
goto xt;
V2:
return $Sf;
}
public static function validateElement(DOMElement $MG)
{
$J1 = new XMLSecurityDSigSAML();
$J1->idKeys[] = "\x49\104";
$U1 = self::xpQuery($MG, "\x2e\57\144\163\72\123\x69\x67\156\141\164\165\162\145");
if (count($U1) === 0) {
goto bR;
}
if (count($U1) > 1) {
goto DW;
}
goto Ra;
bR:
return FALSE;
goto Ra;
DW:
echo "\130\x4d\114\123\x65\x63\x3a\40\x6d\157\x72\145\x20\164\x68\x61\156\40\157\x6e\x65\x20\163\x69\x67\156\x61\164\x75\x72\x65\40\145\154\145\155\x65\156\x74\x20\151\x6e\40\162\x6f\x6f\x74\x2e";
exit;
Ra:
$U1 = $U1[0];
$J1->sigNode = $U1;
$J1->canonicalizeSignedInfo();
if ($J1->validateReference()) {
goto aO;
}
echo "\x58\x4d\x4c\x73\145\143\x3a\40\144\x69\147\145\x73\164\x20\x76\x61\x6c\151\x64\x61\x74\151\x6f\156\x20\146\141\151\x6c\x65\144";
exit;
aO:
$AW = FALSE;
foreach ($J1->getValidatedNodes() as $sU) {
if ($sU->isSameNode($MG)) {
goto Lm;
}
if ($MG->parentNode instanceof DOMDocument && $sU->isSameNode($MG->ownerDocument)) {
goto ya;
}
goto eV;
Lm:
$AW = TRUE;
goto tK;
goto eV;
ya:
$AW = TRUE;
goto tK;
eV:
LB:
}
tK:
if ($AW) {
goto vP;
}
echo "\130\x4d\x4c\123\x65\143\72\x20\124\150\x65\40\162\157\x6f\x74\x20\x65\154\x65\x6d\x65\x6e\164\40\151\x73\40\156\157\x74\x20\163\x69\x67\x6e\145\144\x2e";
exit;
vP:
$r_ = array();
foreach (self::xpQuery($U1, "\x2e\57\x64\163\72\113\x65\171\x49\x6e\x66\157\57\x64\x73\x3a\130\x35\60\x39\104\141\164\141\57\144\163\72\x58\65\x30\x39\103\x65\x72\x74\151\146\x69\143\141\164\145") as $kn) {
$R6 = trim($kn->textContent);
$R6 = str_replace(array("\xd", "\12", "\11", "\x20"), '', $R6);
$r_[] = $R6;
Kn:
}
IB:
$Sf = array("\123\151\x67\x6e\141\x74\165\x72\145" => $J1, "\x43\x65\162\x74\151\146\151\x63\x61\164\x65\163" => $r_);
return $Sf;
}
public static function show_error_messages($HQ, $ZY)
{
echo "\40\x20\x20\40\40\40\x20\x20\x20\x3c\x64\151\x76\x20\163\x74\x79\x6c\145\x3d\x22\x66\x6f\x6e\164\55\146\x61\x6d\151\154\171\x3a\103\x61\154\151\x62\162\151\73\160\x61\144\144\151\x6e\x67\72\x30\40\x33\x25\73\x22\76\xd\xa\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\40\40\x3c\x64\151\166\40\163\164\171\154\145\x3d\42\143\x6f\x6c\x6f\x72\x3a\40\43\141\71\x34\64\64\x32\x3b\142\x61\143\153\x67\x72\x6f\x75\156\144\x2d\143\x6f\x6c\x6f\162\72\40\x23\146\x32\x64\x65\x64\x65\x3b\x70\141\x64\x64\151\156\x67\72\x20\x31\x35\160\170\x3b\155\x61\x72\147\151\x6e\x2d\x62\x6f\164\164\157\155\x3a\40\x32\x30\x70\x78\73\164\145\x78\x74\55\141\x6c\151\147\156\72\x63\x65\x6e\164\145\162\73\142\x6f\x72\x64\x65\x72\x3a\61\160\x78\40\x73\x6f\x6c\x69\x64\x20\x23\105\66\x42\x33\102\62\x3b\x66\x6f\x6e\x74\55\163\x69\x7a\x65\x3a\x31\70\160\x74\x3b\x22\76\x20\x45\x52\122\x4f\x52\x3c\57\144\151\x76\x3e\xd\12\x20\40\x20\x20\40\40\40\x20\x20\x20\x20\40\x3c\x64\x69\x76\40\163\x74\171\154\x65\75\x22\x63\x6f\154\x6f\x72\72\x20\43\141\x39\64\x34\x34\x32\x3b\146\x6f\x6e\x74\x2d\x73\151\x7a\x65\x3a\x31\x34\x70\x74\x3b\40\x6d\141\x72\147\151\x6e\55\142\157\x74\164\157\x6d\x3a\62\60\x70\170\x3b\42\76\15\xa\40\40\x20\x20\x20\x20\40\x20\40\x20\x20\40\40\40\40\40\x3c\160\x3e\74\x73\x74\x72\x6f\156\x67\76\x45\162\162\x6f\162\72\x20\74\57\x73\164\162\x6f\156\147\x3e";
echo $HQ;
echo "\x3c\x2f\160\x3e\xd\12\40\40\x20\40\40\40\x20\40\40\40\40\40\x20\x20\40\x20\74\x70\76\74\x73\164\162\157\156\147\x3e\120\x6f\163\x73\151\142\154\x65\x20\x43\x61\x75\163\x65\72\40\x3c\x2f\x73\164\x72\x6f\156\x67\76";
echo $ZY;
echo "\74\57\160\76\xd\12\x20\x20\x20\40\x20\x20\x20\40\40\40\x20\x20\x3c\x2f\144\151\x76\x3e\15\xa\x20\x20\x20\x20\x20\40\40\x20\40\40\40\x20\74\x66\157\162\x6d\x20\x61\143\164\151\157\x6e\75\x22";
echo JURI::root();
echo "\x22\x3e\15\xa\x20\x20\x20\40\x20\40\x20\x20\x20\40\40\x20\x20\40\x20\40\x3c\x64\x69\x76\x20\163\x74\x79\x6c\x65\x3d\x22\x6d\141\x72\147\151\x6e\x3a\63\x25\73\x64\x69\x73\160\154\141\171\x3a\142\154\x6f\x63\x6b\x3b\164\x65\x78\164\x2d\141\x6c\151\x67\x6e\x3a\x63\x65\x6e\164\x65\x72\73\42\76\xd\12\40\40\x20\40\x20\40\x20\x20\40\40\x20\x20\40\40\x20\40\x20\x20\x20\x20\x3c\x69\156\160\x75\x74\x20\x73\x74\171\x6c\145\x3d\x22\x70\141\144\x64\151\156\x67\72\61\45\x3b\x77\x69\144\164\x68\72\x31\60\60\x70\x78\73\142\x61\x63\153\x67\162\157\x75\156\144\x3a\40\43\x30\x30\71\x31\x43\x44\x20\156\157\x6e\x65\40\x72\145\x70\x65\x61\164\40\163\143\x72\x6f\154\x6c\40\x30\45\40\x30\45\x3b\x63\x75\162\163\x6f\162\x3a\x20\160\157\151\x6e\x74\x65\162\x3b\x66\x6f\156\164\55\163\151\x7a\145\72\x31\65\160\x78\73\142\x6f\x72\144\145\162\x2d\167\x69\144\x74\150\72\x20\61\x70\x78\73\142\157\162\144\x65\x72\55\x73\164\x79\154\145\72\x20\163\157\x6c\151\x64\73\142\157\x72\x64\x65\x72\55\x72\141\144\151\x75\163\72\40\x33\x70\x78\x3b\x77\150\151\x74\x65\55\163\160\141\x63\145\x3a\40\x6e\157\167\162\x61\160\x3b\142\x6f\170\55\x73\x69\x7a\151\156\x67\72\x20\x62\157\162\x64\145\x72\55\142\157\170\73\x62\x6f\x72\x64\x65\162\x2d\143\157\x6c\x6f\x72\x3a\x20\43\x30\60\x37\63\x41\101\73\x62\x6f\170\x2d\163\150\x61\144\157\167\x3a\40\x30\x70\x78\x20\61\160\170\40\60\160\170\40\x72\x67\x62\141\x28\x31\62\60\x2c\x20\x32\x30\x30\x2c\40\62\63\60\54\x20\60\56\x36\x29\40\x69\x6e\163\x65\164\x3b\143\157\154\157\162\x3a\40\43\x46\x46\106\x3b\42\x20\164\x79\x70\x65\x3d\x22\x73\165\x62\x6d\151\x74\42\x20\x76\x61\154\165\145\75\42\x44\x6f\x6e\145\x22\x20\x6f\x6e\103\x6c\x69\143\153\75\x22\x73\145\154\x66\x2e\x63\x6c\157\x73\x65\x28\x29\x3b\42\x3e\xd\12\40\40\40\40\x20\x20\40\x20\40\x20\40\40\40\40\40\40\x3c\x2f\x64\151\166\76\xd\12\x20\x20\x20\x20\x20\x20\x20\40\x20\x20\40\40\x3c\57\x66\x6f\162\x6d\x3e\xd\12\x20\40\40\x20\40\40\40\x20\74\57\x64\151\166\76\xd\12\40\40\x20\x20\40\40\40\x20";
exit;
}
public static function validateSignature(array $wA, XMLSecurityKeySAML $pn)
{
$J1 = $wA["\123\151\x67\156\x61\x74\165\x72\x65"];
$wT = self::xpQuery($J1->sigNode, "\x2e\x2f\x64\163\72\123\151\147\x6e\145\144\x49\156\146\x6f\x2f\x64\x73\72\123\x69\147\156\141\164\165\x72\145\115\145\164\x68\x6f\144");
if (!empty($wT)) {
goto ye;
}
throw new Exception("\x4d\x69\x73\163\x69\156\x67\x20\x53\151\147\156\x61\164\165\162\x65\x4d\145\164\150\x6f\x64\40\145\154\x65\x6d\x65\x6e\x74\56");
ye:
$wT = $wT[0];
if ($wT->hasAttribute("\x41\154\147\x6f\x72\151\164\150\155")) {
goto Oh;
}
throw new Exception("\115\x69\163\163\151\156\x67\40\x41\x6c\147\157\x72\151\x74\x68\155\x2d\141\164\x74\x72\151\142\165\164\x65\40\x6f\156\x20\x53\x69\x67\156\141\x74\x75\162\x65\115\x65\164\x68\x6f\x64\40\145\x6c\x65\155\145\x6e\x74\56");
Oh:
$rE = $wT->getAttribute("\101\x6c\147\x6f\162\151\x74\150\155");
if (!($pn->type === XMLSecurityKeySAML::RSA_SHA1 && $rE !== $pn->type)) {
goto uJ;
}
$pn = self::castKey($pn, $rE);
uJ:
if ($J1->verify($pn)) {
goto NV;
}
throw new Exception("\125\156\141\142\x6c\x65\x20\164\x6f\x20\x76\141\x6c\x69\144\x61\164\x65\40\x53\x69\147\156\141\164\165\x72\x65");
NV:
}
public static function castKey(XMLSecurityKeySAML $pn, $hA, $Xs = "\x70\165\x62\154\x69\143")
{
if (!($pn->type === $hA)) {
goto DG;
}
return $pn;
DG:
$gD = openssl_pkey_get_details($pn->key);
if (!($gD === FALSE)) {
goto OM;
}
throw new Exception("\125\x6e\141\x62\154\x65\x20\x74\157\x20\147\145\164\40\153\145\171\40\x64\145\164\x61\151\154\163\x20\x66\x72\x6f\x6d\40\130\115\x4c\x53\145\143\165\162\x69\164\x79\113\x65\x79\x53\x41\x4d\114\x2e");
OM:
if (isset($gD["\153\x65\x79"])) {
goto EN;
}
throw new Exception("\115\151\x73\163\151\x6e\x67\40\x6b\145\171\40\x69\x6e\x20\x70\165\x62\x6c\151\x63\40\153\145\171\x20\144\145\164\x61\x69\x6c\x73\56");
EN:
$Q0 = new XMLSecurityKeySAML($hA, array("\164\171\160\145" => $Xs));
$Q0->loadKey($gD["\153\145\x79"]);
return $Q0;
}
public static function processResponse($o_, $IT, $y3, SAML2_Response $bG, $Bs, $A1)
{
$MV = $bG->getDestination();
if (!($MV !== NULL && $MV !== $o_)) {
goto fi;
}
echo "\x44\145\x73\x74\x69\156\x61\x74\151\x6f\x6e\x20\x69\156\40\x72\145\163\160\x6f\x6e\x73\x65\x20\144\157\145\163\x6e\x27\x74\x20\x6d\x61\x74\x63\150\x20\164\x68\x65\40\x63\x75\x72\162\145\156\x74\40\125\122\114\56\40\x44\145\163\x74\151\x6e\141\x74\151\157\156\40\x69\163\x20\42" . $MV . "\42\x2c\40\143\x75\x72\162\145\x6e\x74\x20\x55\122\114\x20\x69\163\40\x22" . $o_ . "\x22\56";
exit;
fi:
try {
$DG = self::checkSign($IT, $y3, $Bs, $A1);
} catch (Exception $LD) {
}
return $DG;
}
public static function checkSign($IT, $y3, $Bs, $A1)
{
$r_ = $y3["\103\145\162\164\x69\146\151\x63\x61\x74\145\x73"];
if (count($r_) === 0) {
goto Kg;
}
$c7 = self::findCertificate($IT, $r_, $A1);
goto Dy;
Kg:
$pk = $Bs;
$pk = explode("\73", $pk);
$c7 = $pk[0];
Dy:
$TK = NULL;
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA1, array("\164\x79\x70\145" => "\x70\165\142\x6c\x69\143"));
$pn->loadKey($c7);
try {
self::validateSignature($y3, $pn);
return TRUE;
} catch (Exception $LD) {
echo "\x56\141\154\x69\x64\x61\164\x69\x6f\x6e\40\x77\151\x74\x68\40\153\145\x79\40\x66\141\151\x6c\145\144\40\167\x69\164\x68\40\145\170\143\x65\x70\164\151\157\156\72\40" . $LD->getMessage();
$TK = $LD;
}
if ($TK !== NULL) {
goto bh;
}
return FALSE;
goto mg;
bh:
throw $TK;
mg:
}
public static function validateIssuerAndAudience($Je, $Tt, $pz)
{
$Ah = current($Je->getAssertions())->getIssuer();
$ti = current(current($Je->getAssertions())->getValidAudiences());
if (strcmp($pz, $Ah) === 0) {
goto G0;
}
echo "\x49\163\x73\165\x65\162\40\143\x61\156\x6e\157\x74\x20\x62\x65\x20\x76\x65\162\x69\146\x69\x65\144\56";
exit;
goto wC;
G0:
if (strcmp($ti, $Tt) === 0) {
goto Ss;
}
$A5 = "\111\156\x76\x61\154\x69\144\x20\141\x75\144\x69\x65\x6e\x63\145\40\125\x52\111\56";
$ZY = "\124\x68\145\40\x76\141\154\x75\145\x20\157\x66\x20\x3c\163\x74\x72\157\x6e\x67\x3e\x49\x64\x50\x20\105\x6e\x74\151\164\x79\40\x49\104\x20\157\x72\x20\x49\x73\x73\165\145\x72\40\157\x72\x20\x41\165\x64\x69\x65\156\143\145\40\x55\122\111\74\x2f\163\164\162\x6f\156\147\x3e\x20\151\156\x20\112\x6f\x6f\155\x6c\141\x20\x53\x41\115\x4c\40\x53\120\40\x70\154\165\147\151\x6e\40\x61\156\x64\40\164\150\x65\x20\143\157\x6e\146\x69\147\x75\162\145\x64\x20\x45\156\x74\151\164\171\x20\x49\104\40\x69\x6e\x20\x79\x6f\165\x72\40\x49\x44\120\40\141\162\x65\x20\x64\151\x66\x66\145\162\x65\x6e\x74\x2e\x3c\142\162\x3e";
$ZY .= "\x3c\x73\164\x72\157\156\x67\x3e\105\170\x70\145\143\164\x65\144\40\x45\156\164\x69\x74\x79\40\111\x44\x3a\74\57\x73\164\162\157\x6e\147\76\x20" . $Tt . "\74\142\x72\76\40";
$ZY .= "\74\163\x74\162\x6f\156\147\x3e\x45\156\164\x69\164\x79\40\111\104\x20\143\157\x6e\146\x69\147\165\x72\x65\x64\40\141\x74\40\x49\104\120\x3a\x3c\57\163\x74\x72\x6f\156\x67\x3e\x20" . $ti . "\x3c\142\x72\76\x20";
self::show_error_messages($A5, $ZY);
goto Yg;
Ss:
return TRUE;
Yg:
wC:
}
private static function findCertificate($rj, $r_, $A1)
{
$f5 = $r_[0];
foreach ($r_ as $pk) {
$r3 = strtolower(sha1(base64_decode($pk)));
if (!in_array($r3, $rj, TRUE)) {
goto Hq;
}
$uw = "\55\x2d\x2d\x2d\55\102\105\x47\x49\116\x20\x43\x45\122\x54\111\106\x49\x43\x41\x54\x45\x2d\x2d\x2d\x2d\55\12" . chunk_split($pk, 64) . "\x2d\55\55\55\55\105\x4e\x44\x20\x43\x45\122\x54\x49\x46\111\103\x41\x54\x45\x2d\x2d\x2d\x2d\x2d\xa";
return $uw;
Hq:
BG:
}
j4:
$f5 = self::sanitize_certificate($f5);
$kR = Jfactory::getApplication()->input->request->getArray();
if (array_key_exists("\122\145\154\x61\171\x53\164\x61\164\x65", $kR) && $kR["\122\x65\154\x61\x79\x53\164\141\x74\145"] == "\x74\x65\163\x74\x56\x61\154\x69\144\141\164\x65") {
goto Wf;
}
echo "\40\x3c\144\151\166\40\x73\x74\x79\x6c\145\75\x22\143\157\154\157\x72\72\40\43\141\71\x34\64\64\x32\x3b\146\x6f\156\164\x2d\x73\x69\x7a\x65\x3a\x31\64\160\x74\73\x20\x6d\141\162\x67\151\x6e\55\142\157\164\164\157\x6d\72\62\60\x70\x78\73\x22\76\x3c\160\76\x3c\142\76\x45\162\x72\x6f\x72\72\x20\74\57\142\x3e\127\145\40\x63\x6f\165\x6c\144\x20\x6e\x6f\164\x20\x73\x69\x67\156\40\171\x6f\x75\40\x69\x6e\x2e\x20\x50\154\x65\141\163\145\x20\x63\x6f\x6e\x74\141\x63\x74\40\x79\157\x75\162\40\x41\x64\x6d\151\x6e\x69\163\164\162\x61\x74\x6f\x72\x2e\74\57\x70\76\x3c\57\x64\x69\166\76";
goto Vg;
Wf:
echo "\74\x64\x69\166\40\163\164\171\154\x65\x3d\42\146\x6f\156\x74\55\146\x61\155\x69\154\171\72\103\x61\x6c\x69\142\x72\151\73\x70\141\144\144\x69\x6e\x67\72\60\x20\63\45\x3b\x22\x3e\xd\12\40\x20\40\40\x20\40\x20\40\x20\x20\40\x20\40\x20\40\40\74\x64\151\x76\40\x73\x74\x79\x6c\x65\75\x22\143\x6f\154\157\162\72\40\43\141\x39\x34\64\64\x32\73\x62\141\143\153\147\162\157\165\x6e\x64\55\143\x6f\x6c\157\x72\x3a\40\43\146\x32\x64\x65\x64\x65\x3b\160\141\144\144\151\156\147\x3a\40\x31\65\160\170\73\155\141\x72\x67\151\x6e\x2d\x62\157\x74\x74\x6f\155\72\40\62\60\x70\170\73\x74\x65\170\164\x2d\141\x6c\151\147\156\x3a\143\145\156\164\x65\162\x3b\142\x6f\162\144\x65\x72\x3a\61\160\x78\x20\163\x6f\154\x69\144\x20\43\x45\66\102\x33\x42\62\73\146\157\156\x74\x2d\163\151\172\145\72\61\70\160\x74\73\42\x3e\x20\x45\x52\122\117\122\74\x2f\144\151\166\76\15\xa\x9\x9\x20\40\x20\x20\40\40\40\40\x20\40\x20\x20\x3c\x64\151\x76\40\163\x74\171\x6c\145\x3d\42\143\x6f\154\157\x72\x3a\x20\x23\x61\71\64\64\x34\62\x3b\x66\x6f\156\164\55\x73\x69\172\x65\72\61\x34\x70\x74\x3b\x20\155\141\x72\x67\151\156\x2d\142\x6f\164\x74\x6f\155\x3a\x32\60\160\x78\73\x22\76\74\x70\x3e\x3c\163\x74\162\157\156\x67\76\x45\162\x72\157\x72\72\40\74\x2f\x73\164\162\157\156\147\x3e\125\x6e\141\142\154\x65\x20\164\x6f\x20\146\151\156\x64\x20\141\x20\x63\145\x72\x74\x69\146\x69\143\x61\164\145\x20\155\141\164\x63\x68\151\156\x67\40\164\x68\145\x20\x63\x6f\x6e\x66\x69\147\165\x72\x65\144\x20\x66\151\x6e\147\x65\x72\160\162\151\156\164\56\74\x2f\x70\76\15\xa\11\11\40\40\40\40\40\40\x20\40\x20\40\40\x20\11\11\x3c\x70\76\x3c\x73\164\x72\157\156\x67\76\120\157\163\x73\x69\x62\x6c\145\x20\x43\x61\x75\x73\x65\72\40\74\57\x73\x74\x72\x6f\156\147\x3e\103\x6f\x6e\164\x65\x6e\164\40\x6f\x66\40\47\130\56\65\60\71\x20\103\145\x72\164\151\146\151\143\141\x74\145\x27\40\146\151\145\x6c\x64\40\x69\x6e\40\123\x65\x72\x76\x69\x63\x65\x20\120\x72\x6f\166\x69\x64\x65\162\x20\x53\x65\164\x74\151\156\147\163\x20\x69\x73\x20\151\x6e\x63\157\x72\x72\x65\143\x74\x3c\x2f\160\76\15\12\11\x9\11\x9\40\40\40\x20\x20\40\40\x20\x20\40\x20\x20\x3c\x70\x3e\74\x62\76\105\170\x70\x65\x63\164\x65\144\40\166\141\154\165\145\72\x3c\57\x62\x3e" . $f5 . "\x3c\57\x70\76";
echo str_repeat("\46\156\142\163\x70\73", 15);
echo "\x3c\57\x64\x69\166\x3e\15\xa\40\x20\x20\40\x20\40\40\x20\40\x20\74\x64\x69\166\x20\163\x74\171\x6c\x65\x3d\x22\x6d\x61\162\x67\x69\156\x3a\63\x25\x3b\x64\151\163\x70\154\141\x79\72\x62\x6c\157\143\x6b\x3b\x74\145\170\x74\55\141\x6c\151\147\x6e\x3a\143\145\x6e\164\x65\162\73\42\76\15\xa\x9\11\11\11\40\x20\x20\x20\74\x66\157\162\155\40\141\143\164\151\157\156\75\42\151\156\x64\145\170\56\x70\x68\160\x22\x3e\15\xa\x9\x9\11\x9\x20\x20\40\40\x3c\x64\151\166\40\x73\164\171\x6c\x65\x3d\42\155\x61\x72\x67\x69\x6e\72\x33\45\73\144\151\x73\160\x6c\141\x79\72\x62\154\157\x63\x6b\73\x74\145\170\x74\x2d\141\x6c\151\x67\x6e\72\x63\145\156\164\x65\162\x3b\42\x3e\74\x69\x6e\160\165\164\40\163\x74\171\154\145\x3d\x22\160\141\x64\x64\151\156\147\72\61\x25\73\167\151\x64\164\x68\72\61\60\x30\160\x78\x3b\x62\x61\143\x6b\x67\162\x6f\x75\156\144\x3a\40\x23\x30\60\71\61\x43\104\40\156\x6f\x6e\x65\x20\x72\145\160\145\x61\x74\40\x73\x63\162\x6f\154\154\x20\x30\x25\40\x30\45\73\143\165\x72\163\157\x72\x3a\40\160\x6f\151\x6e\164\x65\x72\x3b\x66\157\x6e\164\55\163\151\172\x65\x3a\x31\x35\x70\x78\73\142\157\162\x64\145\162\55\x77\x69\x64\164\150\72\40\x31\160\x78\73\142\157\x72\144\145\162\x2d\163\x74\x79\x6c\145\x3a\40\163\157\x6c\151\144\x3b\142\157\x72\x64\145\x72\55\162\141\x64\x69\x75\163\x3a\x20\63\160\x78\x3b\167\150\x69\x74\x65\55\163\160\141\143\145\72\40\156\x6f\167\162\141\160\73\142\157\170\55\163\151\172\151\x6e\147\72\40\x62\x6f\x72\144\x65\162\x2d\142\157\170\x3b\x62\157\x72\144\x65\x72\55\x63\157\x6c\x6f\x72\x3a\x20\43\60\60\67\63\101\101\x3b\142\157\170\x2d\163\150\141\x64\x6f\167\x3a\x20\60\x70\170\40\61\160\x78\x20\x30\x70\170\40\162\x67\x62\x61\x28\61\62\60\x2c\x20\x32\x30\x30\54\x20\62\63\60\54\x20\x30\56\66\51\40\151\x6e\163\145\x74\73\143\157\154\157\162\x3a\40\43\106\106\x46\73\42\x74\171\x70\145\x3d\42\x62\x75\164\x74\x6f\x6e\x22\40\x76\141\x6c\165\x65\75\42\x44\x6f\x6e\145\42\x20\x6f\156\x43\x6c\151\143\x6b\75\42\163\145\x6c\x66\56\143\x6c\x6f\x73\145\x28\x29\x3b\42\x3e\x3c\57\x64\x69\x76\76";
Vg:
exit;
}
private static function doDecryptElement(DOMElement $VK, XMLSecurityKeySAML $z9, array &$Ot)
{
$m9 = new XMLSecEncSAML();
$m9->setNode($VK);
$m9->type = $VK->getAttribute("\x54\171\x70\x65");
$io = $m9->locateKey($VK);
if ($io) {
goto sT;
}
throw new Exception("\x43\x6f\165\x6c\144\40\156\x6f\164\40\x6c\157\143\141\x74\x65\x20\153\x65\171\40\x61\154\147\157\162\151\x74\150\x6d\40\151\x6e\x20\x65\156\143\162\171\x70\x74\x65\144\40\x64\141\164\x61\x2e");
sT:
$Ir = $m9->locateKeyInfo($io);
if ($Ir) {
goto ID;
}
throw new Exception("\x43\x6f\x75\154\x64\x20\156\x6f\164\40\154\157\x63\141\164\x65\x20\74\x64\163\x69\147\72\113\x65\171\x49\x6e\146\157\76\40\x66\157\162\x20\164\x68\145\40\x65\156\143\162\171\160\164\145\x64\x20\x6b\145\171\56");
ID:
$Pw = $z9->getAlgorith();
if ($Ir->isEncrypted) {
goto aD;
}
$m0 = $io->getAlgorith();
if (!($Pw !== $m0)) {
goto FV;
}
throw new Exception("\101\154\x67\x6f\162\x69\164\150\155\x20\155\x69\163\155\141\x74\143\150\40\x62\x65\x74\x77\x65\145\156\x20\x69\156\160\165\x74\x20\x6b\x65\x79\40\x61\x6e\144\40\x6b\x65\x79\x20\151\x6e\40\x6d\145\x73\163\x61\147\145\x2e\x20" . "\x4b\x65\171\x20\x77\141\x73\72\40" . var_export($Pw, TRUE) . "\73\40\155\x65\163\x73\x61\x67\x65\x20\167\x61\x73\72\x20" . var_export($m0, TRUE));
FV:
$io = $z9;
goto Xx;
aD:
$p7 = $Ir->getAlgorith();
if (!in_array($p7, $Ot, TRUE)) {
goto w7;
}
throw new Exception("\101\154\147\x6f\162\x69\164\x68\x6d\40\x64\151\163\141\142\x6c\x65\x64\x3a\x20" . var_export($p7, TRUE));
w7:
if (!($p7 === XMLSecurityKeySAML::RSA_OAEP_MGF1P && $Pw === XMLSecurityKeySAML::RSA_1_5)) {
goto Ag;
}
$Pw = XMLSecurityKeySAML::RSA_OAEP_MGF1P;
Ag:
if (!($Pw !== $p7)) {
goto Lg;
}
throw new Exception("\101\154\x67\157\162\x69\164\150\155\40\x6d\151\x73\x6d\x61\164\x63\150\40\x62\145\x74\x77\x65\x65\156\40\151\156\x70\x75\164\x20\x6b\x65\x79\x20\x61\156\x64\40\x6b\x65\171\x20\165\x73\x65\144\40\x74\157\x20\145\x6e\143\x72\x79\x70\x74\x20" . "\40\x74\x68\145\40\163\x79\155\155\145\164\162\151\x63\x20\x6b\145\x79\x20\146\x6f\162\40\x74\x68\x65\x20\x6d\x65\x73\163\x61\147\145\56\x20\113\x65\x79\40\167\x61\163\x3a\40" . var_export($Pw, TRUE) . "\73\x20\x6d\x65\163\x73\x61\x67\x65\x20\x77\141\163\72\x20" . var_export($p7, TRUE));
Lg:
$sb = $Ir->encryptedCtx;
$Ir->key = $z9->key;
$P6 = $io->getSymmetricKeySize();
if (!($P6 === NULL)) {
goto ry;
}
throw new Exception("\125\156\153\156\x6f\x77\x6e\40\153\x65\171\40\163\x69\172\145\x20\x66\x6f\162\x20\145\x6e\x63\162\x79\x70\164\x69\x6f\156\40\x61\x6c\147\x6f\x72\x69\x74\150\155\72\x20" . var_export($io->type, TRUE));
ry:
try {
$pn = $sb->decryptKey($Ir);
if (!(strlen($pn) != $P6)) {
goto hj;
}
throw new Exception("\125\x6e\145\x78\160\x65\143\164\145\x64\40\x6b\x65\171\x20\163\151\172\145\x20\50" . strlen($pn) * 8 . "\x62\151\164\x73\51\40\146\x6f\x72\40\x65\156\143\x72\171\160\x74\x69\157\156\40\141\x6c\147\x6f\x72\151\x74\150\155\x3a\x20" . var_export($io->type, TRUE));
hj:
} catch (Exception $LD) {
$X2 = $sb->getCipherValue();
$Ql = openssl_pkey_get_details($Ir->key);
$Ql = sha1(serialize($Ql), TRUE);
$pn = sha1($X2 . $Ql, TRUE);
if (strlen($pn) > $P6) {
goto k1;
}
if (strlen($pn) < $P6) {
goto wu;
}
goto s4;
k1:
$pn = substr($pn, 0, $P6);
goto s4;
wu:
$pn = str_pad($pn, $P6);
s4:
}
$io->loadkey($pn);
Xx:
$hA = $io->getAlgorith();
if (!in_array($hA, $Ot, TRUE)) {
goto Bg;
}
throw new Exception("\x41\x6c\147\x6f\162\151\x74\150\155\x20\x64\151\163\x61\x62\x6c\145\x64\x3a\40" . var_export($hA, TRUE));
Bg:
$z8 = $m9->decryptNode($io, FALSE);
$Zo = "\74\x72\157\x6f\164\40\x78\x6d\x6c\x6e\163\x3a\x73\141\155\x6c\x3d\x22\165\x72\x6e\72\x6f\141\x73\151\163\x3a\x6e\141\155\x65\163\72\x74\x63\72\x53\x41\x4d\114\x3a\x32\x2e\x30\x3a\141\x73\163\x65\162\164\x69\x6f\x6e\x22\x20" . "\x78\x6d\x6c\156\163\x3a\170\163\151\x3d\x22\150\164\x74\x70\72\x2f\57\x77\x77\167\56\x77\63\x2e\157\162\x67\x2f\62\x30\60\x31\x2f\x58\x4d\114\x53\x63\x68\x65\x6d\141\x2d\x69\156\x73\x74\x61\x6e\143\145\x22\x3e" . $z8 . "\74\57\x72\x6f\x6f\x74\x3e";
$RZ = new DOMDocument();
if (@$RZ->loadXML($Zo)) {
goto pU;
}
throw new Exception("\x46\x61\x69\x6c\x65\x64\x20\x74\x6f\40\160\x61\x72\x73\x65\40\144\x65\x63\x72\x79\160\x74\145\144\40\130\x4d\114\56\40\x4d\141\x79\142\145\40\164\x68\x65\x20\x77\162\x6f\156\147\40\x73\150\x61\x72\145\x64\x6b\x65\x79\x20\x77\141\163\40\x75\x73\x65\144\77");
pU:
$Ic = $RZ->firstChild->firstChild;
if (!($Ic === NULL)) {
goto Eh;
}
throw new Exception("\115\151\x73\163\151\156\147\x20\x65\156\143\162\x79\x70\164\x65\x64\x20\x65\154\x65\155\x65\156\x74\x2e");
Eh:
if ($Ic instanceof DOMElement) {
goto dq;
}
throw new Exception("\x44\x65\143\x72\171\x70\164\x65\144\40\x65\154\145\x6d\x65\x6e\164\40\x77\x61\163\40\x6e\157\164\x20\141\143\164\x75\x61\154\154\x79\40\141\x20\x44\117\x4d\105\x6c\145\x6d\x65\x6e\x74\x2e");
dq:
return $Ic;
}
public static function decryptElement(DOMElement $VK, XMLSecurityKeySAML $z9, array $Ot = array())
{
try {
return self::doDecryptElement($VK, $z9, $Ot);
} catch (Exception $LD) {
$bD = UtilitiesSAML::getSAMLConfiguration();
$zs = self::get_public_private_certificate($bD, "\160\165\x62\x6c\151\143\137\x63\x65\x72\x74\151\146\x69\x63\141\x74\145");
$ez = JPATH_BASE . DIRECTORY_SEPARATOR . "\x70\x6c\165\x67\151\156\163" . DIRECTORY_SEPARATOR . "\141\x75\x74\x68\145\x6e\x74\151\x63\x61\x74\151\x6f\x6e" . DIRECTORY_SEPARATOR . "\155\151\x6e\151\x6f\162\x61\x6e\x67\145\x73\x61\x6d\x6c" . DIRECTORY_SEPARATOR . "\x73\141\x6d\x6c\x32" . DIRECTORY_SEPARATOR . "\x63\145\162\164" . DIRECTORY_SEPARATOR . "\163\160\x2d\x63\x65\162\x74\151\x66\151\x63\141\164\145\56\143\x72\x74";
if (!empty($zs)) {
goto Cv;
}
$f5 = file_get_contents($ez);
$HQ = "\x3c\163\164\162\157\x6e\147\x3e\x50\157\163\163\x69\142\x6c\x65\40\x43\x61\x75\x73\145\72\x20\x3c\57\x73\164\162\x6f\156\147\76\x49\146\40\171\x6f\165\40\150\x61\166\x65\x20\x72\x65\x6d\x6f\x76\x65\x64\40\x63\165\x73\164\157\x6d\40\x63\x65\x72\164\151\x66\x69\143\x61\x74\145\40\x74\x68\145\x6e\x20\160\x6c\x65\141\163\145\x20\x75\160\144\x61\x74\x65\40\x74\x68\x69\x73\x20\144\x65\146\x61\165\x6c\x74\x20\x70\165\142\154\151\x63\x20\x63\x65\162\164\151\146\x69\143\x61\164\x65\x20\x69\x6e\x20\171\x6f\165\162\40\x49\x44\x50\40\163\151\144\145\x2e";
goto Ji;
Cv:
$f5 = $zs;
$HQ = "\74\163\164\162\x6f\x6e\x67\76\x50\x6f\x73\x73\x69\142\154\145\40\103\141\165\163\x65\72\x20\x3c\x2f\x73\164\162\x6f\x6e\x67\x3e\x49\146\x20\171\157\165\x20\x68\141\x76\x65\x20\165\160\154\x6f\x61\x64\x65\x64\x20\x63\165\x73\164\x6f\x6d\40\x63\145\162\x74\151\146\x69\143\141\164\x65\x20\x74\x68\x65\x6e\x20\x70\x6c\x65\141\163\145\x20\x75\x70\144\141\x74\x65\x20\164\x68\151\x73\x20\156\x65\x77\40\x63\x75\163\164\157\x6d\x20\160\x75\x62\x6c\x69\x63\40\143\145\162\x74\x69\146\x69\143\x61\164\x65\x20\x69\x6e\40\171\157\x75\x72\40\x49\104\x50\x20\x73\x69\x64\145\56";
Ji:
echo "\x3c\x64\x69\x76\x20\163\x74\x79\154\x65\75\x22\146\157\x6e\164\55\x66\141\x6d\x69\154\171\72\x43\141\x6c\151\x62\162\151\x3b\x70\141\144\x64\x69\156\x67\72\60\40\63\x25\73\x22\x3e";
echo "\x3c\x64\151\x76\40\163\x74\x79\x6c\x65\75\42\x63\157\x6c\x6f\x72\72\40\x23\x61\71\x34\64\x34\x32\73\x62\141\x63\153\x67\x72\157\x75\x6e\144\x2d\x63\157\x6c\x6f\x72\x3a\40\43\146\62\144\x65\144\x65\73\160\x61\144\144\151\x6e\147\x3a\x20\x31\65\160\x78\x3b\155\141\162\147\x69\x6e\55\142\157\164\164\157\x6d\72\x20\62\x30\x70\x78\73\x74\x65\170\x74\55\x61\154\x69\x67\x6e\x3a\x63\x65\x6e\x74\x65\x72\x3b\142\157\x72\144\x65\162\72\x31\x70\x78\40\x73\157\154\151\x64\40\x23\105\x36\x42\x33\102\62\x3b\x66\x6f\x6e\x74\x2d\x73\x69\172\x65\x3a\61\x38\160\164\x3b\x22\x3e\x20\x45\x52\122\x4f\122\x3c\x2f\144\151\x76\x3e\15\xa\40\40\40\x20\40\x20\x20\x20\x20\x20\x20\x20\40\x20\40\x20\x20\40\40\x20\x3c\x64\x69\x76\x20\x73\164\x79\x6c\145\75\x22\x63\x6f\154\x6f\162\72\x20\43\x61\71\x34\64\x34\x32\x3b\x66\x6f\x6e\164\55\x73\x69\x7a\x65\x3a\61\64\160\164\x3b\x20\x6d\x61\162\147\x69\x6e\55\x62\157\164\x74\x6f\x6d\72\62\60\160\x78\73\x22\x3e\x3c\160\76\x3c\163\x74\162\x6f\156\147\76\x45\x72\x72\x6f\x72\72\x20\x3c\57\163\x74\162\157\x6e\x67\76\125\x6e\x61\142\x6c\x65\40\x74\157\x20\x66\151\x6e\x64\40\141\40\x63\145\162\164\151\146\x69\x63\141\164\145\x20\x6d\x61\164\x63\150\151\156\x67\40\x74\x68\x65\40\x63\x6f\x6e\146\x69\x67\165\x72\x65\x64\x20\x66\151\x6e\x67\x65\162\160\162\151\156\164\x2e\74\x2f\160\76\xd\12\x20\40\x20\x20\40\40\x20\40\x20\40\40\x20\40\x20\x20\x20\40\40\40\40\40\x20\40\x20\x3c\160\76" . $HQ . "\74\x2f\x70\x3e\xd\12\11\11\11\x20\40\40\40\40\x20\40\40\x20\x20\40\40\x20\x20\x20\x20\40\40\x3c\x70\x3e\74\142\76\105\x78\160\145\143\164\x65\x64\x20\x76\141\154\x75\145\x3a\x20\74\57\142\x3e" . $f5 . "\74\x2f\160\76";
echo str_repeat("\46\x6e\142\x73\x70\x3b", 15);
echo "\74\x2f\x64\x69\166\x3e\xd\12\x20\40\x20\x20\40\40\x20\40\40\x20\40\40\40\40\x20\40\x20\x20\40\x20\40\40\x20\40\x3c\x64\x69\x76\x20\x73\164\x79\154\145\75\x22\x6d\x61\162\x67\x69\156\x3a\63\x25\73\144\x69\163\160\x6c\x61\x79\72\142\154\x6f\x63\x6b\73\x74\145\170\164\x2d\141\x6c\151\147\156\72\143\145\x6e\164\x65\x72\73\x22\76\15\12\40\x20\x20\x20\x20\x20\x20\x20\x20\40\x20\40\x20\x20\40\x20\x20\x20\40\40\40\40\x20\40\74\x66\x6f\x72\155\40\141\x63\164\x69\157\156\75\x22\151\156\x64\145\170\x2e\160\x68\x70\42\x3e\15\xa\40\x20\40\x20\40\x20\40\x20\x20\40\x20\40\x20\x20\x20\x20\x20\x20\40\40\x20\40\x20\x20\40\40\40\x20\74\x64\x69\x76\40\x73\x74\171\154\145\x3d\x22\155\x61\x72\147\151\x6e\x3a\63\x25\x3b\x64\151\163\160\x6c\141\171\72\142\x6c\157\x63\x6b\x3b\x74\x65\x78\164\55\141\154\151\147\156\72\143\145\156\164\x65\162\73\x22\76\x3c\x69\x6e\x70\165\x74\x20\163\x74\x79\x6c\x65\x3d\x22\160\x61\x64\144\x69\156\x67\x3a\x31\x25\x3b\167\x69\x64\164\150\72\x31\60\60\160\170\x3b\x62\x61\143\153\x67\x72\157\165\x6e\x64\x3a\x20\x23\60\x30\x39\x31\x43\104\40\156\157\156\x65\x20\x72\x65\x70\x65\x61\x74\40\x73\143\x72\x6f\154\x6c\x20\x30\x25\40\60\45\73\143\165\x72\163\157\x72\72\x20\160\x6f\x69\x6e\164\x65\162\73\x66\x6f\156\164\x2d\x73\151\172\145\72\61\65\x70\170\73\x62\x6f\x72\x64\x65\162\x2d\x77\x69\x64\164\150\72\40\61\160\x78\73\142\157\162\144\x65\x72\55\x73\164\x79\x6c\x65\x3a\40\x73\157\154\151\144\73\142\157\162\144\x65\x72\55\162\141\144\x69\165\x73\x3a\x20\x33\x70\x78\73\167\x68\151\164\145\55\163\x70\141\143\145\72\40\x6e\x6f\167\x72\141\160\x3b\x62\157\x78\55\163\151\172\151\x6e\147\x3a\x20\142\157\x72\144\x65\162\55\142\x6f\x78\x3b\142\157\162\144\145\x72\x2d\143\x6f\154\x6f\x72\x3a\40\x23\60\60\67\63\x41\101\x3b\x62\x6f\170\x2d\163\x68\141\x64\x6f\x77\72\40\x30\x70\170\40\x31\160\x78\40\60\160\170\40\162\147\x62\x61\x28\61\62\x30\54\x20\x32\60\60\54\40\62\x33\60\54\x20\60\x2e\x36\x29\x20\x69\156\163\145\x74\73\143\157\154\157\162\x3a\x20\43\x46\x46\106\x3b\x22\164\x79\x70\145\75\x22\x62\x75\x74\164\x6f\156\42\x20\166\141\x6c\x75\145\x3d\x22\104\157\156\145\x22\40\x6f\x6e\x43\x6c\151\x63\153\x3d\42\x73\x65\x6c\x66\x2e\143\154\x6f\163\x65\x28\51\73\42\76\x3c\57\144\151\x76\x3e";
exit;
}
}
public static function get_mapped_groups($FB, $kT)
{
$Ae = array();
foreach ($FB as $BL => $L1) {
if (!(!empty($BL) && in_array(trim($BL), $kT))) {
goto z7;
}
$Ae[] = $L1;
z7:
T2:
}
qm:
return array_unique($Ae);
}
public static function get_role_based_redirect_values($FB, $kT)
{
$Ae = array();
foreach ($FB as $BL => $L1) {
if (empty($BL)) {
goto br;
}
if (!($BL == $kT)) {
goto UZ;
}
$Ae = $L1;
UZ:
br:
PA:
}
D9:
return $Ae;
}
public static function get_user_from_joomla($fd, $Hv, $u6)
{
$N5 = JFactory::getDBO();
switch ($fd) {
case "\x75\163\145\x72\156\x61\x6d\145":
$Hx = $N5->getQuery(true)->select("\x69\x64")->from("\43\x5f\137\165\163\x65\x72\x73")->where("\x75\x73\145\x72\x6e\141\x6d\x65\x3d" . $N5->quote($Hv));
goto Si;
case "\x65\155\x61\x69\154":
$Hx = $N5->getQuery(true)->select("\x69\x64")->from("\x23\x5f\x5f\x75\x73\145\162\x73")->where("\145\155\x61\151\x6c\75" . $N5->quote($u6));
goto Si;
}
XG:
Si:
$N5->setQuery($Hx);
$Eh = $N5->loadObject();
return $Eh;
}
public static function get_user_credentials($Hv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true)->select("\x69\x64\54\40\x70\x61\x73\163\167\157\162\x64")->from("\43\137\x5f\x75\163\145\x72\x73")->where("\x75\163\x65\162\x6e\x61\x6d\x65\75" . $N5->quote($Hv));
$N5->setQuery($Hx);
return $N5->loadObject();
}
public static function getEncryptionAlgorithm($Es)
{
switch ($Es) {
case "\x68\x74\164\x70\72\57\57\x77\167\x77\x2e\167\x33\x2e\157\x72\x67\57\62\x30\x30\x31\x2f\x30\x34\x2f\x78\155\154\x65\156\x63\x23\x74\162\151\160\x6c\145\144\x65\x73\55\x63\x62\x63":
return XMLSecurityKeySAML::TRIPLEDES_CBC;
goto gf;
case "\150\x74\x74\160\72\x2f\57\167\x77\167\56\x77\x33\x2e\157\162\x67\x2f\62\x30\60\x31\57\60\64\57\170\155\x6c\145\x6e\x63\43\141\x65\163\x31\62\x38\x2d\143\142\x63":
return XMLSecurityKeySAML::AES128_CBC;
case "\x68\x74\164\x70\72\x2f\x2f\167\167\x77\x2e\167\63\56\x6f\162\147\x2f\62\60\60\x31\x2f\60\64\x2f\x78\155\x6c\145\156\143\43\141\x65\163\61\71\62\55\x63\142\x63":
return XMLSecurityKeySAML::AES192_CBC;
goto gf;
case "\150\164\164\160\x3a\x2f\57\x77\x77\x77\x2e\x77\63\x2e\157\162\147\x2f\x32\60\x30\x31\x2f\60\64\x2f\x78\x6d\154\145\156\x63\43\141\x65\x73\62\x35\x36\x2d\143\142\x63":
return XMLSecurityKeySAML::AES256_CBC;
goto gf;
case "\150\x74\164\160\72\x2f\x2f\x77\x77\x77\x2e\167\63\x2e\157\x72\x67\x2f\x32\x30\x30\x31\57\x30\64\x2f\x78\155\154\145\x6e\x63\x23\x72\x73\x61\x2d\x31\137\x35":
return XMLSecurityKeySAML::RSA_1_5;
goto gf;
case "\150\x74\x74\160\72\57\57\x77\167\167\56\x77\x33\56\157\162\x67\x2f\x32\x30\x30\61\x2f\60\x34\x2f\x78\x6d\x6c\145\156\x63\x23\162\163\x61\55\x6f\x61\x65\160\55\x6d\147\x66\61\160":
return XMLSecurityKeySAML::RSA_OAEP_MGF1P;
goto gf;
case "\x68\x74\164\x70\x3a\57\x2f\x77\167\x77\x2e\x77\x33\56\157\x72\147\57\x32\60\60\60\57\60\x39\57\170\x6d\154\144\163\151\x67\x23\x64\163\141\55\163\150\141\61":
return XMLSecurityKeySAML::DSA_SHA1;
goto gf;
case "\x68\x74\x74\x70\x3a\x2f\x2f\167\x77\x77\x2e\167\63\x2e\157\x72\x67\x2f\62\60\60\60\x2f\60\x39\x2f\170\155\x6c\144\x73\151\x67\43\162\163\x61\55\x73\150\x61\61":
return XMLSecurityKeySAML::RSA_SHA1;
goto gf;
case "\150\x74\164\x70\x3a\57\x2f\x77\x77\167\56\x77\x33\56\x6f\162\x67\x2f\62\60\60\61\x2f\60\x34\x2f\x78\x6d\154\144\163\151\x67\55\155\157\162\x65\43\162\x73\141\55\163\x68\141\62\x35\x36":
return XMLSecurityKeySAML::RSA_SHA256;
goto gf;
case "\x68\x74\x74\160\72\57\57\x77\x77\167\56\x77\63\x2e\x6f\162\x67\57\62\60\x30\61\57\x30\64\x2f\x78\155\154\x64\163\x69\147\x2d\155\x6f\162\145\x23\162\163\x61\55\163\x68\141\x33\x38\x34":
return XMLSecurityKeySAML::RSA_SHA384;
goto gf;
case "\150\164\x74\160\72\57\57\167\x77\167\56\167\x33\56\x6f\162\147\x2f\x32\60\x30\x31\57\60\64\57\x78\155\154\144\x73\151\x67\x2d\x6d\x6f\x72\145\x23\162\163\x61\x2d\163\x68\x61\x35\x31\x32":
return XMLSecurityKeySAML::RSA_SHA512;
goto gf;
default:
throw new Exception("\x49\156\166\141\x6c\151\144\x20\x45\x6e\x63\162\x79\160\x74\x69\157\156\x20\x4d\x65\164\150\157\144\x3a\x20" . $Es);
goto gf;
}
na:
gf:
}
public static function sanitize_certificate($op)
{
$op = preg_replace("\57\x5b\xd\12\135\x2b\x2f", '', $op);
$op = str_replace("\x2d", '', $op);
$op = str_replace("\x42\x45\x47\111\x4e\40\103\105\x52\x54\x49\106\111\103\x41\124\x45", '', $op);
$op = str_replace("\x45\116\104\40\103\x45\x52\124\111\106\111\x43\x41\x54\x45", '', $op);
$op = str_replace("\x20", '', $op);
$op = chunk_split($op, 64, "\15\12");
$op = "\55\x2d\55\x2d\x2d\x42\105\x47\x49\116\x20\103\105\x52\124\x49\106\x49\103\x41\124\x45\x2d\55\55\x2d\55\15\xa" . $op . "\55\55\55\x2d\55\105\x4e\x44\40\103\x45\122\124\111\106\111\x43\101\x54\105\x2d\55\x2d\55\55";
return $op;
}
public static function desanitize_certificate($op)
{
$op = preg_replace("\x2f\133\15\xa\x5d\x2b\57", '', $op);
$op = str_replace("\x2d\55\x2d\x2d\55\102\105\107\x49\116\40\x43\x45\x52\x54\111\x46\111\103\101\124\x45\x2d\x2d\55\55\x2d", '', $op);
$op = str_replace("\x2d\x2d\x2d\x2d\55\x45\x4e\x44\x20\x43\105\122\124\x49\106\111\x43\101\124\105\x2d\55\x2d\55\x2d", '', $op);
$op = str_replace("\40", '', $op);
return $op;
}
public static function mo_saml_show_test_result($Hv, $tO, $ov)
{
ob_end_clean();
$ov = $ov . "\57\160\154\x75\x67\x69\x6e\163\x2f\x61\x75\164\150\145\156\x74\151\x63\x61\164\151\x6f\156\57\x6d\x69\x6e\151\157\x72\x61\156\147\145\x73\x61\x6d\x6c\x2f";
echo "\74\x64\x69\x76\x20\163\x74\171\154\145\75\42\x66\x6f\156\164\55\x66\141\x6d\x69\x6c\x79\72\x43\x61\x6c\x69\x62\x72\151\73\160\141\x64\x64\x69\156\147\72\60\40\63\x25\x3b\42\76";
if (!empty($Hv)) {
goto pm;
}
echo "\74\x64\151\x76\x20\x73\x74\x79\154\145\x3d\x22\143\x6f\154\157\x72\x3a\x20\x23\141\71\x34\x34\x34\62\x3b\142\141\x63\x6b\x67\x72\x6f\165\x6e\x64\55\x63\x6f\154\x6f\x72\72\40\43\146\x32\x64\145\x64\x65\73\x70\141\144\x64\x69\x6e\x67\x3a\x20\61\65\160\x78\73\x6d\x61\x72\x67\151\156\x2d\x62\x6f\164\x74\x6f\155\72\40\x32\x30\x70\170\73\x74\x65\x78\x74\x2d\141\x6c\x69\147\x6e\x3a\x63\x65\156\164\x65\162\x3b\142\x6f\162\144\145\x72\x3a\x31\160\170\x20\163\x6f\154\151\x64\40\43\105\66\102\63\102\x32\73\x66\157\x6e\x74\55\x73\151\x7a\x65\72\61\x38\x70\x74\73\42\76\124\105\123\124\x20\106\x41\111\114\105\x44\x3c\57\144\151\x76\76\15\12\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\x20\40\40\40\x20\x20\x20\x20\x20\74\x64\151\166\40\163\164\171\154\145\75\42\x63\157\154\157\162\72\x20\x23\141\x39\x34\64\64\62\x3b\146\157\156\164\x2d\163\151\172\145\72\x31\x34\x70\x74\73\x20\155\x61\x72\147\x69\156\x2d\x62\157\x74\164\x6f\155\x3a\x32\x30\160\x78\x3b\x22\x3e\127\x41\x52\116\x49\x4e\107\72\40\123\157\155\x65\40\x41\164\x74\162\151\x62\165\164\145\163\x20\104\x69\144\40\x4e\157\x74\40\115\141\164\x63\x68\x2e\x3c\x2f\144\x69\166\76\15\12\x20\40\40\40\x20\40\40\x20\40\x20\40\x20\40\x20\40\x20\40\x20\x20\40\x3c\x64\151\166\40\x73\164\x79\154\x65\75\x22\144\151\x73\x70\x6c\x61\x79\x3a\142\x6c\157\143\x6b\73\164\x65\x78\164\x2d\x61\x6c\151\x67\x6e\72\143\x65\156\x74\145\162\73\x6d\141\162\147\x69\156\55\142\157\164\x74\x6f\155\x3a\64\45\73\x22\x3e\x3c\x69\155\x67\40\x73\x74\171\154\x65\75\42\x77\151\x64\x74\150\72\x31\x35\45\x3b\42\163\x72\x63\x3d\42" . $ov . "\x69\155\141\x67\x65\x73\x2f\x77\162\x6f\x6e\x67\56\x70\x6e\x67\x22\76\74\57\144\x69\166\x3e";
goto Ur;
pm:
echo "\x3c\x64\x69\x76\x20\x73\164\171\154\x65\75\x22\x63\157\154\x6f\x72\x3a\x20\x23\63\x63\67\66\x33\x64\x3b\xd\xa\x20\40\40\x20\x20\x20\40\40\40\40\x20\40\x20\40\40\40\40\40\40\x20\x62\x61\x63\x6b\x67\x72\157\165\x6e\x64\55\x63\157\154\157\x72\72\40\43\x64\146\146\60\144\70\x3b\40\160\141\x64\x64\x69\x6e\147\72\62\45\x3b\155\x61\162\x67\x69\x6e\55\142\157\x74\x74\157\155\72\62\60\x70\x78\73\x74\145\170\x74\55\141\x6c\x69\147\x6e\x3a\143\x65\156\164\145\162\x3b\x20\142\x6f\162\144\145\162\72\x31\x70\170\x20\163\x6f\x6c\x69\144\40\43\x41\x45\x44\102\71\101\x3b\x20\x66\x6f\x6e\164\x2d\163\151\x7a\145\x3a\x31\x38\160\x74\73\42\x3e\x54\x45\x53\x54\x20\x53\x55\x43\103\x45\x53\x53\x46\125\114\74\x2f\x64\x69\x76\x3e\15\12\x20\x20\x20\x20\40\40\40\x20\40\40\40\x20\x20\x20\x20\x20\40\x20\x20\40\x3c\144\x69\166\40\x73\x74\x79\x6c\x65\75\42\x64\151\163\160\154\141\171\x3a\142\x6c\x6f\143\153\73\x74\145\170\164\55\x61\154\x69\x67\156\72\x63\x65\156\x74\x65\162\x3b\155\141\x72\147\151\x6e\x2d\142\157\x74\164\157\155\x3a\x34\x25\73\42\76\x3c\x69\x6d\x67\x20\x73\x74\x79\x6c\145\75\x22\167\151\144\x74\150\x3a\x31\x35\x25\73\x22\163\162\x63\x3d\x22" . $ov . "\151\155\x61\147\145\163\57\x67\x72\x65\145\x6e\x5f\143\x68\x65\143\x6b\56\x70\156\x67\42\76\x3c\x2f\144\151\x76\x3e";
Ur:
echo "\x3c\x73\160\141\x6e\x20\163\x74\x79\154\x65\75\42\146\157\156\164\55\x73\151\x7a\x65\x3a\61\x34\160\x74\73\x22\76\x3c\x62\76\110\x65\154\x6c\x6f\74\x2f\142\x3e\x2c\40" . $Hv . "\x3c\x2f\x73\160\141\156\76\x3c\142\x72\57\x3e\74\160\x20\163\164\x79\154\145\75\x22\146\x6f\156\x74\x2d\167\145\x69\147\150\164\72\142\157\154\144\x3b\x66\x6f\156\164\55\x73\x69\x7a\145\72\61\x34\160\164\73\x6d\141\162\147\151\x6e\x2d\154\x65\146\x74\72\x31\45\x3b\x22\76\x41\x54\124\122\x49\102\x55\x54\x45\123\40\x52\105\103\105\111\x56\x45\x44\x3a\74\57\160\76\15\xa\x20\40\x20\x20\40\40\x20\40\40\x20\x20\x20\x20\x20\x20\40\40\40\40\40\74\164\141\142\154\x65\40\163\164\171\154\145\x3d\42\142\157\162\x64\145\162\55\x63\x6f\154\x6c\x61\x70\163\145\72\x63\x6f\x6c\154\141\160\163\145\x3b\142\157\x72\x64\x65\162\x2d\163\x70\x61\143\151\156\x67\x3a\60\x3b\x20\x64\x69\x73\160\154\x61\x79\72\x74\x61\x62\x6c\145\x3b\x77\x69\144\164\x68\x3a\61\x30\x30\45\x3b\x20\146\x6f\x6e\164\x2d\x73\151\x7a\145\72\x31\64\x70\x74\x3b\x62\141\x63\x6b\147\x72\157\165\x6e\144\x2d\x63\x6f\154\157\162\x3a\43\105\104\x45\104\x45\104\73\42\x3e\15\xa\x20\x20\40\40\40\40\x20\40\40\x20\x20\40\40\40\x20\40\40\x20\40\40\74\x74\162\40\x73\x74\171\154\x65\75\42\164\x65\x78\164\55\x61\154\x69\x67\156\72\143\145\x6e\164\x65\x72\73\42\x3e\74\164\x64\40\163\x74\171\x6c\x65\75\x22\146\x6f\156\x74\x2d\167\145\151\147\x68\x74\x3a\x62\157\x6c\x64\73\x62\157\x72\x64\145\162\x3a\62\x70\170\x20\163\157\154\x69\144\x20\x23\71\64\x39\x30\71\x30\x3b\160\141\x64\144\151\x6e\x67\x3a\x32\45\x3b\42\76\x41\124\124\x52\111\102\125\124\105\x20\x4e\101\x4d\105\x3c\x2f\164\x64\76\x3c\164\144\x20\163\164\x79\154\x65\x3d\x22\146\157\x6e\x74\x2d\x77\x65\x69\147\x68\x74\72\x62\x6f\154\144\73\160\141\x64\x64\151\x6e\x67\x3a\62\45\73\142\157\162\144\145\162\72\62\x70\170\40\163\157\x6c\151\x64\x20\x23\71\64\x39\x30\71\60\73\x20\x77\x6f\x72\x64\55\167\x72\x61\160\x3a\x62\x72\145\x61\x6b\x2d\167\x6f\x72\144\x3b\42\x3e\x41\124\x54\122\x49\102\125\124\x45\x20\126\x41\114\125\105\x3c\x2f\164\x64\76\x3c\x2f\x74\x72\76";
if (!empty($tO)) {
goto ej;
}
echo "\x4e\x6f\40\x41\164\164\x72\151\142\165\164\145\163\x20\x52\145\143\145\x69\166\145\144\x2e";
goto O1;
ej:
foreach ($tO as $pn => $pm) {
echo "\x3c\164\x72\x3e\x3c\x74\144\x20\163\164\171\x6c\145\x3d\47\x66\x6f\x6e\164\55\x77\145\151\147\150\164\x3a\142\157\x6c\144\x3b\x62\x6f\162\x64\145\x72\72\62\160\170\x20\x73\x6f\x6c\151\x64\40\x23\x39\x34\71\60\x39\60\73\x70\x61\144\144\x69\x6e\x67\x3a\62\45\73\x27\76" . $pn . "\x3c\57\x74\x64\x3e\74\x74\x64\x20\163\x74\x79\154\x65\x3d\47\x70\141\144\144\x69\x6e\147\72\62\45\x3b\x62\x6f\162\144\x65\x72\72\x32\160\170\40\163\x6f\x6c\x69\x64\x20\43\x39\x34\x39\x30\x39\60\73\40\x77\x6f\x72\144\55\167\x72\x61\160\x3a\x62\x72\x65\141\x6b\55\167\157\162\x64\x3b\47\x3e" . implode("\74\x62\x72\57\76", (array) $pm) . "\x3c\57\x74\144\76\74\57\x74\x72\76";
z_:
}
g9:
O1:
echo "\74\57\x74\x61\142\x6c\145\x3e\x3c\57\x64\151\x76\x3e";
echo "\x3c\x64\151\166\40\x73\x74\x79\x6c\x65\75\42\155\141\162\147\151\156\x3a\x33\45\x3b\x64\151\x73\160\154\x61\x79\72\x62\x6c\157\143\153\73\164\x65\170\x74\x2d\x61\154\151\x67\x6e\x3a\143\x65\x6e\x74\145\x72\73\42\76\x3c\151\x6e\160\165\164\x20\x73\164\171\x6c\x65\75\x22\x70\141\144\x64\151\156\147\x3a\x31\45\x3b\x77\151\144\x74\x68\x3a\61\60\60\x70\170\73\x62\141\143\153\147\x72\x6f\x75\x6e\144\72\40\x23\x30\60\71\61\103\x44\40\156\157\156\x65\40\162\145\160\x65\x61\x74\x20\x73\143\x72\157\154\x6c\x20\x30\45\x20\x30\x25\x3b\x63\x75\162\x73\x6f\162\x3a\x20\160\x6f\x69\156\164\145\x72\x3b\x66\x6f\x6e\x74\x2d\163\x69\x7a\x65\x3a\61\x35\x70\170\x3b\142\x6f\162\x64\145\162\x2d\167\151\144\164\x68\72\x20\61\x70\170\x3b\142\157\162\144\x65\162\55\163\x74\171\x6c\x65\72\x20\163\157\154\151\x64\73\x62\x6f\162\x64\x65\x72\x2d\162\141\x64\x69\x75\163\x3a\x20\x33\160\x78\x3b\x77\x68\151\164\x65\55\163\160\141\x63\145\x3a\x20\156\157\x77\162\x61\x70\x3b\x62\x6f\x78\x2d\x73\x69\172\x69\156\147\72\x20\142\x6f\x72\x64\145\162\55\142\157\170\x3b\142\157\162\144\145\x72\x2d\x63\x6f\154\157\x72\x3a\x20\x23\x30\x30\67\63\101\x41\x3b\142\x6f\170\55\163\x68\x61\144\157\x77\72\40\60\160\x78\x20\x31\x70\x78\x20\x30\160\x78\x20\162\x67\x62\x61\50\x31\62\x30\x2c\x20\62\60\x30\54\40\62\x33\60\x2c\x20\60\x2e\x36\x29\40\151\156\163\145\x74\x3b\x63\x6f\x6c\x6f\162\72\x20\x23\x46\106\x46\73\x22\x74\171\x70\x65\75\x22\x62\x75\x74\164\x6f\156\42\40\166\x61\x6c\x75\145\x3d\42\x44\157\156\145\x22\x20\157\x6e\x43\154\x69\143\153\75\x22\x73\x65\154\146\56\x63\154\157\163\x65\x28\x29\73\42\76\74\x2f\144\151\x76\x3e";
exit;
}
public static function postSAMLRequest($gs, $QU, $A1)
{
echo "\74\150\164\x6d\x6c\x3e\x3c\x68\x65\141\144\x3e\x3c\163\143\162\x69\x70\164\40\163\162\x63\75\47\x68\164\164\x70\163\72\57\57\143\157\x64\x65\56\x6a\x71\x75\145\162\x79\56\143\157\x6d\57\x6a\x71\x75\145\162\171\55\61\x2e\61\61\x2e\63\x2e\x6d\x69\x6e\56\152\x73\47\x3e\x3c\57\163\x63\162\x69\160\x74\x3e\74\x73\143\162\x69\160\x74\x20\x74\171\160\x65\x3d\x22\x74\x65\170\x74\x2f\x6a\x61\166\x61\x73\x63\162\151\x70\164\x22\x3e\44\x28\x66\165\x6e\x63\164\x69\x6f\156\x28\51\173\x64\x6f\143\x75\155\145\x6e\164\x2e\x66\157\x72\155\x73\133\x27\x73\141\x6d\x6c\55\162\x65\x71\x75\x65\x73\x74\x2d\146\157\x72\155\47\135\56\x73\165\142\x6d\x69\164\x28\51\73\x7d\51\x3b\x3c\57\x73\143\162\x69\x70\164\x3e\74\x2f\x68\x65\141\144\76\74\x62\157\144\171\x3e\120\x6c\x65\x61\x73\x65\x20\167\x61\151\164\x2e\56\56\74\146\157\x72\x6d\40\x61\143\x74\x69\x6f\x6e\75\42" . $gs . "\x22\40\155\x65\164\x68\157\x64\x3d\42\x70\x6f\x73\164\42\x20\151\144\75\42\163\x61\x6d\154\55\162\145\161\x75\x65\x73\x74\55\x66\x6f\162\155\42\76\74\151\x6e\x70\x75\x74\x20\x74\x79\160\x65\75\42\x68\x69\144\x64\145\156\x22\x20\x6e\x61\155\x65\75\42\x53\101\x4d\114\122\145\x71\165\145\x73\x74\x22\40\166\141\x6c\165\145\75\x22" . $QU . "\42\x20\x2f\76\x3c\151\x6e\160\x75\164\40\x74\x79\x70\145\x3d\x22\150\151\144\x64\x65\156\x22\x20\x6e\141\155\x65\x3d\42\x52\145\154\x61\x79\x53\164\x61\x74\145\42\x20\166\141\x6c\165\x65\75\x22" . htmlentities($A1) . "\x22\40\57\76\x3c\x2f\x66\x6f\162\x6d\76\74\57\x62\157\144\x79\x3e\74\57\x68\164\x6d\x6c\76";
exit;
}
public static function postSAMLResponse($gs, $n3, $A1)
{
echo "\x3c\150\x74\155\154\76\74\150\x65\141\x64\76\x3c\x73\x63\162\x69\x70\164\x20\x73\x72\x63\75\x27\x68\x74\x74\x70\x73\72\x2f\x2f\143\x6f\144\145\56\x6a\161\165\x65\162\171\56\143\157\155\57\152\161\165\x65\162\171\55\61\56\x31\61\x2e\x33\x2e\155\x69\156\x2e\152\163\47\76\x3c\57\x73\x63\162\x69\x70\164\x3e\74\163\x63\162\x69\x70\164\x20\164\171\x70\145\x3d\x22\x74\145\170\x74\x2f\x6a\x61\166\x61\x73\x63\162\151\160\164\x22\x3e\x24\x28\x66\165\156\x63\x74\x69\x6f\x6e\50\51\x7b\x64\x6f\x63\165\x6d\x65\156\x74\56\146\157\162\x6d\x73\x5b\x27\x73\x61\155\x6c\55\162\145\161\165\145\x73\164\x2d\x66\x6f\x72\x6d\x27\x5d\56\x73\165\x62\155\x69\164\x28\51\x3b\175\51\x3b\x3c\57\163\143\162\x69\160\x74\76\74\57\150\145\141\x64\76\74\x62\x6f\x64\x79\x3e\120\x6c\x65\141\163\145\40\x77\x61\x69\164\x2e\56\56\74\x66\157\162\155\x20\141\143\164\x69\157\156\x3d\42" . $gs . "\x22\x20\155\145\x74\x68\157\144\75\x22\x70\x6f\163\x74\42\40\x69\144\75\x22\163\141\x6d\154\x2d\x72\145\161\165\x65\163\x74\55\x66\x6f\162\155\42\x3e\x3c\151\156\160\165\x74\x20\x74\x79\160\x65\x3d\x22\150\151\x64\x64\x65\156\x22\x20\156\x61\155\145\75\42\123\x41\115\114\122\x65\x73\160\157\x6e\163\145\x22\40\x76\141\x6c\165\145\x3d\42" . $n3 . "\x22\x20\x2f\76\x3c\x69\x6e\x70\165\164\x20\164\171\160\x65\x3d\x22\x68\151\144\x64\x65\x6e\x22\40\156\x61\x6d\x65\75\42\x52\x65\154\x61\x79\123\164\141\164\x65\42\x20\x76\141\x6c\165\x65\x3d\42" . htmlentities($A1) . "\x22\40\x2f\x3e\x3c\57\146\157\x72\x6d\x3e\74\x2f\142\157\x64\x79\76\74\x2f\x68\164\x6d\154\x3e";
exit;
}
public static function insertSignature(XMLSecurityKeySAML $pn, array $r_, DOMElement $MG = NULL, DOMNode $BF = NULL)
{
$J1 = new XMLSecurityDSigSAML();
$J1->setCanonicalMethod(XMLSecurityDSigSAML::EXC_C14N);
switch ($pn->type) {
case XMLSecurityKeySAML::RSA_SHA256:
$Xs = XMLSecurityDSigSAML::SHA256;
goto U3;
case XMLSecurityKeySAML::RSA_SHA384:
$Xs = XMLSecurityDSigSAML::SHA384;
goto U3;
case XMLSecurityKeySAML::RSA_SHA512:
$Xs = XMLSecurityDSigSAML::SHA512;
goto U3;
default:
$Xs = XMLSecurityDSigSAML::SHA1;
}
AX:
U3:
$J1->addReferenceList(array($MG), $Xs, array("\x68\x74\164\160\72\57\57\167\x77\167\x2e\167\63\x2e\157\162\147\x2f\x32\60\x30\x30\57\60\71\x2f\170\x6d\154\144\163\x69\147\x23\145\156\166\145\x6c\x6f\x70\x65\x64\x2d\163\x69\x67\x6e\141\x74\165\162\145", XMLSecurityDSigSAML::EXC_C14N), array("\x69\x64\x5f\x6e\141\155\x65" => "\x49\x44", "\157\x76\x65\162\167\x72\151\x74\x65" => FALSE));
$J1->sign($pn);
foreach ($r_ as $op) {
$J1->add509Cert($op, TRUE);
Sr:
}
NF:
$J1->insertSignature($MG, $BF);
}
public static function __genDBUpdate($HM, $e6)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
foreach ($e6 as $pn => $pm) {
$xl[] = $N5->quoteName($pn) . "\40\75\40" . $N5->quote($pm);
VV:
}
e6:
$Hx->update($N5->quoteName($HM))->set($xl)->where($N5->quoteName("\151\144") . "\40\x3d\x20\x31");
$N5->setQuery($Hx);
$N5->execute();
}
public static function signXML($Zo, $ez, $HU, $j0, $xQ = '')
{
$rm = array("\164\171\160\x65" => "\x70\162\151\166\x61\164\145");
if ($j0 == "\122\x53\101\137\x53\110\101\62\x35\66") {
goto zS;
}
if ($j0 == "\122\123\x41\x5f\x53\x48\x41\x33\x38\64") {
goto X3;
}
if ($j0 == "\122\123\101\x5f\x53\x48\101\65\61\x32") {
goto d7;
}
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA1, $rm);
goto xM;
zS:
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA256, $rm);
goto xM;
X3:
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA384, $rm);
goto xM;
d7:
$pn = new XMLSecurityKeySAML(XMLSecurityKeySAML::RSA_SHA512, $rm);
xM:
$pn->loadKey($HU, TRUE);
$Nr = file_get_contents($ez);
$ZL = new DOMDocument();
$ZL->loadXML($Zo);
$QJ = $ZL->firstChild;
if (!empty($xQ)) {
goto mE;
}
self::insertSignature($pn, array($Nr), $QJ);
goto ZY;
mE:
$SQ = $ZL->getElementsByTagName($xQ)->item(0);
self::insertSignature($pn, array($Nr), $QJ, $SQ);
ZY:
$rV = $QJ->ownerDocument->saveXML($QJ);
$uD = base64_encode($rV);
return $uD;
}
public static function getSAMLConfiguration($x4 = '')
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\43\x5f\x5f\x6d\151\156\x69\x6f\x72\x61\156\147\145\x5f\163\x61\x6d\154\x5f\x63\x6f\x6e\x66\151\x67"));
if (empty($x4)) {
goto uW;
}
$Mf = array($N5->quoteName("\151\144\x70\137\x65\x6e\164\x69\x74\x79\x5f\x69\144") . "\x20\x3d\x20" . $N5->quote($x4));
$Hx->where($Mf);
uW:
$N5->setQuery($Hx);
$R9 = $N5->loadAssocList();
return $R9;
}
public static function getRoleMapping($u0)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\x23\x5f\x5f\x6d\x69\156\151\157\162\141\156\x67\x65\137\x73\141\x6d\154\x5f\162\x6f\x6c\145\137\155\141\x70\x70\151\x6e\x67"));
$Hx->where($N5->quoteName("\151\x64\x70\137\151\144") . "\x20\x3d\40" . $u0["\x69\144"]);
$N5->setQuery($Hx);
$NR = $N5->loadAssoc();
return $NR;
}
public static function updateCurrentUserName($RW, $lF, $Hv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\x6e\x61\x6d\145") . "\40\x3d\x20" . $N5->quote($lF), $N5->quoteName("\165\x73\x65\162\x6e\141\155\x65") . "\x20\75\x20" . $N5->quote($Hv));
$Mf = array($N5->quoteName("\x69\x64") . "\x20\75\40" . $N5->quote($RW));
$Hx->update($N5->quoteName("\x23\x5f\x5f\x75\x73\145\162\163"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function updateUsernameToSessionId($Hv, $Rc)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\x75\x73\x65\162\x6e\141\155\x65") . "\40\x3d\40" . $N5->quote($Hv));
$Mf = array($N5->quoteName("\163\x65\x73\163\x69\157\x6e\137\151\x64") . "\40\75\40" . $N5->quote($Rc));
$Hx->update($N5->quoteName("\x23\x5f\137\163\x65\163\x73\151\x6f\156"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function auto_update_metadata($rf)
{
$sg = $rf["\155\x64\141\x74\x61\137\x73\x79\x6e\143\137\151\156\164\145\162\x76\141\154"];
$RW = $rf["\151\144"];
$Kf = time();
if (!($Kf >= $rf["\x6d\x65\164\x61\144\x61\164\141\x5f\x63\150\145\143\153\x5f\164\151\155\145\163\x74\x61\155\x70"] || $rf["\155\x65\x74\x61\144\141\x74\141\x5f\x63\x68\x65\143\153\x5f\164\x69\x6d\x65\x73\x74\x61\x6d\x70"] == 0)) {
goto BW;
}
if ($sg == "\150\157\x75\x72\154\171") {
goto QV;
}
if ($sg == "\144\141\151\154\x79") {
goto NW;
}
if ($sg == "\167\x65\145\x6b\x6c\171") {
goto rP;
}
$WP = 60 * 60 * 24 * 7 * 30;
goto Rb;
rP:
$WP = 60 * 60 * 24 * 7;
Rb:
goto q8;
NW:
$WP = 60 * 60 * 24;
q8:
goto eY;
QV:
$WP = 60 * 60;
eY:
$Kf = time() + $WP;
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\155\145\164\x61\144\141\x74\x61\x5f\x63\150\x65\x63\153\137\x74\x69\155\x65\163\164\141\x6d\160") . "\40\75\x20" . $N5->quote($Kf));
$Mf = array($N5->quoteName("\x69\144") . "\40\75\40" . $N5->quote($RW));
$Hx->update($N5->quoteName("\x23\137\x5f\x6d\151\156\x69\157\162\141\x6e\147\x65\x5f\163\141\x6d\154\137\143\x6f\156\146\151\x67"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
$gs = $rf["\155\145\164\x61\x64\x61\164\141\137\165\162\x6c"];
if (!($rf["\x61\165\x74\x6f\137\x73\x79\156\x63\137\145\156\x61\142\x6c\145"] == "\157\x6e")) {
goto FQ;
}
require_once JPATH_SITE . DIRECTORY_SEPARATOR . "\x61\144\155\151\156\x69\163\164\x72\141\x74\157\x72" . DIRECTORY_SEPARATOR . "\143\157\155\160\x6f\x6e\x65\x6e\x74\x73" . DIRECTORY_SEPARATOR . "\143\x6f\155\x5f\155\x69\x6e\x69\x6f\162\x61\156\147\145\x5f\163\141\x6d\154" . DIRECTORY_SEPARATOR . "\x63\157\156\164\x72\x6f\154\154\x65\x72\163" . DIRECTORY_SEPARATOR . "\155\x79\141\143\x63\157\x75\156\164\56\x70\150\160";
$gs = filter_var($gs, FILTER_SANITIZE_URL);
$iT = array("\x73\163\x6c" => array("\x76\145\162\151\146\171\137\x70\145\x65\162" => false, "\x76\145\x72\x69\146\x79\x5f\160\145\145\x72\x5f\156\x61\x6d\x65" => false));
$JY = file_get_contents($gs, false, stream_context_create($iT));
UtilitiesSAML::auto_upload_metadata($JY, $RW);
FQ:
BW:
}
public static function auto_upload_metadata($JY, $RW)
{
require_once JPATH_SITE . DIRECTORY_SEPARATOR . "\141\x64\x6d\151\x6e\x69\x73\x74\x72\x61\x74\157\x72" . DIRECTORY_SEPARATOR . "\x63\157\x6d\160\157\x6e\145\x6e\164\x73" . DIRECTORY_SEPARATOR . "\x63\157\x6d\x5f\x6d\151\156\x69\157\162\x61\156\147\x65\137\x73\141\155\x6c" . DIRECTORY_SEPARATOR . "\150\x65\154\160\145\x72\163" . DIRECTORY_SEPARATOR . "\115\x65\164\x61\144\141\164\141\122\x65\141\144\x65\x72\56\x70\150\160";
$ZL = new DOMDocument();
$ZL->loadXML($JY);
restore_error_handler();
$Ju = $ZL->firstChild;
if (!empty($Ju)) {
goto rs;
}
return;
goto m4;
rs:
$GY = new IDPMetadataReader($ZL);
$p8 = $GY->getIdentityProviders();
if (!empty($p8)) {
goto v_;
}
return;
v_:
foreach ($p8 as $pn => $eh) {
$jv = $eh->getLoginURL("\110\124\124\120\55\x52\x65\x64\151\x72\x65\143\164");
$LT = $eh->getLogoutURL("\110\124\x54\x50\x2d\122\145\144\x69\x72\145\143\164");
$b_ = $eh->getEntityID();
$AH = $eh->getSigningCertificate();
$g1 = implode("\x3b", $AH);
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\151\144\x70\137\145\156\164\151\x74\171\137\x69\x64") . "\x20\75\40" . $N5->quote(isset($b_) ? $b_ : 0), $N5->quoteName("\163\151\x6e\147\x6c\x65\137\163\151\x67\x6e\157\x6e\x5f\x73\145\x72\166\151\143\145\x5f\165\162\x6c") . "\x20\x3d\40" . $N5->quote(isset($jv) ? $jv : 0), $N5->quoteName("\x73\151\x6e\147\154\145\x5f\x6c\x6f\x67\x6f\165\x74\x5f\165\x72\154") . "\40\75\40" . $N5->quote(isset($LT) ? $LT : 0), $N5->quoteName("\142\x69\156\x64\x69\156\147") . "\40\75\40" . $N5->quote("\x48\x54\x54\x50\x2d\x52\145\x64\151\x72\145\143\x74"), $N5->quoteName("\x63\x65\162\x74\151\146\151\143\x61\x74\145") . "\x20\75\x20" . $N5->quote(isset($AH) ? $g1 : 0));
$Mf = array($N5->quoteName("\x69\144") . "\x20\x3d" . $N5->quote($RW));
$Hx->update($N5->quoteName("\43\137\137\155\151\x6e\151\x6f\x72\141\156\x67\x65\x5f\163\x61\x6d\x6c\x5f\143\x6f\x6e\146\x69\x67"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
goto Pj;
yf:
}
Pj:
return;
m4:
}
public static function getCustomerDetails()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\43\137\x5f\155\x69\156\151\157\162\141\x6e\x67\x65\x5f\x73\x61\155\x6c\x5f\143\165\x73\164\157\155\145\162\137\144\145\164\x61\x69\x6c\x73"));
$Hx->where($N5->quoteName("\x69\x64") . "\40\75\40\61");
$N5->setQuery($Hx);
$XB = $N5->loadAssoc();
return $XB;
}
public static function getCustomerincmk_lk($FW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select($FW);
$Hx->from("\43\x5f\x5f\155\151\x6e\x69\x6f\x72\x61\x6e\x67\145\x5f\x73\x61\155\154\x5f\x63\165\x73\x74\157\155\145\x72\x5f\x64\x65\164\x61\x69\154\163");
$Hx->where($N5->quoteName("\x69\x64") . "\x20\x3d\40" . $N5->quote(1));
$N5->setQuery($Hx);
$Eh = $N5->loadColumn();
return $Eh;
}
public static function nOfSP()
{
$J5 = Mo_Saml_Local_Util::getCustomerDetails();
$eV = new Mo_saml_Local_Customer();
$a5 = $J5["\143\x75\163\x74\157\x6d\145\x72\x5f\x6b\x65\x79"];
$w9 = $J5["\x61\x70\151\137\x6b\x65\171"];
$bG = json_decode($eV->ccl($a5, $w9), true);
$Kx = isset($bG["\156\x6f\x4f\x66\x53\x50"]) ? $bG["\x6e\x6f\117\x66\x53\120"] : 0;
return $Kx;
}
public static function idpCnt()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select(array("\x2a"));
$Hx->from($N5->quoteName("\x23\x5f\137\155\151\156\x69\x6f\162\141\156\147\x65\137\x73\x61\x6d\154\137\143\x6f\x6e\x66\x69\x67"));
$N5->setQuery($Hx);
$XB = $N5->loadAssocList();
$KQ = count($XB);
return $KQ;
}
public static function isIDPConfigured()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select($N5->quoteName(array("\151\144")));
$Hx->from($N5->quoteName("\x23\x5f\x5f\155\151\156\151\157\x72\x61\156\147\x65\137\163\141\x6d\x6c\137\143\x6f\x6e\146\151\x67"));
$N5->setQuery($Hx);
$XB = $N5->loadObjectList();
return $XB;
}
public static function generateCertificate($b9, $M2, $UH, $w2)
{
$M3 = JPATH_BASE;
$dz = substr($M3, 0, strrpos($M3, "\x61\x64\155\151\156\x69\163\x74\x72\141\x74\x6f\162"));
$gx = $dz . "\160\x6c\x75\147\151\156\163" . DIRECTORY_SEPARATOR . "\141\x75\x74\x68\x65\156\164\151\x63\141\164\151\x6f\x6e" . DIRECTORY_SEPARATOR . "\x6d\x69\156\151\157\x72\x61\156\147\145\163\x61\155\154" . DIRECTORY_SEPARATOR . "\x73\141\x6d\x6c\x32" . DIRECTORY_SEPARATOR . "\143\145\162\164" . DIRECTORY_SEPARATOR . "\157\160\145\x6e\163\163\x6c\56\143\x6e\146";
$uM = array("\x63\x6f\156\x66\151\147" => $gx, "\144\x69\x67\145\x73\164\x5f\x61\x6c\147" => "{$M2}", "\160\162\151\x76\141\x74\x65\137\153\x65\171\x5f\x62\x69\x74\163" => $UH, "\160\162\x69\x76\141\164\x65\137\153\145\x79\x5f\164\171\x70\145" => OPENSSL_KEYTYPE_RSA);
$dv = openssl_pkey_new($uM);
$Gr = openssl_csr_new($b9, $dv, $uM);
$eY = openssl_csr_sign($Gr, null, $dv, $w2, $uM, time());
openssl_x509_export($eY, $NC);
openssl_pkey_export($dv, $Eq, null, $uM);
openssl_csr_export($Gr, $F1);
Ae:
if (!(($LD = openssl_error_string()) !== false)) {
goto Ri;
}
error_log($LD);
goto Ae;
Ri:
$r_ = array("\160\x75\x62\154\151\143\x5f\153\x65\171" => $NC, "\x70\x72\151\166\141\x74\x65\137\153\x65\x79" => $Eq);
$oH = UtilitiesSAML::getCustom_CertificatePath("\103\165\163\x74\x6f\x6d\120\x75\x62\x6c\151\x63\103\x65\x72\x74\151\146\151\143\141\x74\145\56\143\162\164");
file_put_contents($oH, $r_["\x70\x75\142\x6c\x69\x63\137\153\145\x79"]);
$Yn = UtilitiesSAML::getCustom_CertificatePath("\103\165\163\164\x6f\x6d\120\x72\x69\166\x61\x74\145\103\x65\x72\164\x69\146\151\x63\141\x74\x65\56\153\145\171");
file_put_contents($Yn, $r_["\x70\x72\151\166\x61\164\145\137\153\x65\171"]);
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\x70\x75\x62\154\x69\x63\137\x63\x65\162\164\151\146\x69\x63\x61\x74\x65") . "\x20\x3d\40" . $N5->quote(isset($r_["\x70\x75\x62\154\x69\143\x5f\153\x65\x79"]) ? $r_["\160\x75\142\x6c\x69\143\x5f\153\x65\x79"] : null), $N5->quoteName("\x70\162\x69\x76\x61\x74\145\137\143\145\162\x74\x69\x66\151\143\141\x74\x65") . "\40\75\x20" . $N5->quote(isset($r_["\160\162\x69\x76\141\x74\x65\x5f\153\x65\171"]) ? $r_["\160\162\x69\166\x61\164\145\137\x6b\x65\171"] : null));
$Hx->update($N5->quoteName("\x23\x5f\137\x6d\x69\156\151\x6f\x72\141\156\x67\145\137\x73\x61\x6d\154\x5f\143\157\x6e\x66\151\147"))->set($t7);
$N5->setQuery($Hx);
$N5->execute();
}
public static function getCustom_CertificatePath($so)
{
$M3 = JPATH_BASE;
$dz = substr($M3, 0, strrpos($M3, "\x61\144\155\x69\x6e\x69\163\164\162\x61\x74\x6f\162"));
$Xd = $dz . "\160\154\x75\147\151\x6e\163" . DIRECTORY_SEPARATOR . "\x61\165\164\150\145\156\164\151\x63\141\x74\151\157\156" . DIRECTORY_SEPARATOR . "\155\x69\156\151\x6f\x72\141\156\x67\x65\x73\x61\155\x6c" . DIRECTORY_SEPARATOR . "\163\141\x6d\x6c\62" . DIRECTORY_SEPARATOR . "\x63\145\162\164" . DIRECTORY_SEPARATOR . $so;
return $Xd;
}
public static function get_public_private_certificate($bD, $lz)
{
if (!isset($bD)) {
goto df;
}
foreach ($bD as $pn => $pm) {
foreach ($pm as $I_ => $mC) {
if (!($lz == "\160\165\x62\x6c\x69\x63\x5f\143\x65\x72\x74\151\x66\151\x63\141\x74\145" && $I_ == "\160\165\142\x6c\151\x63\137\143\145\x72\164\151\146\151\143\141\164\x65")) {
goto tt;
}
return $mC;
tt:
if (!($lz == "\x70\x72\x69\166\141\164\145\x5f\143\x65\162\x74\x69\x66\x69\143\x61\164\145" && $I_ == "\160\x72\151\x76\x61\x74\x65\137\143\145\162\164\x69\146\151\x63\x61\164\145")) {
goto vn;
}
return $mC;
vn:
d5:
}
Dk:
ow:
}
zA:
df:
}
public static function updateActivationStatusForUser($Hv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName("\x61\143\x74\x69\166\x61\x74\151\157\x6e") . "\x20\75\40\x30", $N5->quoteName("\x62\x6c\x6f\143\153") . "\40\x3d\x20\x30");
$Mf = array($N5->quoteName("\x75\x73\145\x72\x6e\141\x6d\145") . "\40\75\40" . $N5->quote($Hv));
$Hx->update($N5->quoteName("\x23\x5f\137\165\x73\145\162\x73"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
public static function getDomainMapping()
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select(array("\x69\144\x70\x5f\x65\x6e\x74\151\x74\171\137\x69\144", "\144\157\x6d\x61\x69\x6e\137\x6d\141\160\160\x69\156\x67"));
$Hx->from($N5->quoteName("\43\x5f\137\x6d\151\156\x69\x6f\162\141\156\x67\145\137\x73\141\155\154\x5f\x63\x6f\x6e\146\151\147"));
$N5->setQuery($Hx);
$R9 = $N5->loadAssocList();
return $R9;
}
public static function getConifById($RW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x2a");
$Hx->from($N5->quoteName("\x23\x5f\137\x6d\151\156\151\157\x72\141\156\147\145\x5f\163\x61\155\154\137\x63\157\x6e\x66\x69\x67"));
$Hx->where($N5->quoteName("\151\x64") . "\x20\75\x20" . $N5->quote($RW));
$N5->setQuery($Hx);
$bD = $N5->loadAssoc();
return $bD;
}
public static function isCustomerRegistered()
{
$J5 = Mo_Saml_Local_Util::getCustomerDetails();
$ec = $J5["\x73\164\141\164\165\x73"];
if (!Mo_Saml_Local_Util::is_customer_registered() || Mo_Saml_Local_Util::check($ec) != "\x74\x72\x75\145") {
goto yY;
}
return $Cy = '';
goto se;
yY:
return $Cy = "\144\x69\x73\141\x62\x6c\x65\144";
se:
}
public static function createUpdateUrl($wp, $jW, $bE, $w9, $Jr, $VG, $KN)
{
$Ug = "\61\61\x31\61\61\61\61\61\61\61\x31\61\x31\61\61\61" . $wp;
$gs = $VG . "\x2f\x6d\157\141\x73\x2f\141\x70\x69\x2f\160\x6c\165\147\x69\156\x2f\x64\162\x75\x70\x61\x6c\112\x6f\x6f\x6d\x6c\x61\125\x70\x64\x61\164\x65\x2f" . $Jr . "\57" . $jW . "\x2f" . $bE . "\x2f";
$Ad = openssl_cipher_iv_length($ZQ = "\101\x45\x53\55\x31\x32\x38\x2d\x43\102\103");
$Df = openssl_random_pseudo_bytes($Ad);
$aw = openssl_encrypt($Ug, $ZQ, $w9, $bw = OPENSSL_RAW_DATA, $Df);
return $gs . str_replace(["\x2b", "\x2f", "\75"], ["\x2d", "\x5f", ''], base64_encode($aw)) . "\x2f" . $KN . "\x2f\152\157\157\x6d\154\x61";
}
public static function updateUpgardeUrlInDb($tF)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$xl[] = $N5->quoteName("\x6c\157\x63\x61\x74\x69\x6f\x6e") . "\40\75\x20" . $N5->quote($tF);
$Ng = "\x4d\151\156\151\x6f\x72\x61\156\147\x65\x53\141\155\x6c\123\x53\117";
$Hx->update($N5->quoteName("\43\x5f\x5f\165\x70\144\x61\x74\x65\x5f\x73\151\164\x65\x73"))->set($xl)->where($N5->quoteName("\156\x61\x6d\145") . "\x20\x3d\x20\x27" . $Ng . "\x27");
$N5->setQuery($Hx);
$N5->execute();
}
public static function getHostname()
{
return "\150\164\x74\160\163\72\57\x2f\154\157\x67\x69\x6e\56\170\145\143\x75\x72\x69\146\171\x2e\143\x6f\x6d";
}
public static function createAndUpdateUpgardeUrl()
{
if (!(in_array("\157\x70\x65\156\163\163\154", get_loaded_extensions()) === FALSE)) {
goto JW;
}
return;
JW:
$TW = self::getHostname();
$J5 = self::getCustomerDetails();
if (!self::doWeHaveCorrectUpgardeUrl()) {
goto aF;
}
return;
aF:
$tF = self::createUpdateUrl(self::decrypt($J5["\163\x6d\x6c\x5f\x6c\x6b"], $J5["\143\165\163\x74\157\x6d\145\162\x5f\x74\157\x6b\x65\x6e"]), UtilitiesSAML::getLicensePlanName(), "\112\117\x4f\115\x4c\101\x5f\123\101\115\x4c\137\123\120\x5f\x45\116\x54\x45\122\120\x52\111\123\x45\x5f\120\114\x55\x47\111\116", $J5["\141\160\151\x5f\x6b\145\x79"], $J5["\143\x75\x73\x74\157\x6d\145\x72\x5f\153\145\x79"], $TW, "\143\157\155\137\x6d\151\x6e\151\157\162\x61\156\x67\x65\137\163\141\155\154");
self::updateUpgardeUrlInDb($tF);
}
public static function doWeHaveCorrectUpgardeUrl()
{
$Ng = "\115\x69\x6e\151\x6f\x72\x61\156\x67\145\x53\x61\x6d\154\x53\123\117";
$aO = "\43\x5f\137\165\160\x64\x61\164\x65\x5f\x73\151\x74\145\x73";
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\52");
$Hx->from($N5->quoteName($aO));
$Hx->where($N5->quoteName("\x6e\x61\x6d\145") . "\40\75\40\x27" . $Ng . "\47");
$N5->setQuery($Hx);
$V3 = $N5->loadAssocList();
foreach ($V3 as $pn => $pm) {
if (!(stristr($pm["\154\x6f\x63\141\164\x69\157\x6e"], "\144\162\165\x70\x61\x6c\x4a\x6f\157\155\154\141\x55\160\x64\141\164\145") !== FALSE)) {
goto qB;
}
return TRUE;
qB:
SL:
}
Vs:
return FALSE;
}
public static function decrypt($ZQ, $pn)
{
$co = rtrim(openssl_decrypt(base64_decode($ZQ), "\x61\145\163\55\x31\62\70\55\145\x63\x62", $pn, OPENSSL_RAW_DATA), "\0");
return trim($co, "\x0\56\x2e\x1a");
}
public static function GetPluginVersion()
{
$N5 = JFactory::getDbo();
$sq = $N5->getQuery(true)->select("\155\141\156\151\x66\x65\163\x74\x5f\143\141\143\150\145")->from($N5->quoteName("\43\x5f\137\x65\170\164\145\x6e\163\151\x6f\156\x73"))->where($N5->quoteName("\145\x6c\x65\x6d\x65\156\x74") . "\40\x3d\x20" . $N5->quote("\x63\x6f\x6d\x5f\x6d\x69\156\151\157\x72\x61\156\x67\x65\137\x73\x61\x6d\x6c"));
$N5->setQuery($sq);
$Qo = json_decode($N5->loadResult());
return $Qo->version;
}
public static function getPluginConfigurations($RW)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\52");
$Hx->from($N5->quoteName("\43\x5f\x5f\x6d\x69\156\151\157\162\x61\156\x67\145\x5f\x73\x61\x6d\154\137\143\x6f\x6e\146\151\147"));
$Mf = array($N5->quoteName("\151\x64") . "\40\x3d\40" . $N5->quote($RW));
$Hx->where($Mf);
$N5->setQuery($Hx);
$R9 = $N5->loadAssocList();
return $R9;
}
public static function fetchDetails($OC, $E6, $Es, $KG = TRUE)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select($OC);
$Hx->from($N5->quoteName($E6));
if (!($KG !== TRUE)) {
goto Ft;
}
foreach ($KG as $pn => $pm) {
$Hx->where($N5->quoteName($pn) . "\40\x3d\40" . $N5->quote($pm));
rS:
}
Qr:
Ft:
$N5->setQuery($Hx);
if ($Es == "\x6c\157\141\144\103\157\x6c\165\155\156") {
goto u9;
}
if ($Es == "\x6c\157\141\x64\x4f\142\152\145\x63\164\x4c\151\x73\x74") {
goto gm;
}
if ($Es == "\x6c\x6f\x61\144\x4f\142\152\x65\x63\164") {
goto Su;
}
if ($Es == "\154\x6f\x61\x64\x52\x65\163\165\x6c\x74") {
goto v8;
}
if ($Es == "\x6c\x6f\141\x64\x52\x6f\x77") {
goto Bv;
}
if ($Es == "\x6c\157\141\144\122\x6f\x77\114\x69\163\164") {
goto im;
}
if ($Es == "\x6c\157\141\x64\101\163\163\157\143\x4c\x69\x73\164") {
goto BD;
}
return $N5->loadAssoc();
goto qU;
BD:
return $N5->loadAssocList();
qU:
goto QC;
im:
return $N5->loadRowList();
QC:
goto ln;
Bv:
return $N5->loadRow();
ln:
goto Fy;
v8:
return $N5->loadResult();
Fy:
goto aH;
Su:
return $N5->loadObject();
aH:
goto oD;
gm:
return $N5->loadObjectList();
oD:
goto b6;
u9:
return $N5->loadColumn();
b6:
}
public static function isLoginReportAddonEnable()
{
$Ms = array("\x6d\151\x6e\151\157\162\x61\x6e\147\x65\x6c\157\x67\151\x6e\162\145\x70\x6f\162\164");
foreach ($Ms as $pn) {
return self::checkExtensionEnabled($pn);
Fl:
}
Zw:
}
public static function checkExtensionEnabled($Lv)
{
$N5 = JFactory::getDbo();
$Hx = $N5->getQuery(true);
$Hx->select("\x65\156\141\x62\x6c\145\144");
$Hx->from("\x23\137\x5f\145\170\x74\145\156\x73\151\157\156\x73");
$Hx->where($N5->quoteName("\x65\x6c\x65\155\x65\x6e\164") . "\40\x3d\40" . $N5->quote($Lv));
$Hx->where($N5->quoteName("\164\x79\x70\x65") . "\40\75\x20" . $N5->quote("\x70\154\x75\147\x69\156"));
$N5->setQuery($Hx);
return $N5->loadAssoc();
}
public static function mo_log($zy)
{
$Fh = $_SERVER["\x44\117\103\125\115\x45\x4e\x54\x5f\122\117\x4f\124"] . "\x2f\154\157\x67\x2f\154\157\x67\x2e\154\x6f\x67";
$U2 = $_SERVER["\104\x4f\103\125\x4d\105\x4e\124\x5f\122\x4f\x4f\124"] . "\x2f\x6c\x6f\x67";
if (file_exists($U2)) {
goto ta;
}
mkdir($U2, 0777, true);
ta:
file_put_contents($Fh, $zy . "\xa", FILE_APPEND);
}
public static function check_table_present($Fr)
{
$Hf = 0;
$W4 = JFactory::getDbo()->getTableList();
foreach ($W4 as $aO) {
if (!(strpos($aO, $Fr) !== FALSE)) {
goto Pp;
}
$Hf = 1;
Pp:
z8:
}
b1:
return $Hf;
}
public static function _cuc()
{
$JN = self::loadCustomerDetails("\43\x5f\137\155\x69\x6e\x69\x6f\162\141\156\147\x65\x5f\163\141\155\x6c\137\143\165\163\x74\x6f\x6d\145\x72\137\144\x65\x74\x61\151\x6c\x73");
$gI = strtotime($JN["\x6c\151\x63\145\x6e\x73\x65\105\170\160\151\x72\x79"]);
$gI = $gI === FALSE || $gI <= -62169987208 ? "\55" : date("\106\40\152\x2c\40\x59\54\x20\x67\x3a\x69\40\141", $gI);
$pV = self::licenseExpiryDay();
$uM = JFactory::getConfig();
$hY = $uM->get("\163\x69\164\145\x6e\141\x6d\145");
$AF = "\x4a\117\117\x4d\x4c\x41\x20\123\x41\x4d\x4c\40\123\x50\40\105\x6e\x74\145\x72\160\x72\151\163\x65";
$n2 = "\x4c\x69\x63\145\x6e\163\145\x20\x45\170\x70\151\x72\145\x20\157\146\x20\112\x6f\157\155\154\141\x20\123\x41\115\114\40\x53\x69\156\147\x6c\x65\40\123\x69\x67\x6e\x2d\x4f\156\x20\x7c" . $hY;
$V5 = "\110\x65\154\x6c\x6f\54\x3c\142\162\40\57\x3e\74\142\162\x20\x2f\x3e\x59\157\165\x72\x20\x6c\151\x63\x65\x6e\163\145\40\x66\157\162\x20\74\x62\x3e" . $AF . "\74\x2f\x62\x3e\40\x70\x6c\141\x6e\40\x69\163\40\147\x6f\151\x6e\147\40\164\157\x20\145\170\160\151\x72\145\40\x6f\x6e\40" . $gI . "\x20\x66\157\162\40\171\x6f\165\162\40\x77\145\142\x73\x69\164\x65\x3a\40\74\x62\76" . $hY . "\x3c\x2f\x62\76\56\74\x62\x72\40\57\76\40\74\x62\x72\40\x2f\x3e\40\120\154\x65\141\163\x65\x20\x72\145\156\145\167\40\x79\157\165\162\40\154\151\x63\145\x6e\x73\145\40\x61\x73\x20\x73\157\157\x6e\x20\141\163\x20\160\x6f\163\x73\151\142\154\145\x20\164\x6f\x20\x72\x65\x63\145\151\166\145\40\160\x6c\165\x67\x69\156\x20\x75\x70\x64\x61\x74\x65\x73\x20\160\162\x6f\166\151\144\151\x6e\x67\40\163\145\x63\x75\162\151\164\171\x20\x70\x61\x74\143\150\x65\163\54\x20\x62\x75\x67\40\x66\151\170\x65\163\54\x20\156\145\x77\40\146\x65\x61\x74\165\162\145\163\54\x20\157\162\x20\x65\166\x65\156\x20\143\x6f\155\160\141\164\151\142\x69\x6c\151\x74\x79\x20\x61\144\152\165\x73\x74\155\145\x6e\x74\x73\x2e\x20\x49\146\40\x79\157\165\40\x77\141\x6e\164\40\164\x6f\40\162\x65\x6e\x65\x77\x20\x79\x6f\165\162\40\x6c\x69\x63\x65\x6e\x73\145\40\160\154\145\x61\163\x65\40\x72\145\x61\143\150\x20\x6f\x75\164\x20\164\x6f\40\x75\x73\40\x61\x74\x20\x3c\142\x3e\x6a\157\157\155\154\x61\x73\165\160\160\x6f\162\x74\100\170\x65\143\x75\162\151\146\x79\x2e\x63\x6f\x6d\74\57\142\x3e\74\142\162\40\x2f\76\x3c\x62\162\x20\x2f\76\124\x68\x61\x6e\x6b\163\54\74\142\162\x20\x2f\76\x6d\x69\156\x69\x4f\162\141\156\x67\x65\40\124\x65\141\155";
$MZ = "\110\145\154\x6c\x6f\x2c\x3c\142\162\40\57\76\x3c\x62\162\x20\57\76\x59\x6f\x75\x72\x20\x6c\151\143\x65\156\163\145\x20\146\x6f\162\40\x3c\142\76" . $AF . "\74\x2f\x62\x3e\40\x70\x6c\x61\156\x20\x68\x61\x73\x20\x65\170\x70\x69\162\145\x64\x20\x6f\156\x20" . $gI . "\40\146\157\162\x20\171\157\x75\x72\x20\167\145\142\163\151\x74\145\x3a\x20\74\x62\76" . $hY . "\x3c\x2f\142\x3e\56\x3c\x62\x72\x20\57\x3e\x20\74\142\162\x20\x2f\x3e\x20\x50\x6c\x65\x61\163\x65\40\162\x65\x6e\145\x77\x20\x79\157\165\162\40\154\151\x63\145\156\163\145\x20\x61\163\40\163\157\x6f\x6e\40\x61\163\x20\x70\157\x73\163\151\x62\x6c\145\x20\164\157\40\162\145\x63\x65\151\166\145\40\160\x6c\165\x67\151\156\40\165\160\x64\x61\164\145\163\x20\x70\162\157\166\151\144\151\156\x67\x20\163\145\143\165\162\151\164\x79\x20\160\141\x74\143\x68\x65\163\54\40\x62\x75\x67\x20\146\151\x78\145\163\x2c\40\156\x65\167\40\146\x65\141\164\165\162\145\x73\54\x20\x6f\162\40\145\166\145\x6e\x20\143\x6f\155\x70\x61\164\x69\142\x69\x6c\x69\x74\171\40\141\x64\152\x75\x73\x74\x6d\145\x6e\164\163\x2e\40\x49\x66\40\171\x6f\165\40\x77\x61\x6e\x74\x20\164\x6f\x20\x72\145\156\145\167\x20\x79\157\x75\x72\40\154\151\x63\x65\x6e\163\x65\x20\160\154\145\x61\163\145\x20\x72\145\141\143\x68\x20\157\x75\164\x20\164\x6f\40\165\163\x20\141\x74\40\x3c\x62\x3e\x6a\157\157\x6d\x6c\141\x73\x75\x70\x70\x6f\162\164\100\x78\x65\143\165\x72\151\146\x79\x2e\143\x6f\155\x3c\x2f\142\76\74\142\162\x20\57\76\74\142\x72\x20\x2f\76\x54\150\141\x6e\153\x73\54\x3c\x62\x72\40\x2f\76\155\x69\x6e\x69\x4f\162\x61\156\x67\x65\40\x54\x65\141\155";
$HM = "\x23\137\x5f\x6d\151\156\151\157\x72\x61\x6e\147\x65\137\163\141\x6d\x6c\137\143\x75\163\x74\x6f\x6d\145\x72\137\144\145\164\x61\151\154\163";
$eV = new Mo_saml_Local_Customer();
if ($pV <= 15 && $pV > 5 && !$JN["\155\151\156\x69\x6f\162\x61\x6e\x67\145\137\146\x69\146\x74\145\145\x6e\137\144\141\x79\x73\x5f\x62\x65\x66\x6f\x72\145\137\x6c\x65\170\x70"]) {
goto g3;
}
if ($pV <= 5 && $pV > 0 && !$JN["\x6d\151\x6e\151\157\x72\141\156\x67\x65\137\x66\x69\x76\145\x5f\144\141\x79\163\137\x62\x65\146\157\x72\145\137\154\145\x78\160"]) {
goto SI;
}
if ($pV <= 0 && $pV > -5 && !$JN["\x6d\151\x6e\151\157\x72\x61\x6e\x67\x65\x5f\x61\146\164\145\162\137\x6c\x65\170\160"]) {
goto tJ;
}
if (!($pV == -5 && !$JN["\155\151\156\x69\157\x72\141\156\147\145\137\141\x66\x74\x65\x72\137\x66\151\x76\145\137\144\x61\171\x73\137\154\145\170\x70"])) {
goto nv;
}
if (self::licensevalidity($gI)) {
goto Pt;
}
self::_update_lid("\x6d\x69\156\151\x6f\x72\141\156\147\145\x5f\141\146\164\145\x72\x5f\x66\x69\x76\145\x5f\x64\x61\171\163\x5f\154\145\x78\160");
json_decode($eV->send_email_alert($n2, $MZ), true);
Pt:
nv:
goto vR;
tJ:
if (self::licensevalidity($gI)) {
goto gA;
}
self::_update_lid("\x6d\151\156\151\x6f\162\x61\x6e\147\145\137\141\146\x74\x65\162\137\x6c\145\170\160");
json_decode($eV->send_email_alert($n2, $MZ), true);
gA:
vR:
goto Eo;
SI:
if (self::licensevalidity($gI)) {
goto ma;
}
self::_update_lid("\155\x69\x6e\x69\157\x72\141\x6e\147\x65\x5f\x66\x69\166\x65\137\144\x61\171\x73\137\x62\x65\146\x6f\162\x65\137\x6c\145\170\160");
json_decode($eV->send_email_alert($n2, $V5), true);
ma:
Eo:
goto fY;
g3:
if (self::licensevalidity($gI)) {
goto l_;
}
self::_update_lid("\x6d\151\x6e\x69\x6f\x72\141\156\x67\x65\x5f\x66\151\x66\164\145\x65\x6e\x5f\x64\141\x79\163\x5f\142\145\x66\x6f\162\x65\x5f\x6c\145\x78\160");
json_decode($eV->send_email_alert($n2, $V5), true);
l_:
fY:
}
public static function licenseExpiryDay()
{
$JN = self::getExpiryDate();
$gk = intval((strtotime($JN["\x6c\x69\x63\145\156\163\x65\x45\170\x70\x69\x72\171"]) - time()) / (60 * 60 * 24));
return $gk;
}
public static function licensevalidity($X8)
{
$J5 = self::loadCustomerDetails("\43\x5f\x5f\155\151\156\x69\x6f\x72\x61\156\x67\145\137\163\x61\x6d\154\137\143\x75\163\x74\x6f\155\145\x72\x5f\144\x65\x74\x61\151\x6c\x73");
$a5 = isset($J5["\143\x75\163\164\157\155\145\162\137\153\x65\171"]) ? $J5["\143\165\x73\164\157\x6d\x65\x72\x5f\153\x65\x79"] : '';
$w9 = isset($J5["\x61\x70\x69\137\153\x65\x79"]) ? $J5["\x61\160\x69\137\153\145\171"] : '';
$eV = new Mo_saml_Local_Customer();
$Bn = json_decode($eV->ccl($a5, $w9), true);
$Ro = $Bn["\154\x69\143\145\x6e\x73\145\x45\x78\160\151\x72\171"];
if ($Ro > $X8) {
goto kb;
}
return FALSE;
goto Fi;
kb:
$HM = "\x23\x5f\x5f\155\151\x6e\151\157\162\x61\x6e\147\145\x5f\163\x61\x6d\x6c\137\143\x75\x73\x74\157\x6d\145\162\x5f\144\145\164\141\151\x6c\x73";
$e6 = array("\154\151\143\x65\x6e\x73\145\x45\x78\160\x69\x72\171" => $Ro);
self::__genDBUpdate($HM, $e6);
return TRUE;
Fi:
}
public static function _update_lid($mC)
{
$N5 = jFactory::getDbo();
$Hx = $N5->getQuery(true);
$t7 = array($N5->quoteName($mC) . "\40\x3d\x20" . $N5->quote(1));
$Mf = array($N5->quoteName("\151\144") . "\40\75\x20" . $N5->quote(1));
$Hx->update($N5->quoteName("\x23\137\x5f\x6d\x69\x6e\x69\157\x72\141\x6e\x67\145\x5f\x73\x61\x6d\x6c\137\143\165\x73\x74\157\155\x65\x72\137\144\x65\164\141\151\154\163"))->set($t7)->where($Mf);
$N5->setQuery($Hx);
$N5->execute();
}
}
Function Calls
None |
Stats
MD5 | c737e893e8df14eeec933cbbcafff066 |
Eval Count | 0 |
Decode Time | 155 ms |