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 if (defined("\x5f\120\x53\x5f\126\x45\x52\x53\x49\117\116\137")) { goto Ch..
Decoded Output download
<?php
if (defined("_PS_VERSION_")) {
goto Ch;
}
exit;
Ch:
require_once "controllers/front/lib/SPUtils.php";
require_once "controllers/front/lib/Assertion.php";
require_once "controllers/front/sso.php";
use MOSAMLSSO\SPUtils;
class MoSamlSso extends Module
{
public function __construct()
{
$this->name = "mosamlsso";
$this->tab = "administration";
$this->version = "1.0.0";
$this->author = "miniOrange Inc.";
$this->need_instance = 0;
$this->module_key = "7d16f2e80584dbdbdba1970311633c86";
$this->ps_versions_compliancy = ["min" => "1.0", "max" => _PS_VERSION_];
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l("SAML Single Single-On");
$this->description = $this->l("The module allows your customers to log into your prestashop store by authenticating via any SAML compliant Identity Provider.");
$this->confirmUninstall = $this->l("Are you sure you want to uninstall?");
}
public function install()
{
if (!Shop::isFeatureActive()) {
goto ev;
}
Shop::setContext(Shop::CONTEXT_ALL);
ev:
return parent::install() && $this->registerHook("leftColumn") && $this->registerHook("header");
}
public function uninstall()
{
Configuration::deleteByName("MO_IDP_ENTITY_ID");
Configuration::deleteByName("MO_SAML_LOGIN_URL");
Configuration::deleteByName("MO_IDP_CERT");
Configuration::deleteByName("ATTR_FIRST_NAME");
Configuration::deleteByName("ATTR_LAST_NAME");
Configuration::deleteByName("ATTR_EMAIL");
Configuration::deleteByName("ATTR_GROUP");
return true;
}
public function getContent()
{
$this->context->controller->addJS($this->_path . "views/js/settings.js");
$gM = '';
if (!Tools::isSubmit("submit" . $this->name)) {
goto pr;
}
$X_ = (string) Tools::getValue("MO_IDP_ENTITY_ID");
$CL = (string) Tools::getValue("MO_SAML_LOGIN_URL");
$rm = (string) Tools::getValue("MO_IDP_CERT");
if (empty($X_) || empty($CL) || empty($rm)) {
goto Ig;
}
Configuration::updateValue("MO_IDP_ENTITY_ID", $X_);
Configuration::updateValue("MO_SAML_LOGIN_URL", $CL);
$rm = SPUtils::sanitize_certificate($rm);
Configuration::updateValue("MO_IDP_CERT", $rm);
$gM = $this->displayConfirmation($this->l("Settings updated"));
goto P1;
Ig:
$gM = $this->displayError($this->l("Invalid Configuration value"));
P1:
pr:
if (!Tools::isSubmit("submit_admin_link" . $this->name)) {
goto vS;
}
$jI = (string) Tools::getValue("ADMIN_LINK");
if (empty($jI)) {
goto ih;
}
Configuration::updateValue("ADMIN_LINK", $jI);
$gM = $this->displayConfirmation($this->l("Settings updated"));
goto Fm;
ih:
$gM = $this->displayError($this->l("No Link submitted"));
Fm:
vS:
if (!Tools::isSubmit("submit_attr" . $this->name)) {
goto sX;
}
$Ek = (string) Tools::getValue("ATTR_FIRST_NAME");
$PK = (string) Tools::getValue("ATTR_LAST_NAME");
$ZR = (string) Tools::getValue("ATTR_EMAIL");
$Qz = (string) Tools::getValue("ATTR_GROUP");
if (empty($Ek) && empty($PK) && empty($ZR)) {
goto SY;
}
if (empty($ZR)) {
goto SR;
}
Configuration::updateValue("ATTR_FIRST_NAME", $Ek);
Configuration::updateValue("ATTR_LAST_NAME", $PK);
Configuration::updateValue("ATTR_EMAIL", $ZR);
Configuration::updateValue("ATTR_GROUP", $Qz);
$gM = $this->displayConfirmation($this->l("Settings updated"));
goto xU;
SR:
$gM = $this->displayError($this->l("Email attribute cannot be left blank"));
xU:
goto LW;
SY:
$gM = $this->displayError($this->l("No attribute values saved"));
LW:
sX:
if (!Tools::isSubmit("save_group_attr" . $this->name)) {
goto h0;
}
$jS = (int) Tools::getValue("DO_NOT_CREATE_NEW_ADMIN_USERS");
$qI = (int) Tools::getValue("DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED");
$u8 = (string) Tools::getValue("ATTR_SUPER_ADMIN");
$Hs = (string) Tools::getValue("ATTR_LOGISTICIAN");
$b0 = (string) Tools::getValue("ATTR_TRANSLATOR");
$qy = (string) Tools::getValue("ATTR_SALESMAN");
Configuration::updateValue("DO_NOT_CREATE_NEW_ADMIN_USERS", $jS);
Configuration::updateValue("DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", $qI);
Configuration::updateValue("ATTR_SUPER_ADMIN", $u8);
Configuration::updateValue("ATTR_LOGISTICIAN", $Hs);
Configuration::updateValue("ATTR_TRANSLATOR", $b0);
Configuration::updateValue("ATTR_SALESMAN", $qy);
$gM = $this->displayConfirmation($this->l("Roles updated"));
h0:
if (!Tools::isSubmit("support_submit" . $this->name)) {
goto hj;
}
$RU = (string) Tools::getValue("CUSTOMER_EMAIL");
$G8 = (string) Tools::getValue("CUSTOMER_QUERY");
if (empty($RU) || empty($G8)) {
goto DW;
}
$kr = false;
if (!filter_var($RU, FILTER_VALIDATE_EMAIL)) {
goto wE;
}
$kr = $this->submit_contact_us($RU, $G8);
wE:
if ($kr == false) {
goto Na;
}
$gM = $this->displayConfirmation($this->l("Thanks for getting in touch! We shall get back to you shortly."));
goto M_;
Na:
$gM = $this->displayError($this->l("Your query could not be submitted. Please try again."));
M_:
goto Is;
DW:
$gM = $this->displayError($this->l("Your query could not be submitted. Please fill the details and try again."));
Is:
hj:
if ($this->pmqzyh()) {
goto Ng;
}
return $gM . $this->sso_error() . $this->samlsupport() . $this->getSPForm() . $this->getIDPForm() . $this->attributeMapping() . $this->groupMapping() . $this->adminLink() . $this->getSSOLink();
goto Zg;
Ng:
return $gM . $this->samlsupport() . $this->getSPForm() . $this->getIDPForm() . $this->attributeMapping() . $this->groupMapping() . $this->adminLink() . $this->getSSOLink();
Zg:
}
public function sso_error()
{
$form = ["form" => ["legend" => ["title" => $this->l("This Module can only be installed on http://prestashop.pilot03.siwa.at/ and would be valid till 13 August 2022")]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->submit_action = "support_submit" . $this->name;
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["CUSTOMER_EMAIL"] = '';
$sk->fields_value["CUSTOMER_QUERY"] = '';
return $sk->generateForm([$form]);
}
public function samlsupport()
{
$form = ["form" => ["legend" => ["title" => $this->l("miniOrange Support (Please reach out to us here if you want assitance with configuring the module.)")], "input" => [["type" => "text", "label" => $this->l("Your Email"), "name" => "CUSTOMER_EMAIL", "size" => 20, "required" => true], ["type" => "textarea", "label" => $this->l("Query"), "name" => "CUSTOMER_QUERY", "size" => 40, "required" => true]], "submit" => ["title" => $this->l("Send"), "icon" => "icon-foo"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->submit_action = "support_submit" . $this->name;
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["CUSTOMER_EMAIL"] = '';
$sk->fields_value["CUSTOMER_QUERY"] = '';
return $sk->generateForm([$form]);
}
public function getSPForm()
{
$Le = Tools::getHttpHost(true) . __PS_BASE_URI__ . "modules/mosamlsso/controllers/front/lib/includes/resources/sp-signing.crt";
$xH = _PS_BASE_URL_ . __PS_BASE_URI__ . "?option=mosaml_metadata";
$form = ["form" => ["legend" => ["title" => $this->l("SP Metadata")], "input" => [["type" => "text", "label" => $this->l("SP Entity ID"), "name" => "MO_SP_ENTITY_ID", "size" => 20, "disabled" => true], ["type" => "text", "label" => $this->l("ACS URL"), "name" => "MO_ACS_URL", "size" => 20, "disabled" => true], ["type" => "textarea", "label" => $this->l("SP Certificate"), "name" => "MO_SP_CERT", "size" => 20, "disabled" => true]], "buttons" => [["href" => $Le, "type" => "button", "id" => "download_cert", "name" => "Download Certificate", "icon" => "icon-foo", "title" => "Download Certificate"]]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["MO_SP_ENTITY_ID"] = SPUtils::getSPEntityID();
$sk->fields_value["MO_ACS_URL"] = SPUtils::getAcsUrl();
$sk->fields_value["MO_SP_METADATA"] = $xH;
$sk->fields_value["MO_SP_CERT"] = SPUtils::getPublicCert();
return $sk->generateForm([$form]);
}
public function getIDPForm()
{
$eK = ToolsCore::getShopDomainSsl(true) . __PS_BASE_URI__ . "module/mosamlsso/sso?option=saml_login&relayState=testValidate";
$form = ["form" => ["legend" => ["title" => $this->l("Service Provider Setup")], "input" => [["type" => "text", "label" => $this->l("IDP Entity ID"), "name" => "MO_IDP_ENTITY_ID", "size" => 20, "required" => true], ["type" => "text", "label" => $this->l("SAML Login URL"), "name" => "MO_SAML_LOGIN_URL", "size" => 20, "required" => true], ["type" => "textarea", "label" => $this->l("IDP Certificate"), "name" => "MO_IDP_CERT", "size" => 20, "id" => "idp_cert", "required" => true]], "buttons" => [["type" => "button", "id" => "test_config", "name" => $eK, "icon" => "icon-foo", "title" => "Test Configuration"]], "submit" => ["title" => $this->l("Save"), "icon" => "icon-foo"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->submit_action = "submit" . $this->name;
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["MO_IDP_ENTITY_ID"] = Tools::getValue("MO_IDP_ENTITY_ID", Configuration::get("MO_IDP_ENTITY_ID"));
$sk->fields_value["MO_SAML_LOGIN_URL"] = Tools::getValue("MO_SAML_LOGIN_URL", Configuration::get("MO_SAML_LOGIN_URL"));
$sk->fields_value["MO_IDP_CERT"] = Tools::getValue("MO_IDP_CERT", Configuration::get("MO_IDP_CERT"));
return $sk->generateForm([$form]);
}
public function attributeMapping()
{
$form = ["form" => ["legend" => ["title" => $this->l("Attribute Mapping")], "input" => [["type" => "text", "label" => $this->l("Email"), "name" => "ATTR_EMAIL", "size" => 20, "required" => true], ["type" => "text", "label" => $this->l("First Name"), "name" => "ATTR_FIRST_NAME", "size" => 20, "required" => true], ["type" => "text", "label" => $this->l("Last Name"), "name" => "ATTR_LAST_NAME", "size" => 20, "required" => true], ["type" => "text", "label" => $this->l("Group"), "name" => "ATTR_GROUP", "size" => 20]], "submit" => ["title" => $this->l("Save"), "icon" => "icon-foo"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->submit_action = "submit_attr" . $this->name;
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["ATTR_FIRST_NAME"] = Tools::getValue("ATTR_FIRST_NAME", Configuration::get("ATTR_FIRST_NAME"));
$sk->fields_value["ATTR_LAST_NAME"] = Tools::getValue("ATTR_LAST_NAME", Configuration::get("ATTR_LAST_NAME"));
$sk->fields_value["ATTR_EMAIL"] = Tools::getValue("ATTR_EMAIL", Configuration::get("ATTR_EMAIL"));
$sk->fields_value["ATTR_GROUP"] = Tools::getValue("ATTR_GROUP", Configuration::get("ATTR_GROUP"));
return $sk->generateForm([$form]);
}
public function groupMapping()
{
$form = ["form" => ["legend" => ["title" => $this->l("Group Role Mapping")], "input" => [["type" => "switch", "label" => $this->l("Do Not Create New Back-office Users"), "name" => "DO_NOT_CREATE_NEW_ADMIN_USERS", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l("Yes")], ["id" => "active_ff", "value" => 0, "label" => $this->l("No")]]], ["type" => "switch", "label" => $this->l("Do not create users whose groups are not mapped here"), "name" => "DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", "values" => [["id" => "active_on", "value" => 1, "label" => $this->l("Yes")], ["id" => "active_ff", "value" => 0, "label" => $this->l("No")]]], ["type" => "text", "label" => $this->l("Super Admin"), "name" => "ATTR_SUPER_ADMIN", "size" => 20], ["type" => "text", "label" => $this->l("Logistician"), "name" => "ATTR_LOGISTICIAN", "size" => 20], ["type" => "text", "label" => $this->l("Translator"), "name" => "ATTR_TRANSLATOR", "size" => 20], ["type" => "text", "label" => $this->l("Salesman"), "name" => "ATTR_SALESMAN", "size" => 20]], "submit" => ["title" => $this->l("Save"), "icon" => "icon-foo"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->submit_action = "save_group_attr" . $this->name;
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["DO_NOT_CREATE_NEW_ADMIN_USERS"] = Tools::getValue("DO_NOT_CREATE_NEW_ADMIN_USERS", Configuration::get("DO_NOT_CREATE_NEW_ADMIN_USERS", true));
$sk->fields_value["DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED"] = Tools::getValue("DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", Configuration::get("DO_NOT_CREATE_ADMIN_USERS_WITHOUT_GROUP_MAPPED", true));
$sk->fields_value["ATTR_SUPER_ADMIN"] = Tools::getValue("ATTR_SUPER_ADMIN", Configuration::get("ATTR_SUPER_ADMIN"));
$sk->fields_value["ATTR_LOGISTICIAN"] = Tools::getValue("ATTR_LOGISTICIAN", Configuration::get("ATTR_LOGISTICIAN"));
$sk->fields_value["ATTR_TRANSLATOR"] = Tools::getValue("ATTR_TRANSLATOR", Configuration::get("ATTR_TRANSLATOR"));
$sk->fields_value["ATTR_SALESMAN"] = Tools::getValue("ATTR_SALESMAN", Configuration::get("ATTR_SALESMAN"));
return $sk->generateForm([$form]);
}
public function adminLink()
{
$form = ["form" => ["legend" => ["title" => $this->l("Admin Link")], "input" => [["type" => "text", "label" => $this->l("Redirect Admin URL"), "name" => "ADMIN_LINK", "size" => 20]], "submit" => ["id" => "save_attr", "title" => $this->l("Save"), "icon" => "icon-foo"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->submit_action = "submit_admin_link" . $this->name;
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["ADMIN_LINK"] = Tools::getValue("ADMIN_LINK", Configuration::get("ADMIN_LINK"));
return $sk->generateForm([$form]);
}
public function getSSOLink()
{
$form = ["form" => ["legend" => ["title" => $this->l("SSO Link")], "input" => [["type" => "text", "label" => $this->l("Login button URL"), "name" => "LOGIN_BUTTON_URL", "size" => 20, "disabled" => true]]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("AdminModules");
$sk->currentIndex = AdminController::$currentIndex . "&" . http_build_query(["configure" => $this->name]);
$sk->default_form_language = (int) Configuration::get("PS_LANG_DEFAULT");
$sk->fields_value["LOGIN_BUTTON_URL"] = SPUtils::getAcsUrl() . "?option=saml_login";
return $sk->generateForm([$form]);
}
public function testConfig($Pn)
{
foreach ($Pn as $yU => $Ij) {
$Dp = $Ij[0];
$Pn[$yU] = $Dp;
Np:
}
tC:
$this->context->smarty->assign(array("profile" => $Pn));
return $this->context->smarty->fetch($this->local_path . "views/templates/front/testconfig.tpl");
}
public function submit_contact_us($l0, $qz)
{
$qz = "[Prestashop miniOrange SAML SP Module] " . $qz;
$u0 = array("company" => $_SERVER["SERVER_NAME"], "email" => $l0, "ccEmail" => "[email protected]", "query" => $qz);
$Zq = json_encode($u0);
$fP = "https://login.xecurify.com/moas/rest/customer/contact-us";
$rx = curl_init($fP);
curl_setopt($rx, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($rx, CURLOPT_ENCODING, '');
curl_setopt($rx, CURLOPT_RETURNTRANSFER, true);
curl_setopt($rx, CURLOPT_AUTOREFERER, true);
curl_setopt($rx, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($rx, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($rx, CURLOPT_MAXREDIRS, 10);
curl_setopt($rx, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "charset: UTF-8", "Authorization: Basic"));
curl_setopt($rx, CURLOPT_POST, true);
curl_setopt($rx, CURLOPT_POSTFIELDS, $Zq);
$oH = curl_exec($rx);
if (!curl_errno($rx)) {
goto Q5;
}
echo "Request Error:" . curl_error($rx);
return false;
Q5:
curl_close($rx);
return true;
}
public function pmqzyh()
{
$d9 = $this->wajo();
if ($d9 !== true) {
goto mL;
}
return 1;
goto QA;
mL:
return 0;
QA:
}
public function mo_presta_jyasdfw($fP)
{
$Xb = parse_url($fP, PHP_URL_SCHEME);
if ($Xb == "http") {
goto EE;
}
$XI = str_replace("https://", '', $fP);
goto Iq;
EE:
$XI = str_replace("http://", '', $fP);
Iq:
return $XI;
}
public function mo_presta_asdfdn($u3, $ay)
{
if ($u3 == $ay) {
goto xh;
}
return false;
goto XY;
xh:
return true;
XY:
}
public function mo_presta_asdfet($LH, $iG)
{
if ($LH <= base64_decode($iG)) {
goto st;
}
return false;
goto ST;
st:
return true;
ST:
}
public function mo_presta_asdfdesc($qU, $bV, $ay, $iG)
{
$BI = base64_decode($ay);
$eB = base64_decode($iG);
$oG = $BI . $eB;
$Sv = base64_encode(hash($qU, $oG));
if ($Sv === $bV) {
goto Xq;
}
return false;
goto v2;
Xq:
return true;
v2:
}
public function wajo()
{
$fP = \ToolsCore::getShopDomainSsl(true) . __PS_BASE_URI__;
$fP = $this->mo_presta_jyasdfw($fP);
$qU = base64_decode("c2hhMjU2");
$ay = "cHJlc3Rhc2hvcC5waWxvdDAzLnNpd2EuYXQv";
$iG = "MTY2MDM4ODMwNg==";
$bV = "NzQ4NDUzOTJmOGJkYzIwY2JiNzAzMWNiYTVhNTNkNmQ1NzA3MWI5MTVlNGNhMTY3ODIwYzM5ZWViZDBhNDYxMQ==";
$gk = $this->mo_presta_asdfdn(base64_encode($fP), $ay);
$LH = time();
$Cc = $this->mo_presta_asdfet($LH, $iG);
$Sv = $this->mo_presta_asdfdesc($qU, $bV, $ay, $iG);
if ($gk === true && $Cc === true && $Sv === true) {
goto fS;
}
return false;
goto Jm;
fS:
return true;
Jm:
}
}
?>
Did this file decode correctly?
Original Code
<?php
if (defined("\x5f\120\x53\x5f\126\x45\x52\x53\x49\117\116\137")) {
goto Ch;
}
exit;
Ch:
require_once "\143\157\x6e\x74\x72\x6f\154\154\145\162\x73\57\146\162\157\156\164\x2f\x6c\151\142\57\123\x50\125\x74\151\154\x73\x2e\x70\150\x70";
require_once "\x63\157\156\x74\162\x6f\154\154\x65\162\x73\57\146\162\x6f\156\x74\x2f\154\151\142\57\101\163\163\145\162\x74\151\x6f\x6e\56\x70\x68\x70";
require_once "\143\x6f\156\x74\x72\x6f\x6c\x6c\x65\162\x73\x2f\x66\162\157\x6e\x74\57\x73\163\157\56\x70\x68\x70";
use MOSAMLSSO\SPUtils;
class MoSamlSso extends Module
{
public function __construct()
{
$this->name = "\155\157\x73\x61\x6d\154\163\163\x6f";
$this->tab = "\x61\144\x6d\x69\156\151\163\164\x72\x61\x74\x69\x6f\156";
$this->version = "\x31\x2e\60\56\x30";
$this->author = "\155\x69\x6e\151\117\162\141\156\x67\145\x20\x49\156\143\x2e";
$this->need_instance = 0;
$this->module_key = "\67\x64\x31\66\146\x32\x65\70\60\65\x38\64\x64\142\x64\x62\x64\x62\141\x31\71\67\60\x33\x31\x31\66\63\x33\143\x38\x36";
$this->ps_versions_compliancy = ["\155\x69\156" => "\61\x2e\60", "\x6d\x61\x78" => _PS_VERSION_];
$this->bootstrap = true;
parent::__construct();
$this->displayName = $this->l("\123\101\x4d\114\40\123\x69\x6e\x67\154\x65\x20\x53\151\156\147\x6c\145\55\117\x6e");
$this->description = $this->l("\124\150\145\40\155\x6f\144\165\154\x65\x20\141\154\154\x6f\x77\163\40\x79\157\165\x72\40\143\165\x73\x74\157\155\145\162\163\x20\x74\x6f\40\x6c\x6f\x67\40\x69\x6e\164\x6f\x20\171\157\x75\x72\x20\160\162\x65\x73\x74\141\163\150\x6f\x70\x20\x73\164\157\x72\x65\x20\x62\171\40\x61\x75\164\150\x65\156\x74\x69\143\x61\x74\151\x6e\147\x20\x76\x69\141\x20\x61\x6e\x79\40\123\x41\115\114\x20\143\x6f\155\160\154\x69\141\x6e\164\40\x49\144\145\x6e\x74\x69\x74\171\40\120\x72\x6f\x76\x69\x64\145\x72\x2e");
$this->confirmUninstall = $this->l("\101\162\x65\x20\171\x6f\165\40\163\x75\x72\145\40\x79\x6f\165\40\167\x61\x6e\x74\x20\x74\x6f\x20\x75\156\151\x6e\163\164\141\x6c\x6c\x3f");
}
public function install()
{
if (!Shop::isFeatureActive()) {
goto ev;
}
Shop::setContext(Shop::CONTEXT_ALL);
ev:
return parent::install() && $this->registerHook("\x6c\145\146\x74\103\x6f\154\x75\155\x6e") && $this->registerHook("\150\x65\141\x64\x65\x72");
}
public function uninstall()
{
Configuration::deleteByName("\115\x4f\137\111\104\x50\x5f\105\116\x54\x49\124\131\137\111\x44");
Configuration::deleteByName("\x4d\x4f\137\x53\x41\115\x4c\x5f\114\117\x47\111\x4e\137\x55\122\114");
Configuration::deleteByName("\115\117\x5f\111\x44\x50\x5f\x43\105\122\x54");
Configuration::deleteByName("\x41\124\x54\122\x5f\106\x49\x52\x53\124\x5f\x4e\101\x4d\105");
Configuration::deleteByName("\101\124\x54\122\137\x4c\101\x53\124\137\116\x41\115\105");
Configuration::deleteByName("\101\124\124\122\137\105\115\101\111\x4c");
Configuration::deleteByName("\101\x54\x54\x52\x5f\x47\122\x4f\125\120");
return true;
}
public function getContent()
{
$this->context->controller->addJS($this->_path . "\x76\151\x65\x77\x73\57\152\x73\x2f\x73\x65\164\x74\151\x6e\x67\x73\56\152\x73");
$gM = '';
if (!Tools::isSubmit("\x73\x75\x62\x6d\151\164" . $this->name)) {
goto pr;
}
$X_ = (string) Tools::getValue("\x4d\117\137\111\104\120\x5f\x45\x4e\124\111\124\131\x5f\x49\104");
$CL = (string) Tools::getValue("\115\117\137\x53\101\115\114\137\114\117\107\111\x4e\137\x55\x52\114");
$rm = (string) Tools::getValue("\115\117\137\111\x44\x50\x5f\x43\105\122\124");
if (empty($X_) || empty($CL) || empty($rm)) {
goto Ig;
}
Configuration::updateValue("\x4d\117\137\x49\x44\120\137\105\116\x54\111\124\x59\137\111\104", $X_);
Configuration::updateValue("\115\117\x5f\x53\x41\115\114\x5f\114\x4f\107\111\x4e\137\125\x52\x4c", $CL);
$rm = SPUtils::sanitize_certificate($rm);
Configuration::updateValue("\115\117\x5f\x49\104\120\x5f\x43\x45\x52\x54", $rm);
$gM = $this->displayConfirmation($this->l("\x53\x65\164\x74\151\156\147\x73\40\x75\160\144\141\x74\145\144"));
goto P1;
Ig:
$gM = $this->displayError($this->l("\111\156\x76\x61\154\151\x64\x20\103\x6f\x6e\146\x69\147\x75\x72\141\164\x69\157\x6e\40\x76\141\154\x75\x65"));
P1:
pr:
if (!Tools::isSubmit("\163\x75\x62\x6d\x69\x74\137\141\144\x6d\151\x6e\137\x6c\x69\156\x6b" . $this->name)) {
goto vS;
}
$jI = (string) Tools::getValue("\101\x44\x4d\x49\x4e\x5f\114\111\116\x4b");
if (empty($jI)) {
goto ih;
}
Configuration::updateValue("\101\x44\115\111\x4e\137\114\x49\116\113", $jI);
$gM = $this->displayConfirmation($this->l("\x53\x65\x74\164\151\156\147\x73\40\x75\160\x64\x61\164\x65\x64"));
goto Fm;
ih:
$gM = $this->displayError($this->l("\x4e\157\x20\x4c\151\156\153\x20\x73\x75\142\155\151\x74\x74\145\x64"));
Fm:
vS:
if (!Tools::isSubmit("\x73\165\x62\155\151\x74\x5f\x61\164\164\x72" . $this->name)) {
goto sX;
}
$Ek = (string) Tools::getValue("\x41\124\x54\122\x5f\x46\111\x52\123\124\137\116\101\x4d\x45");
$PK = (string) Tools::getValue("\x41\x54\x54\x52\137\114\101\123\x54\137\116\101\x4d\105");
$ZR = (string) Tools::getValue("\101\x54\124\122\x5f\x45\115\101\111\114");
$Qz = (string) Tools::getValue("\x41\124\x54\122\x5f\x47\x52\117\125\120");
if (empty($Ek) && empty($PK) && empty($ZR)) {
goto SY;
}
if (empty($ZR)) {
goto SR;
}
Configuration::updateValue("\x41\x54\x54\x52\137\106\x49\x52\x53\124\x5f\116\101\x4d\105", $Ek);
Configuration::updateValue("\x41\x54\124\x52\x5f\x4c\x41\x53\124\137\116\x41\x4d\x45", $PK);
Configuration::updateValue("\101\124\x54\x52\137\x45\x4d\101\111\114", $ZR);
Configuration::updateValue("\x41\124\124\122\137\x47\x52\117\x55\120", $Qz);
$gM = $this->displayConfirmation($this->l("\x53\x65\x74\164\151\156\x67\163\40\x75\x70\x64\141\x74\x65\x64"));
goto xU;
SR:
$gM = $this->displayError($this->l("\x45\155\141\151\x6c\x20\141\x74\164\x72\x69\142\165\x74\x65\40\x63\x61\156\x6e\157\x74\x20\142\x65\x20\154\145\146\164\x20\x62\154\x61\x6e\153"));
xU:
goto LW;
SY:
$gM = $this->displayError($this->l("\116\x6f\x20\141\164\x74\x72\151\142\x75\x74\x65\x20\x76\141\x6c\x75\x65\163\x20\163\141\166\145\x64"));
LW:
sX:
if (!Tools::isSubmit("\163\x61\x76\145\x5f\147\x72\157\x75\160\x5f\141\164\164\162" . $this->name)) {
goto h0;
}
$jS = (int) Tools::getValue("\x44\117\137\116\x4f\x54\137\103\x52\x45\101\x54\x45\x5f\116\105\x57\x5f\x41\x44\115\x49\x4e\137\x55\123\105\x52\123");
$qI = (int) Tools::getValue("\x44\117\x5f\x4e\117\x54\137\x43\122\105\101\124\105\x5f\x41\104\x4d\111\x4e\137\125\123\x45\122\x53\x5f\127\111\x54\110\117\x55\x54\x5f\107\122\x4f\125\120\137\115\x41\120\120\105\104");
$u8 = (string) Tools::getValue("\101\124\x54\x52\137\x53\125\120\105\122\137\101\x44\115\x49\116");
$Hs = (string) Tools::getValue("\101\124\124\122\137\x4c\x4f\x47\x49\123\x54\111\103\x49\101\x4e");
$b0 = (string) Tools::getValue("\x41\x54\124\122\137\124\x52\x41\116\x53\114\x41\124\117\122");
$qy = (string) Tools::getValue("\101\x54\x54\x52\137\123\101\114\105\123\x4d\101\116");
Configuration::updateValue("\x44\117\137\116\117\x54\137\x43\x52\105\x41\124\105\137\x4e\x45\127\x5f\101\104\x4d\x49\116\137\x55\123\x45\122\123", $jS);
Configuration::updateValue("\x44\117\137\x4e\117\124\x5f\x43\x52\105\x41\124\105\x5f\x41\104\115\x49\116\137\x55\x53\x45\x52\x53\137\127\111\124\110\x4f\125\124\137\107\122\x4f\x55\120\x5f\x4d\101\120\x50\x45\x44", $qI);
Configuration::updateValue("\x41\x54\x54\122\137\x53\x55\x50\105\122\x5f\101\x44\115\111\x4e", $u8);
Configuration::updateValue("\x41\x54\124\122\x5f\x4c\x4f\x47\x49\x53\124\x49\103\111\101\116", $Hs);
Configuration::updateValue("\x41\124\124\122\x5f\124\122\x41\116\123\114\101\124\x4f\x52", $b0);
Configuration::updateValue("\x41\x54\x54\x52\137\123\x41\114\105\x53\x4d\x41\116", $qy);
$gM = $this->displayConfirmation($this->l("\x52\157\x6c\145\x73\x20\x75\160\144\x61\164\x65\x64"));
h0:
if (!Tools::isSubmit("\163\x75\160\x70\157\x72\164\x5f\x73\165\142\155\x69\164" . $this->name)) {
goto hj;
}
$RU = (string) Tools::getValue("\x43\125\123\x54\x4f\115\105\x52\137\x45\x4d\x41\x49\x4c");
$G8 = (string) Tools::getValue("\x43\125\123\x54\x4f\115\105\x52\x5f\x51\x55\x45\x52\x59");
if (empty($RU) || empty($G8)) {
goto DW;
}
$kr = false;
if (!filter_var($RU, FILTER_VALIDATE_EMAIL)) {
goto wE;
}
$kr = $this->submit_contact_us($RU, $G8);
wE:
if ($kr == false) {
goto Na;
}
$gM = $this->displayConfirmation($this->l("\124\150\141\x6e\x6b\163\40\146\x6f\162\40\147\x65\x74\x74\151\x6e\x67\x20\x69\x6e\40\164\157\x75\143\150\x21\x20\x57\x65\x20\163\x68\x61\154\x6c\40\x67\145\x74\40\142\x61\x63\153\x20\164\x6f\x20\x79\x6f\x75\x20\163\150\157\162\x74\x6c\x79\56"));
goto M_;
Na:
$gM = $this->displayError($this->l("\131\157\165\x72\40\x71\165\x65\162\x79\40\x63\x6f\165\x6c\144\40\156\x6f\164\x20\x62\145\x20\x73\x75\142\x6d\151\x74\x74\x65\144\x2e\x20\x50\154\145\x61\163\x65\x20\x74\162\171\x20\x61\x67\141\x69\156\x2e"));
M_:
goto Is;
DW:
$gM = $this->displayError($this->l("\x59\x6f\165\x72\x20\x71\165\145\x72\171\x20\143\x6f\165\x6c\144\x20\156\x6f\x74\40\x62\145\x20\163\165\x62\155\151\164\164\x65\144\x2e\40\120\x6c\145\141\x73\145\40\x66\151\154\154\40\x74\150\x65\x20\x64\x65\164\x61\x69\x6c\163\x20\141\156\144\x20\x74\162\x79\x20\x61\147\x61\151\x6e\56"));
Is:
hj:
if ($this->pmqzyh()) {
goto Ng;
}
return $gM . $this->sso_error() . $this->samlsupport() . $this->getSPForm() . $this->getIDPForm() . $this->attributeMapping() . $this->groupMapping() . $this->adminLink() . $this->getSSOLink();
goto Zg;
Ng:
return $gM . $this->samlsupport() . $this->getSPForm() . $this->getIDPForm() . $this->attributeMapping() . $this->groupMapping() . $this->adminLink() . $this->getSSOLink();
Zg:
}
public function sso_error()
{
$form = ["\146\157\x72\155" => ["\154\x65\x67\145\156\x64" => ["\x74\x69\x74\x6c\x65" => $this->l("\x54\150\x69\x73\40\115\x6f\x64\165\154\145\40\x63\141\156\x20\x6f\156\x6c\171\40\x62\x65\x20\x69\x6e\x73\x74\x61\154\154\x65\x64\40\157\156\40\x68\x74\x74\x70\72\x2f\57\x70\162\145\163\x74\x61\163\x68\157\160\x2e\160\151\x6c\x6f\x74\x30\x33\56\163\x69\x77\x61\56\141\x74\x2f\x20\x61\x6e\x64\x20\167\x6f\165\x6c\x64\x20\x62\x65\40\166\x61\x6c\x69\144\x20\164\x69\154\154\x20\x31\63\40\101\x75\147\x75\x73\164\x20\x32\x30\62\62")]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\x41\144\155\x69\156\x4d\157\x64\x75\154\145\x73");
$sk->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\x63\x6f\156\146\151\x67\x75\x72\145" => $this->name]);
$sk->submit_action = "\x73\165\x70\160\x6f\x72\x74\137\163\x75\x62\x6d\151\164" . $this->name;
$sk->default_form_language = (int) Configuration::get("\120\x53\x5f\x4c\x41\x4e\x47\137\x44\x45\106\101\x55\x4c\x54");
$sk->fields_value["\x43\125\x53\x54\117\115\x45\122\137\x45\115\101\111\x4c"] = '';
$sk->fields_value["\103\x55\x53\124\x4f\115\x45\122\137\121\125\x45\x52\131"] = '';
return $sk->generateForm([$form]);
}
public function samlsupport()
{
$form = ["\146\x6f\x72\x6d" => ["\154\x65\x67\145\x6e\x64" => ["\x74\151\164\x6c\145" => $this->l("\x6d\x69\x6e\151\x4f\x72\141\156\147\145\x20\123\165\160\160\x6f\162\x74\x20\x28\120\154\x65\x61\163\145\40\x72\145\141\143\150\40\x6f\165\x74\x20\x74\157\40\x75\163\x20\x68\145\162\145\40\x69\146\x20\171\157\165\x20\167\x61\x6e\164\x20\x61\x73\x73\x69\164\x61\156\143\x65\x20\167\151\164\x68\40\143\x6f\x6e\146\x69\x67\x75\162\x69\x6e\147\x20\164\x68\x65\40\x6d\x6f\144\x75\154\x65\56\x29")], "\x69\156\160\x75\164" => [["\x74\x79\x70\x65" => "\x74\x65\170\164", "\154\x61\142\145\x6c" => $this->l("\x59\x6f\x75\x72\40\105\155\x61\151\x6c"), "\156\x61\155\x65" => "\x43\125\x53\x54\x4f\115\105\x52\137\x45\x4d\x41\111\x4c", "\x73\x69\x7a\145" => 20, "\162\x65\161\x75\151\162\145\x64" => true], ["\x74\171\160\x65" => "\x74\145\170\x74\x61\x72\x65\141", "\154\x61\x62\x65\154" => $this->l("\x51\x75\x65\162\x79"), "\x6e\x61\x6d\x65" => "\103\125\123\124\x4f\115\105\x52\x5f\x51\x55\105\x52\x59", "\163\x69\x7a\x65" => 40, "\x72\145\x71\165\x69\x72\x65\144" => true]], "\x73\165\x62\x6d\151\x74" => ["\164\x69\164\x6c\x65" => $this->l("\x53\145\x6e\144"), "\x69\143\x6f\x6e" => "\151\x63\x6f\156\x2d\x66\x6f\157"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\101\x64\155\x69\x6e\115\157\144\165\x6c\145\163");
$sk->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\143\157\x6e\x66\151\147\x75\162\145" => $this->name]);
$sk->submit_action = "\x73\165\160\x70\x6f\x72\164\x5f\x73\x75\x62\155\151\164" . $this->name;
$sk->default_form_language = (int) Configuration::get("\120\x53\137\x4c\101\x4e\107\137\x44\105\x46\101\x55\x4c\124");
$sk->fields_value["\103\125\123\x54\x4f\115\x45\x52\137\x45\115\x41\111\x4c"] = '';
$sk->fields_value["\x43\125\123\x54\117\115\105\122\137\121\125\x45\x52\131"] = '';
return $sk->generateForm([$form]);
}
public function getSPForm()
{
$Le = Tools::getHttpHost(true) . __PS_BASE_URI__ . "\155\x6f\144\x75\x6c\x65\x73\x2f\155\x6f\163\x61\x6d\x6c\x73\163\157\57\143\x6f\x6e\x74\x72\x6f\154\x6c\x65\x72\163\57\146\162\157\x6e\x74\x2f\x6c\151\142\x2f\151\156\x63\154\x75\144\x65\163\x2f\162\x65\x73\x6f\x75\162\x63\145\x73\57\163\160\55\x73\151\x67\156\x69\156\x67\x2e\143\x72\x74";
$xH = _PS_BASE_URL_ . __PS_BASE_URI__ . "\77\x6f\x70\x74\151\157\x6e\x3d\155\157\x73\x61\x6d\154\137\x6d\x65\x74\x61\x64\141\164\x61";
$form = ["\146\157\x72\155" => ["\x6c\145\x67\145\x6e\144" => ["\164\151\164\x6c\x65" => $this->l("\x53\x50\40\115\x65\x74\141\144\141\x74\x61")], "\151\156\x70\165\x74" => [["\164\171\x70\145" => "\x74\x65\170\164", "\x6c\141\142\145\x6c" => $this->l("\x53\120\x20\105\156\164\x69\164\171\40\x49\x44"), "\156\141\x6d\x65" => "\x4d\x4f\x5f\123\120\137\x45\116\x54\111\124\x59\137\111\104", "\x73\151\x7a\x65" => 20, "\144\x69\163\141\x62\x6c\145\x64" => true], ["\x74\171\160\145" => "\x74\x65\170\x74", "\154\141\x62\x65\154" => $this->l("\101\x43\x53\x20\x55\122\x4c"), "\x6e\141\155\145" => "\115\117\x5f\x41\x43\123\137\x55\x52\x4c", "\163\x69\172\145" => 20, "\x64\x69\163\x61\142\x6c\x65\x64" => true], ["\x74\171\x70\145" => "\x74\145\170\x74\x61\x72\145\141", "\154\141\x62\145\154" => $this->l("\x53\x50\x20\103\x65\x72\x74\151\146\151\x63\141\x74\x65"), "\156\x61\x6d\145" => "\x4d\117\x5f\123\x50\x5f\x43\x45\122\x54", "\163\151\x7a\145" => 20, "\144\x69\163\141\142\x6c\145\x64" => true]], "\142\x75\x74\x74\x6f\156\163" => [["\150\x72\145\146" => $Le, "\x74\x79\x70\145" => "\x62\165\164\x74\157\156", "\x69\144" => "\x64\x6f\x77\x6e\x6c\157\141\144\137\x63\x65\162\x74", "\156\x61\155\x65" => "\104\157\167\156\x6c\x6f\141\x64\x20\x43\145\162\164\151\146\x69\x63\x61\164\x65", "\x69\x63\x6f\x6e" => "\x69\143\157\156\55\146\157\157", "\x74\151\x74\154\145" => "\104\x6f\x77\x6e\154\157\141\144\x20\x43\x65\x72\x74\151\x66\x69\x63\x61\164\x65"]]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\101\144\x6d\151\156\115\157\x64\x75\x6c\145\x73");
$sk->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\x63\x6f\156\x66\151\147\x75\162\145" => $this->name]);
$sk->default_form_language = (int) Configuration::get("\x50\123\137\x4c\x41\116\107\x5f\104\x45\106\101\125\x4c\x54");
$sk->fields_value["\x4d\117\137\x53\x50\137\x45\116\124\x49\124\x59\137\x49\x44"] = SPUtils::getSPEntityID();
$sk->fields_value["\x4d\117\x5f\101\x43\123\x5f\125\122\x4c"] = SPUtils::getAcsUrl();
$sk->fields_value["\115\x4f\x5f\123\x50\x5f\115\x45\124\x41\104\x41\x54\x41"] = $xH;
$sk->fields_value["\115\x4f\x5f\x53\120\137\103\x45\122\124"] = SPUtils::getPublicCert();
return $sk->generateForm([$form]);
}
public function getIDPForm()
{
$eK = ToolsCore::getShopDomainSsl(true) . __PS_BASE_URI__ . "\155\x6f\144\165\x6c\145\x2f\155\x6f\x73\x61\x6d\154\x73\x73\x6f\x2f\163\163\157\x3f\x6f\x70\x74\x69\x6f\x6e\x3d\163\141\x6d\x6c\x5f\x6c\x6f\147\151\156\46\x72\145\x6c\141\x79\123\x74\141\x74\x65\75\164\145\x73\x74\x56\141\x6c\x69\x64\141\x74\145";
$form = ["\146\157\x72\155" => ["\154\145\147\145\156\144" => ["\x74\x69\x74\x6c\x65" => $this->l("\x53\x65\162\166\x69\x63\145\x20\x50\x72\x6f\166\x69\144\x65\162\40\x53\x65\164\x75\160")], "\151\156\x70\x75\x74" => [["\x74\171\x70\145" => "\164\145\170\x74", "\154\141\142\145\x6c" => $this->l("\111\104\120\40\x45\156\164\x69\164\171\40\111\x44"), "\156\141\x6d\x65" => "\115\x4f\x5f\111\104\120\x5f\x45\116\x54\111\124\x59\137\111\104", "\163\x69\x7a\x65" => 20, "\162\145\161\x75\x69\162\145\x64" => true], ["\164\171\160\x65" => "\164\x65\x78\164", "\154\141\142\x65\x6c" => $this->l("\123\101\115\x4c\40\x4c\157\x67\x69\x6e\40\125\122\x4c"), "\x6e\141\x6d\145" => "\x4d\117\137\123\101\x4d\x4c\137\114\117\x47\x49\x4e\x5f\125\122\x4c", "\163\x69\172\145" => 20, "\162\145\161\165\x69\162\145\144" => true], ["\x74\x79\x70\145" => "\x74\145\170\x74\x61\162\145\x61", "\x6c\141\142\x65\x6c" => $this->l("\111\104\120\40\103\x65\162\164\x69\146\x69\143\x61\164\x65"), "\x6e\141\x6d\145" => "\115\x4f\x5f\111\104\120\137\x43\x45\122\x54", "\x73\151\x7a\x65" => 20, "\151\x64" => "\x69\x64\x70\137\143\x65\162\x74", "\x72\145\x71\x75\151\162\145\x64" => true]], "\142\165\164\x74\157\156\163" => [["\164\171\160\x65" => "\x62\x75\x74\x74\157\156", "\151\144" => "\x74\145\x73\x74\x5f\x63\157\156\146\x69\147", "\156\x61\155\145" => $eK, "\x69\x63\157\x6e" => "\151\143\x6f\156\55\x66\157\157", "\x74\x69\x74\x6c\x65" => "\124\145\163\164\x20\x43\x6f\156\x66\151\147\x75\x72\x61\164\151\x6f\x6e"]], "\x73\165\142\155\x69\x74" => ["\164\x69\164\x6c\145" => $this->l("\x53\141\166\x65"), "\x69\143\157\x6e" => "\x69\143\157\156\x2d\146\157\x6f"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\101\144\x6d\151\x6e\x4d\x6f\x64\x75\154\x65\163");
$sk->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\143\x6f\x6e\146\151\147\165\x72\145" => $this->name]);
$sk->submit_action = "\163\165\142\155\151\x74" . $this->name;
$sk->default_form_language = (int) Configuration::get("\120\123\x5f\114\101\116\107\x5f\104\105\x46\x41\x55\x4c\x54");
$sk->fields_value["\x4d\x4f\x5f\x49\104\x50\x5f\x45\x4e\124\x49\x54\131\137\x49\104"] = Tools::getValue("\x4d\x4f\x5f\x49\x44\120\137\105\x4e\x54\x49\x54\x59\137\x49\x44", Configuration::get("\115\117\x5f\111\104\x50\x5f\105\116\124\111\x54\x59\x5f\111\x44"));
$sk->fields_value["\x4d\x4f\137\x53\101\115\x4c\x5f\114\117\107\x49\x4e\x5f\x55\x52\114"] = Tools::getValue("\x4d\x4f\x5f\x53\x41\x4d\114\137\x4c\x4f\x47\x49\x4e\137\x55\x52\x4c", Configuration::get("\x4d\x4f\137\123\x41\115\x4c\x5f\114\x4f\107\111\x4e\x5f\x55\122\x4c"));
$sk->fields_value["\115\117\x5f\x49\x44\x50\137\103\x45\x52\x54"] = Tools::getValue("\115\117\137\111\x44\x50\x5f\103\x45\x52\x54", Configuration::get("\x4d\x4f\x5f\x49\x44\x50\x5f\103\x45\x52\124"));
return $sk->generateForm([$form]);
}
public function attributeMapping()
{
$form = ["\x66\157\x72\155" => ["\x6c\145\x67\x65\x6e\144" => ["\x74\x69\164\x6c\145" => $this->l("\x41\164\164\162\151\142\165\x74\145\x20\x4d\141\160\160\x69\x6e\147")], "\151\x6e\160\x75\x74" => [["\x74\x79\160\145" => "\164\145\170\x74", "\x6c\141\142\145\x6c" => $this->l("\x45\x6d\141\x69\154"), "\x6e\141\x6d\145" => "\101\124\x54\x52\137\105\x4d\101\x49\114", "\163\x69\172\x65" => 20, "\x72\145\161\x75\x69\x72\145\144" => true], ["\x74\x79\160\x65" => "\x74\x65\x78\164", "\x6c\x61\x62\x65\x6c" => $this->l("\106\151\162\x73\164\x20\x4e\141\x6d\x65"), "\x6e\x61\x6d\145" => "\101\x54\x54\x52\137\106\x49\122\123\x54\x5f\x4e\101\x4d\105", "\163\151\172\x65" => 20, "\162\x65\161\x75\151\x72\145\x64" => true], ["\x74\x79\x70\x65" => "\x74\x65\170\x74", "\154\x61\142\x65\154" => $this->l("\x4c\x61\163\164\40\x4e\141\155\145"), "\156\x61\x6d\145" => "\x41\124\x54\x52\137\114\x41\x53\x54\137\x4e\x41\x4d\x45", "\163\x69\x7a\x65" => 20, "\x72\x65\161\165\x69\x72\x65\144" => true], ["\164\x79\x70\145" => "\x74\x65\170\164", "\154\x61\x62\x65\x6c" => $this->l("\107\162\157\165\x70"), "\x6e\x61\x6d\x65" => "\101\124\124\x52\137\107\x52\117\x55\x50", "\163\x69\x7a\145" => 20]], "\163\x75\x62\x6d\x69\164" => ["\164\x69\164\154\x65" => $this->l("\123\x61\x76\x65"), "\151\143\x6f\156" => "\151\143\x6f\156\x2d\146\x6f\x6f"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\x41\144\x6d\x69\156\115\157\x64\x75\154\x65\x73");
$sk->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\157\x6e\x66\x69\147\x75\x72\x65" => $this->name]);
$sk->submit_action = "\x73\165\x62\155\x69\x74\137\141\x74\164\x72" . $this->name;
$sk->default_form_language = (int) Configuration::get("\120\123\137\x4c\x41\116\x47\137\104\105\106\101\x55\x4c\x54");
$sk->fields_value["\x41\x54\x54\x52\x5f\106\x49\x52\x53\124\137\116\101\x4d\105"] = Tools::getValue("\101\124\124\122\x5f\106\x49\x52\x53\124\x5f\116\x41\115\x45", Configuration::get("\x41\124\x54\122\x5f\106\111\x52\123\124\137\x4e\101\x4d\x45"));
$sk->fields_value["\x41\x54\x54\x52\137\x4c\101\x53\x54\x5f\116\x41\x4d\105"] = Tools::getValue("\x41\x54\124\122\137\x4c\101\x53\124\137\x4e\x41\115\x45", Configuration::get("\x41\x54\x54\122\x5f\x4c\x41\123\x54\137\x4e\x41\115\105"));
$sk->fields_value["\x41\x54\124\x52\137\105\115\101\111\x4c"] = Tools::getValue("\x41\124\124\x52\137\105\x4d\101\111\x4c", Configuration::get("\101\x54\124\122\137\105\x4d\x41\x49\x4c"));
$sk->fields_value["\x41\124\124\122\x5f\107\x52\x4f\125\120"] = Tools::getValue("\101\124\124\x52\x5f\x47\x52\x4f\x55\x50", Configuration::get("\101\124\x54\122\137\x47\x52\117\125\120"));
return $sk->generateForm([$form]);
}
public function groupMapping()
{
$form = ["\x66\157\162\x6d" => ["\154\x65\x67\x65\156\144" => ["\164\x69\164\154\x65" => $this->l("\x47\162\x6f\x75\160\40\x52\x6f\x6c\145\40\x4d\x61\x70\160\x69\156\x67")], "\151\x6e\x70\165\164" => [["\x74\x79\x70\x65" => "\x73\x77\x69\x74\x63\150", "\x6c\141\x62\x65\x6c" => $this->l("\104\x6f\40\116\157\164\40\x43\162\145\141\164\145\x20\116\x65\x77\40\102\141\x63\x6b\x2d\157\146\x66\151\x63\145\40\x55\x73\145\162\163"), "\x6e\141\x6d\x65" => "\x44\x4f\137\x4e\117\x54\137\103\122\x45\101\124\105\137\x4e\105\127\x5f\101\x44\115\x49\116\x5f\x55\123\105\122\x53", "\166\x61\154\x75\x65\163" => [["\x69\x64" => "\141\x63\x74\x69\x76\x65\137\157\x6e", "\x76\141\154\165\x65" => 1, "\x6c\141\x62\x65\154" => $this->l("\131\x65\x73")], ["\151\x64" => "\x61\x63\164\151\x76\x65\x5f\146\146", "\166\x61\154\165\x65" => 0, "\x6c\x61\142\x65\x6c" => $this->l("\x4e\x6f")]]], ["\164\171\160\x65" => "\163\167\x69\x74\x63\150", "\x6c\x61\x62\x65\x6c" => $this->l("\x44\157\40\x6e\157\x74\40\143\x72\x65\x61\164\x65\x20\x75\x73\145\x72\x73\40\167\150\157\163\145\x20\x67\x72\x6f\165\x70\163\x20\141\x72\145\40\156\x6f\x74\x20\155\x61\x70\160\x65\x64\x20\150\x65\162\145"), "\156\141\155\145" => "\104\117\x5f\116\x4f\x54\137\103\x52\105\101\x54\105\x5f\x41\x44\115\x49\116\137\x55\123\x45\x52\123\x5f\x57\x49\x54\110\x4f\125\x54\x5f\x47\x52\x4f\125\120\137\115\x41\120\120\x45\104", "\x76\141\x6c\x75\145\x73" => [["\x69\144" => "\141\x63\164\x69\x76\145\x5f\x6f\156", "\166\x61\154\x75\145" => 1, "\154\x61\x62\x65\154" => $this->l("\131\x65\x73")], ["\151\144" => "\x61\143\164\151\x76\145\x5f\x66\146", "\x76\141\x6c\165\x65" => 0, "\x6c\x61\x62\145\x6c" => $this->l("\x4e\157")]]], ["\x74\x79\160\145" => "\164\x65\x78\164", "\154\141\142\145\x6c" => $this->l("\123\x75\x70\x65\x72\40\x41\144\x6d\151\156"), "\156\x61\x6d\x65" => "\101\x54\124\122\137\x53\x55\x50\105\x52\137\x41\x44\115\111\x4e", "\x73\x69\x7a\x65" => 20], ["\x74\171\160\x65" => "\164\145\170\x74", "\154\x61\x62\x65\x6c" => $this->l("\114\x6f\x67\x69\163\x74\151\x63\151\x61\156"), "\156\141\155\145" => "\101\x54\124\x52\x5f\114\117\107\x49\x53\124\111\103\111\101\116", "\x73\151\x7a\145" => 20], ["\x74\x79\160\x65" => "\x74\145\x78\164", "\x6c\x61\x62\145\x6c" => $this->l("\x54\x72\141\156\x73\x6c\141\x74\x6f\x72"), "\156\141\155\145" => "\101\124\124\x52\137\x54\x52\101\x4e\123\114\101\x54\117\x52", "\x73\x69\172\145" => 20], ["\164\x79\x70\x65" => "\x74\x65\170\x74", "\x6c\141\x62\x65\154" => $this->l("\123\x61\x6c\x65\x73\x6d\x61\x6e"), "\156\x61\155\x65" => "\x41\124\x54\x52\x5f\123\x41\114\105\123\115\101\x4e", "\163\x69\172\145" => 20]], "\163\165\142\x6d\151\164" => ["\x74\x69\164\154\x65" => $this->l("\123\141\x76\x65"), "\151\x63\x6f\156" => "\151\x63\157\x6e\x2d\x66\x6f\157"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\101\x64\x6d\151\x6e\115\157\x64\x75\154\x65\163");
$sk->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\157\x6e\146\x69\147\x75\x72\x65" => $this->name]);
$sk->submit_action = "\x73\x61\x76\145\x5f\147\x72\157\165\x70\x5f\141\164\x74\x72" . $this->name;
$sk->default_form_language = (int) Configuration::get("\x50\123\137\114\101\116\107\137\x44\105\x46\101\x55\x4c\124");
$sk->fields_value["\104\x4f\x5f\116\117\x54\x5f\x43\x52\x45\x41\124\x45\x5f\116\x45\127\x5f\101\x44\115\x49\116\137\x55\x53\x45\x52\123"] = Tools::getValue("\104\x4f\x5f\116\117\x54\x5f\103\122\x45\101\124\105\x5f\116\x45\127\x5f\x41\x44\115\111\x4e\x5f\x55\123\x45\x52\x53", Configuration::get("\x44\117\x5f\116\117\x54\137\103\x52\x45\101\124\105\137\116\105\127\137\x41\104\x4d\x49\116\137\125\x53\x45\122\123", true));
$sk->fields_value["\104\x4f\x5f\116\117\x54\x5f\103\122\105\x41\124\105\x5f\x41\x44\115\x49\116\x5f\x55\123\105\122\123\x5f\x57\x49\x54\x48\x4f\x55\124\137\x47\122\x4f\125\x50\x5f\x4d\101\120\120\x45\104"] = Tools::getValue("\104\x4f\137\116\x4f\x54\x5f\x43\x52\105\x41\x54\105\137\x41\x44\115\111\116\137\125\x53\x45\122\x53\137\127\111\x54\110\x4f\x55\x54\137\x47\x52\117\x55\120\x5f\x4d\x41\120\x50\x45\x44", Configuration::get("\104\117\x5f\x4e\x4f\124\x5f\x43\x52\105\101\x54\x45\x5f\x41\x44\x4d\111\116\x5f\x55\123\105\x52\x53\137\x57\x49\x54\110\x4f\125\x54\x5f\x47\122\117\x55\x50\x5f\x4d\101\120\x50\105\x44", true));
$sk->fields_value["\x41\x54\x54\x52\137\x53\x55\x50\105\x52\x5f\x41\104\115\111\116"] = Tools::getValue("\101\x54\124\122\137\x53\x55\x50\105\122\137\101\x44\x4d\x49\116", Configuration::get("\101\x54\124\122\x5f\x53\x55\120\105\x52\137\101\104\x4d\x49\116"));
$sk->fields_value["\x41\x54\x54\x52\137\x4c\117\x47\111\x53\x54\111\103\x49\x41\116"] = Tools::getValue("\x41\x54\x54\122\137\x4c\117\x47\x49\x53\124\111\x43\x49\x41\116", Configuration::get("\101\124\124\x52\x5f\114\x4f\x47\111\x53\124\x49\103\x49\x41\116"));
$sk->fields_value["\101\124\x54\122\137\x54\x52\101\116\x53\114\101\124\117\122"] = Tools::getValue("\101\124\x54\x52\137\124\x52\101\116\123\x4c\x41\124\x4f\x52", Configuration::get("\101\x54\x54\122\x5f\x54\122\101\116\x53\x4c\x41\124\117\x52"));
$sk->fields_value["\x41\x54\x54\122\x5f\x53\x41\x4c\105\123\115\x41\116"] = Tools::getValue("\101\124\x54\122\137\123\x41\114\x45\123\115\101\116", Configuration::get("\x41\x54\x54\x52\137\123\101\x4c\x45\x53\x4d\x41\116"));
return $sk->generateForm([$form]);
}
public function adminLink()
{
$form = ["\x66\x6f\x72\155" => ["\x6c\145\x67\x65\156\144" => ["\164\151\x74\x6c\145" => $this->l("\101\144\155\151\156\x20\x4c\151\156\153")], "\x69\156\160\165\164" => [["\164\171\x70\145" => "\164\x65\170\x74", "\154\x61\142\x65\x6c" => $this->l("\x52\145\x64\x69\162\145\x63\164\x20\x41\x64\x6d\151\156\x20\125\x52\x4c"), "\156\141\x6d\x65" => "\x41\104\x4d\x49\x4e\x5f\114\x49\x4e\x4b", "\163\x69\x7a\x65" => 20]], "\163\x75\142\x6d\151\164" => ["\x69\144" => "\x73\141\166\145\137\x61\164\164\162", "\x74\x69\x74\x6c\x65" => $this->l("\x53\x61\x76\x65"), "\x69\x63\x6f\x6e" => "\x69\143\x6f\156\x2d\x66\157\x6f"]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\x41\144\x6d\151\156\115\157\x64\x75\154\145\163");
$sk->currentIndex = AdminController::$currentIndex . "\x26" . http_build_query(["\143\x6f\x6e\x66\151\x67\165\162\x65" => $this->name]);
$sk->submit_action = "\x73\165\x62\x6d\x69\164\137\x61\x64\x6d\151\x6e\x5f\154\151\156\x6b" . $this->name;
$sk->default_form_language = (int) Configuration::get("\120\123\137\x4c\101\116\107\x5f\x44\x45\106\x41\x55\114\x54");
$sk->fields_value["\101\104\x4d\x49\116\x5f\114\111\116\x4b"] = Tools::getValue("\101\x44\x4d\111\x4e\x5f\x4c\x49\116\x4b", Configuration::get("\101\x44\x4d\111\116\x5f\114\x49\x4e\113"));
return $sk->generateForm([$form]);
}
public function getSSOLink()
{
$form = ["\146\x6f\x72\155" => ["\x6c\x65\x67\x65\156\x64" => ["\x74\x69\x74\x6c\145" => $this->l("\x53\x53\117\40\114\151\x6e\x6b")], "\x69\156\160\x75\x74" => [["\x74\x79\x70\145" => "\x74\x65\x78\164", "\x6c\141\142\145\x6c" => $this->l("\x4c\157\x67\151\x6e\40\142\165\164\x74\x6f\x6e\40\125\x52\114"), "\156\141\x6d\145" => "\114\x4f\107\x49\116\137\x42\125\124\124\117\116\x5f\x55\x52\x4c", "\163\151\x7a\x65" => 20, "\144\151\163\x61\142\x6c\145\x64" => true]]]];
$sk = new HelperForm();
$sk->table = $this->table;
$sk->name_controller = $this->name;
$sk->token = Tools::getAdminTokenLite("\x41\144\x6d\151\156\115\157\x64\165\x6c\145\163");
$sk->currentIndex = AdminController::$currentIndex . "\46" . http_build_query(["\x63\157\156\x66\151\x67\165\x72\x65" => $this->name]);
$sk->default_form_language = (int) Configuration::get("\120\x53\x5f\x4c\101\116\107\137\104\105\x46\101\125\x4c\x54");
$sk->fields_value["\x4c\x4f\x47\111\116\137\x42\125\x54\124\x4f\x4e\x5f\125\122\114"] = SPUtils::getAcsUrl() . "\77\157\160\x74\151\157\x6e\x3d\163\141\155\154\x5f\154\157\147\x69\x6e";
return $sk->generateForm([$form]);
}
public function testConfig($Pn)
{
foreach ($Pn as $yU => $Ij) {
$Dp = $Ij[0];
$Pn[$yU] = $Dp;
Np:
}
tC:
$this->context->smarty->assign(array("\160\162\157\146\151\x6c\145" => $Pn));
return $this->context->smarty->fetch($this->local_path . "\166\x69\x65\x77\163\57\164\x65\155\160\x6c\x61\x74\x65\163\x2f\x66\162\157\x6e\164\57\164\145\x73\x74\x63\x6f\156\146\x69\147\x2e\164\x70\x6c");
}
public function submit_contact_us($l0, $qz)
{
$qz = "\x5b\120\162\145\x73\164\141\163\150\x6f\160\x20\155\151\156\x69\117\x72\141\x6e\147\145\x20\x53\101\115\114\x20\123\120\40\x4d\x6f\x64\165\154\145\135\40" . $qz;
$u0 = array("\143\x6f\x6d\x70\141\156\x79" => $_SERVER["\123\x45\122\126\105\122\137\116\101\115\105"], "\145\155\x61\151\154" => $l0, "\143\143\105\x6d\141\151\x6c" => "\x73\x61\155\x6c\163\x75\160\160\157\162\x74\x40\170\145\143\x75\x72\x69\x66\171\x2e\143\157\155", "\x71\165\x65\162\x79" => $qz);
$Zq = json_encode($u0);
$fP = "\x68\x74\x74\x70\163\72\57\57\154\157\147\151\156\x2e\x78\145\143\165\x72\x69\x66\171\56\143\157\x6d\x2f\155\157\x61\163\57\x72\145\x73\x74\x2f\x63\165\x73\164\157\x6d\145\x72\57\143\157\x6e\164\x61\143\164\55\x75\x73";
$rx = curl_init($fP);
curl_setopt($rx, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($rx, CURLOPT_ENCODING, '');
curl_setopt($rx, CURLOPT_RETURNTRANSFER, true);
curl_setopt($rx, CURLOPT_AUTOREFERER, true);
curl_setopt($rx, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($rx, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($rx, CURLOPT_MAXREDIRS, 10);
curl_setopt($rx, CURLOPT_HTTPHEADER, array("\103\157\x6e\x74\x65\x6e\x74\55\124\171\160\x65\72\x20\x61\160\160\154\x69\x63\141\164\151\157\x6e\57\152\163\157\156", "\143\150\141\x72\x73\145\164\72\40\x55\124\106\55\x38", "\x41\x75\x74\150\x6f\x72\151\x7a\x61\164\x69\x6f\156\72\x20\x42\x61\163\x69\143"));
curl_setopt($rx, CURLOPT_POST, true);
curl_setopt($rx, CURLOPT_POSTFIELDS, $Zq);
$oH = curl_exec($rx);
if (!curl_errno($rx)) {
goto Q5;
}
echo "\122\x65\x71\x75\x65\x73\x74\40\105\x72\162\157\162\x3a" . curl_error($rx);
return false;
Q5:
curl_close($rx);
return true;
}
public function pmqzyh()
{
$d9 = $this->wajo();
if ($d9 !== true) {
goto mL;
}
return 1;
goto QA;
mL:
return 0;
QA:
}
public function mo_presta_jyasdfw($fP)
{
$Xb = parse_url($fP, PHP_URL_SCHEME);
if ($Xb == "\x68\164\164\x70") {
goto EE;
}
$XI = str_replace("\150\x74\164\160\163\72\x2f\57", '', $fP);
goto Iq;
EE:
$XI = str_replace("\150\x74\x74\160\72\57\57", '', $fP);
Iq:
return $XI;
}
public function mo_presta_asdfdn($u3, $ay)
{
if ($u3 == $ay) {
goto xh;
}
return false;
goto XY;
xh:
return true;
XY:
}
public function mo_presta_asdfet($LH, $iG)
{
if ($LH <= base64_decode($iG)) {
goto st;
}
return false;
goto ST;
st:
return true;
ST:
}
public function mo_presta_asdfdesc($qU, $bV, $ay, $iG)
{
$BI = base64_decode($ay);
$eB = base64_decode($iG);
$oG = $BI . $eB;
$Sv = base64_encode(hash($qU, $oG));
if ($Sv === $bV) {
goto Xq;
}
return false;
goto v2;
Xq:
return true;
v2:
}
public function wajo()
{
$fP = \ToolsCore::getShopDomainSsl(true) . __PS_BASE_URI__;
$fP = $this->mo_presta_jyasdfw($fP);
$qU = base64_decode("\143\x32\150\150\x4d\x6a\x55\62");
$ay = "\143\x48\112\x6c\143\x33\x52\x68\x63\62\150\x76\x63\x43\65\x77\141\127\x78\x76\144\x44\x41\x7a\x4c\156\x4e\160\144\62\x45\x75\x59\130\x51\166";
$iG = "\x4d\124\131\62\115\104\115\64\117\x44\115\x77\x4e\x67\75\75";
$bV = "\116\172\x51\x34\116\x44\x55\x7a\x4f\124\112\x6d\117\107\112\x6b\x59\x7a\x49\x77\131\62\112\x69\x4e\172\101\172\x4d\127\x4e\151\131\124\126\x68\116\x54\116\x6b\x4e\x6d\x51\61\x4e\172\101\x33\x4d\127\111\65\115\124\x56\x6c\x4e\107\116\150\x4d\124\131\63\x4f\104\111\x77\131\172\115\x35\x5a\127\126\x69\132\x44\102\x68\116\104\x59\170\115\121\75\x3d";
$gk = $this->mo_presta_asdfdn(base64_encode($fP), $ay);
$LH = time();
$Cc = $this->mo_presta_asdfet($LH, $iG);
$Sv = $this->mo_presta_asdfdesc($qU, $bV, $ay, $iG);
if ($gk === true && $Cc === true && $Sv === true) {
goto fS;
}
return false;
goto Jm;
fS:
return true;
Jm:
}
}
Function Calls
None |
Stats
MD5 | 08b742c07ef6290dbaddcb120f9cef8c |
Eval Count | 0 |
Decode Time | 102 ms |