Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Drupal\rest_api_authentication\Controller; use Drupal\Core\Ajax\Aj..
Decoded Output download
<?php
namespace Drupal\rest_api_authentication\Controller;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\OpenModalDialogCommand;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Form\FormBuilder;
use Drupal\user\Entity\User;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Drupal\rest_api_authentication\DBQueries;
use Drupal\rest_api_authentication\handler;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Component\Utility\Html;
use Drupal\rest_api_authentication\Utilities;
use Drupal\Core\Access\AccessResult;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Session\AccountInterface;
use Drupal\rest_api_authentication\MiniorangeRestAPICustomer;
class rest_api_authenticationController extends ControllerBase
{
protected $formBuilder;
public function __construct(FormBuilder $G3)
{
$this->formBuilder = $G3;
}
public static function create(ContainerInterface $Hq)
{
return new static($Hq->get("form_builder"));
}
public function rest_api_authentication_access_token(Request $jl)
{
if (!($jl->getMethod() !== "POST")) {
goto De;
}
$I4 = array("status" => "error", "http_code" => "405", "error" => "INVALID_HTTP_METHOD", "error_description" => "The used HTTP method should be a POST.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
De:
$yC = trim(Html::escape($_POST["grant_type"]));
if (!($yC != "password" && $yC != "client_credentials")) {
goto zz;
}
$I4 = array("status" => "error", "http_code" => "401", "error" => "INVALID_GRANT_TYPE", "error_description" => "The used grant type should be password or client_credentials.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
zz:
if (!(\Drupal::config("rest_api_authentication.settings")->get("oauth_client_id") != trim(Html::escape($_POST["client_id"])))) {
goto bl;
}
$I4 = array("status" => "error", "http_code" => "401", "error" => "INVALID_CLIENT_ID", "error_description" => "Invalid Client ID.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
bl:
if (!(empty(trim(Html::escape($_POST["username"]))) || trim(Html::escape($_POST["username"])) == '')) {
goto lP;
}
$I4 = array("status" => "error", "http_code" => "400", "error" => "MISSING_USERNAME", "error_description" => "No Username found in request.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
lP:
$ZU = trim(Html::escape($_POST["username"]));
if ($yC === "password") {
goto gs;
}
if (!(\Drupal::config("rest_api_authentication.settings")->get("oauth_client_secret") != trim(Html::escape($_POST["client_secret"])))) {
goto xb;
}
$I4 = array("status" => "error", "http_code" => "401", "error" => "INVALID_CLIENT_SECRET", "error_description" => "Invalid Client Secret.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
xb:
goto nY;
gs:
if (\Drupal::service("user.auth")->authenticate($ZU, trim(Html::escape($_POST["password"])))) {
goto U3;
}
$I4 = array("status" => "error", "http_code" => "401", "error" => "INVALID_CREDENTIALS", "error_description" => "Invalid username or password.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
U3:
nY:
$user = user_load_by_name($ZU);
if (!empty($user)) {
goto lK;
}
$I4 = array("status" => "error", "http_code" => "404", "error" => "INVALID_USERNAME", "error_description" => "The account associated with the provided username is not found in the Drupal site.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
goto ps;
lK:
$hD = $user->id();
$WP["status"] = "SUCCESS";
$WP["user"] = $hD;
$x0 = Utilities::generateRandom(255);
$Dn = time();
$ew = DBQueries::checkUser($hD);
if (!($ew == FALSE)) {
goto q0;
}
DBQueries::insert_user_in_table($hD);
q0:
$R9 = DBQueries::insert_access_token_with_user_id($hD, $x0, $Dn);
$pI = \Drupal::config("rest_api_authentication.settings")->get("token_expiry");
$pI = empty($pI) ? "60" : $pI;
$Th = array("code" => 200, "status" => "SUCCESS", "token_type" => "Bearer", "access_token" => $x0, "expires_in" => $pI . " minutes");
echo json_encode($Th, JSON_PRETTY_PRINT);
http_response_code($Th["code"]);
ps:
exit;
return new Response();
}
public static function generateToken(Request $jl)
{
global $base_url;
if (!($jl->getMethod() !== "POST")) {
goto V7;
}
$I4 = array("status" => "error", "http_code" => "405", "error" => "INVALID_HTTP_METHOD", "error_description" => "The used HTTP method should be a POST.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
V7:
$kA = $jl->headers->get("AUTHORIZATION") != null ? $jl->headers->get("AUTHORIZATION") : $jl->headers->get("AUTHORISATION");
$kA = Html::escape($kA);
$XP = explode(" ", $kA);
$Gc = $XP[1];
$Bj = base64_decode($Gc);
$dD = explode(":", $Bj);
if (!(isset($dD[0]) && isset($dD[1]))) {
goto dF;
}
$ZU = $dD[0];
$WL = $dD[1];
if (\Drupal::service("user.auth")->authenticate($ZU, $WL)) {
goto oa;
}
$I4 = array("status" => "error", "http_code" => "401", "error" => "INVALID_CREDENTIALS", "error_description" => "Invalid username or password.");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["http_code"]);
exit;
oa:
$user = user_load_by_name($ZU);
$Z9 = $user->id();
$WP["status"] = "SUCCESS";
$WP["user"] = $Z9;
$Pt = $user->getEmail();
$hB = Utilities::generateRandom(30);
$gs = Utilities::generateRandom(30);
$SD = \Drupal::config("rest_api_authentication.settings")->get("token_expiry");
$SD = empty($SD) ? strtotime("+3600 seconds") : time() + $SD * 60;
$RV = ["alg" => "RS256", "typ" => "JWT"];
$SF = array("iss" => $base_url, "sub" => $Z9, "aud" => $gs, "nonce" => $hB, "iat" => time(), "name" => $ZU, "email" => $Pt, "exp" => $SD);
$VV = base64_encode(json_encode($RV));
$Kv = base64_encode(json_encode($SF));
$NZ = $VV . "." . $Kv;
$bN = str_replace("Controller", '', dirname(__FILE__));
$k1 = $bN . "Resources\privateKey.rsa";
$XY = file_get_contents($k1);
openssl_sign($NZ, $Vw, $XY, OPENSSL_ALGO_SHA256);
$YP = $NZ . "." . base64_encode($Vw);
$pI = \Drupal::config("rest_api_authentication.settings")->get("token_expiry");
$pI = empty($pI) ? "60 minutes" : $pI . " minutes";
$Th = array("id_token" => urlencode($YP), "expires_in" => $pI);
$Dn = time();
$ew = DBQueries::checkUser($Z9);
if (!($ew == FALSE)) {
goto Lm;
}
DBQueries::insert_user_in_table($Z9);
Lm:
$XN = DBQueries::insert_id_token_with_user_id($Z9, $YP, $Dn);
echo json_encode($Th, JSON_PRETTY_PRINT);
exit;
dF:
echo json_encode("The request is incomplete.");
exit;
return new Response();
}
public static function moRestAPILicenseFetch()
{
global $base_url;
$Ii = \Drupal::config("rest_api_authentication.settings");
$F2 = \Drupal::configFactory()->getEditable("rest_api_authentication.settings");
$xt = $Ii->get("rest_api_authentication_customer_admin_email");
$Ub = new MiniorangeRestAPICustomer($xt, null);
$hy = json_decode($Ub->ccl());
if ($hy->status == "SUCCESS") {
goto AG;
}
$Q9 = t("Failed to fetch update");
$hk = "error";
goto fK;
AG:
$F2->set("mo_last_license_fetch_time", time())->save();
$F2->set("rest_api_authentication_auth_licenseExpiry", $hy->licenseExpiry)->save();
$F2->set("rest_api_authentication_supportExpiry", $hy->supportExpiry)->save();
$Q9 = t("Successfully fetched the update");
$hk = "status";
fK:
if ($hk == "status") {
goto ua;
}
\Drupal::messenger()->addError($Q9);
goto Cf;
ua:
\Drupal::messenger()->addStatus($Q9);
Cf:
$Yk = new RedirectResponse($base_url . "/admin/config/people/rest_api_authentication/customer_setup");
$Yk->send();
return new Response();
}
public function openCustomerRequestForm()
{
$Yk = new AjaxResponse();
$Ty = $this->formBuilder->getForm("\Drupal\rest_api_authentication\Form\MoRestApiCustomerRequest");
$Yk->addCommand(new OpenModalDialogCommand("Contact miniOrange Support", $Ty, ["width" => "45%"]));
return $Yk;
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Drupal\rest_api_authentication\Controller;
use Drupal\Core\Ajax\AjaxResponse;
use Drupal\Core\Ajax\OpenModalDialogCommand;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Form\FormBuilder;
use Drupal\user\Entity\User;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\HttpFoundation\Response;
use Drupal\rest_api_authentication\DBQueries;
use Drupal\rest_api_authentication\handler;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\Component\Utility\Html;
use Drupal\rest_api_authentication\Utilities;
use Drupal\Core\Access\AccessResult;
use Symfony\Component\HttpFoundation\Request;
use Drupal\Core\Session\AccountInterface;
use Drupal\rest_api_authentication\MiniorangeRestAPICustomer;
class rest_api_authenticationController extends ControllerBase
{
protected $formBuilder;
public function __construct(FormBuilder $G3)
{
$this->formBuilder = $G3;
}
public static function create(ContainerInterface $Hq)
{
return new static($Hq->get("\x66\x6f\x72\155\x5f\x62\165\x69\x6c\144\x65\x72"));
}
public function rest_api_authentication_access_token(Request $jl)
{
if (!($jl->getMethod() !== "\x50\117\x53\124")) {
goto De;
}
$I4 = array("\163\164\141\x74\x75\163" => "\x65\x72\x72\157\x72", "\x68\164\x74\x70\x5f\143\157\x64\x65" => "\x34\60\x35", "\145\162\162\x6f\162" => "\x49\x4e\x56\x41\x4c\111\x44\137\x48\124\124\x50\137\115\x45\124\110\x4f\x44", "\x65\162\x72\157\x72\x5f\x64\145\163\143\x72\x69\160\x74\x69\x6f\x6e" => "\x54\150\x65\40\x75\163\x65\144\40\x48\124\x54\120\x20\x6d\x65\164\150\157\144\x20\x73\150\x6f\x75\x6c\x64\x20\142\x65\40\141\40\120\x4f\123\124\56");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\x68\164\x74\x70\137\143\x6f\x64\x65"]);
exit;
De:
$yC = trim(Html::escape($_POST["\x67\x72\x61\x6e\x74\x5f\x74\171\x70\145"]));
if (!($yC != "\x70\x61\163\163\x77\157\162\x64" && $yC != "\143\154\x69\x65\x6e\x74\x5f\x63\x72\x65\x64\x65\x6e\x74\x69\x61\x6c\163")) {
goto zz;
}
$I4 = array("\163\x74\141\164\x75\x73" => "\x65\162\162\x6f\162", "\150\164\164\x70\x5f\x63\157\x64\145" => "\64\60\61", "\145\162\162\157\162" => "\111\116\126\x41\x4c\x49\104\137\x47\122\x41\116\124\137\x54\131\x50\105", "\x65\x72\162\x6f\x72\137\144\x65\163\x63\x72\x69\160\x74\x69\x6f\x6e" => "\x54\x68\145\40\x75\x73\x65\144\40\x67\x72\x61\156\164\40\164\x79\x70\145\40\163\x68\157\165\x6c\x64\40\x62\x65\40\160\x61\163\x73\x77\x6f\x72\144\x20\x6f\162\x20\143\x6c\151\x65\x6e\164\137\x63\162\x65\x64\145\156\164\151\x61\x6c\x73\x2e");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\150\164\164\160\137\143\157\x64\x65"]);
exit;
zz:
if (!(\Drupal::config("\x72\145\x73\x74\137\x61\160\151\137\141\165\x74\150\x65\156\x74\x69\143\141\164\x69\157\156\x2e\x73\x65\x74\x74\x69\156\x67\x73")->get("\x6f\x61\165\x74\150\x5f\143\154\x69\x65\156\164\x5f\x69\144") != trim(Html::escape($_POST["\x63\154\151\145\x6e\164\137\151\144"])))) {
goto bl;
}
$I4 = array("\163\x74\x61\164\x75\163" => "\145\162\162\x6f\x72", "\150\164\164\x70\137\143\157\x64\145" => "\64\60\x31", "\145\x72\162\x6f\x72" => "\x49\x4e\126\101\x4c\x49\x44\x5f\x43\x4c\111\x45\116\x54\x5f\x49\x44", "\x65\x72\162\x6f\x72\x5f\x64\x65\163\143\162\151\160\164\x69\x6f\156" => "\111\156\166\x61\x6c\x69\144\40\103\x6c\151\x65\x6e\x74\x20\x49\104\56");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\150\x74\164\160\137\x63\157\144\145"]);
exit;
bl:
if (!(empty(trim(Html::escape($_POST["\165\163\145\162\156\x61\x6d\145"]))) || trim(Html::escape($_POST["\x75\163\x65\162\156\x61\155\x65"])) == '')) {
goto lP;
}
$I4 = array("\x73\x74\141\164\165\163" => "\145\x72\x72\x6f\162", "\150\x74\164\160\137\x63\157\x64\145" => "\x34\x30\60", "\145\x72\162\157\162" => "\115\111\123\123\x49\x4e\107\x5f\x55\123\x45\122\x4e\101\x4d\x45", "\x65\162\x72\157\162\137\x64\x65\x73\x63\x72\151\x70\x74\151\x6f\x6e" => "\x4e\x6f\40\x55\x73\145\162\156\x61\x6d\x65\x20\146\x6f\x75\x6e\x64\x20\151\156\x20\x72\x65\161\165\x65\x73\164\56");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\150\x74\164\160\x5f\143\x6f\x64\145"]);
exit;
lP:
$ZU = trim(Html::escape($_POST["\x75\163\145\162\156\x61\155\145"]));
if ($yC === "\x70\141\x73\x73\167\157\x72\144") {
goto gs;
}
if (!(\Drupal::config("\162\145\x73\164\137\141\x70\151\x5f\x61\x75\164\150\x65\x6e\x74\x69\x63\141\x74\x69\x6f\x6e\x2e\x73\145\x74\164\151\156\x67\x73")->get("\x6f\x61\x75\x74\150\x5f\143\x6c\151\145\156\x74\x5f\163\x65\x63\162\x65\164") != trim(Html::escape($_POST["\x63\154\x69\145\156\164\x5f\163\145\x63\x72\x65\x74"])))) {
goto xb;
}
$I4 = array("\163\x74\141\164\x75\x73" => "\145\162\162\157\162", "\x68\x74\x74\160\137\143\x6f\x64\145" => "\x34\x30\61", "\145\x72\x72\x6f\162" => "\x49\116\x56\x41\x4c\111\104\x5f\103\114\x49\105\x4e\x54\137\x53\105\x43\122\x45\124", "\x65\x72\x72\x6f\162\x5f\144\x65\x73\143\x72\151\x70\164\151\x6f\x6e" => "\111\156\x76\x61\154\x69\x64\40\103\154\151\x65\x6e\164\40\123\145\x63\162\x65\164\x2e");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\x68\164\164\x70\x5f\143\157\x64\x65"]);
exit;
xb:
goto nY;
gs:
if (\Drupal::service("\x75\x73\x65\x72\x2e\x61\x75\x74\150")->authenticate($ZU, trim(Html::escape($_POST["\160\141\x73\163\x77\x6f\x72\144"])))) {
goto U3;
}
$I4 = array("\x73\164\141\164\165\x73" => "\x65\x72\x72\x6f\162", "\150\x74\164\x70\x5f\x63\x6f\144\145" => "\64\60\x31", "\145\162\x72\157\x72" => "\111\x4e\126\x41\114\x49\104\x5f\x43\122\105\x44\105\x4e\124\x49\101\114\x53", "\x65\162\x72\x6f\162\x5f\144\x65\163\143\162\151\x70\164\151\157\x6e" => "\x49\x6e\166\141\154\151\144\40\x75\x73\145\162\156\x61\x6d\x65\40\157\x72\x20\160\141\x73\x73\167\157\x72\144\56");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\150\x74\164\x70\x5f\143\x6f\144\145"]);
exit;
U3:
nY:
$user = user_load_by_name($ZU);
if (!empty($user)) {
goto lK;
}
$I4 = array("\x73\x74\141\164\165\163" => "\145\x72\x72\157\x72", "\150\164\x74\x70\x5f\x63\x6f\x64\x65" => "\64\x30\x34", "\x65\162\x72\157\x72" => "\x49\116\x56\x41\x4c\111\x44\137\x55\x53\105\122\116\x41\x4d\105", "\x65\162\162\x6f\x72\137\144\x65\163\143\x72\x69\160\x74\151\x6f\x6e" => "\x54\x68\x65\40\x61\x63\x63\x6f\x75\x6e\164\x20\141\x73\163\x6f\143\x69\x61\164\x65\144\x20\167\151\164\x68\x20\x74\150\x65\x20\x70\162\x6f\166\x69\x64\x65\144\40\165\163\x65\162\156\141\x6d\x65\x20\151\163\40\156\x6f\x74\x20\146\157\165\156\144\40\151\x6e\40\164\x68\x65\40\104\x72\x75\160\x61\x6c\40\x73\x69\x74\145\x2e");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\x68\164\x74\x70\137\143\x6f\144\x65"]);
goto ps;
lK:
$hD = $user->id();
$WP["\163\164\x61\164\x75\x73"] = "\123\x55\x43\103\105\x53\x53";
$WP["\165\163\145\162"] = $hD;
$x0 = Utilities::generateRandom(255);
$Dn = time();
$ew = DBQueries::checkUser($hD);
if (!($ew == FALSE)) {
goto q0;
}
DBQueries::insert_user_in_table($hD);
q0:
$R9 = DBQueries::insert_access_token_with_user_id($hD, $x0, $Dn);
$pI = \Drupal::config("\x72\145\163\x74\137\141\160\x69\137\141\x75\164\150\145\156\x74\151\143\141\x74\151\x6f\x6e\56\x73\145\164\x74\151\156\x67\x73")->get("\164\157\153\x65\x6e\137\x65\x78\x70\151\x72\171");
$pI = empty($pI) ? "\66\60" : $pI;
$Th = array("\143\x6f\144\x65" => 200, "\163\164\x61\164\165\x73" => "\x53\125\103\x43\x45\123\123", "\164\x6f\x6b\145\156\137\164\x79\160\x65" => "\102\145\141\162\x65\162", "\x61\x63\x63\x65\x73\163\x5f\x74\x6f\x6b\x65\x6e" => $x0, "\x65\x78\x70\x69\162\x65\x73\137\151\x6e" => $pI . "\40\x6d\151\156\x75\164\145\x73");
echo json_encode($Th, JSON_PRETTY_PRINT);
http_response_code($Th["\143\157\144\x65"]);
ps:
exit;
return new Response();
}
public static function generateToken(Request $jl)
{
global $base_url;
if (!($jl->getMethod() !== "\120\x4f\x53\124")) {
goto V7;
}
$I4 = array("\x73\x74\141\x74\165\163" => "\x65\x72\162\157\x72", "\x68\x74\164\x70\x5f\x63\157\x64\x65" => "\64\60\65", "\145\x72\x72\x6f\x72" => "\111\x4e\x56\101\x4c\x49\x44\137\x48\x54\124\x50\x5f\x4d\x45\124\110\x4f\104", "\x65\162\162\157\x72\137\x64\145\x73\143\x72\151\160\x74\151\157\156" => "\x54\150\145\x20\x75\163\x65\144\40\x48\x54\124\x50\x20\155\x65\x74\150\x6f\x64\40\x73\150\157\165\x6c\144\x20\142\145\x20\141\40\120\117\x53\124\56");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\x68\164\x74\x70\x5f\143\x6f\144\x65"]);
exit;
V7:
$kA = $jl->headers->get("\101\125\x54\x48\x4f\x52\111\132\x41\124\x49\117\116") != null ? $jl->headers->get("\x41\x55\x54\x48\117\122\x49\x5a\101\124\111\x4f\x4e") : $jl->headers->get("\101\125\x54\110\x4f\x52\x49\123\101\124\111\x4f\x4e");
$kA = Html::escape($kA);
$XP = explode("\40", $kA);
$Gc = $XP[1];
$Bj = base64_decode($Gc);
$dD = explode("\x3a", $Bj);
if (!(isset($dD[0]) && isset($dD[1]))) {
goto dF;
}
$ZU = $dD[0];
$WL = $dD[1];
if (\Drupal::service("\x75\163\x65\162\x2e\141\x75\x74\x68")->authenticate($ZU, $WL)) {
goto oa;
}
$I4 = array("\x73\164\141\164\165\163" => "\145\162\162\x6f\162", "\150\164\164\160\x5f\143\157\144\145" => "\x34\60\x31", "\145\x72\x72\157\162" => "\x49\x4e\126\101\x4c\111\104\x5f\x43\122\x45\x44\105\x4e\x54\x49\x41\x4c\123", "\145\162\162\157\x72\137\144\x65\163\x63\162\151\x70\x74\151\157\x6e" => "\x49\x6e\166\x61\154\x69\x64\40\165\163\x65\162\x6e\141\x6d\145\x20\157\162\x20\160\x61\x73\163\167\x6f\162\144\56");
echo json_encode($I4, JSON_PRETTY_PRINT);
http_response_code($I4["\150\164\x74\x70\x5f\x63\157\144\145"]);
exit;
oa:
$user = user_load_by_name($ZU);
$Z9 = $user->id();
$WP["\x73\x74\141\164\165\x73"] = "\x53\x55\103\103\x45\x53\x53";
$WP["\165\163\x65\162"] = $Z9;
$Pt = $user->getEmail();
$hB = Utilities::generateRandom(30);
$gs = Utilities::generateRandom(30);
$SD = \Drupal::config("\162\145\163\x74\137\141\160\151\x5f\x61\165\164\x68\x65\156\x74\x69\x63\141\x74\151\157\x6e\56\163\145\x74\164\x69\x6e\x67\x73")->get("\164\x6f\153\145\156\x5f\x65\x78\160\x69\x72\x79");
$SD = empty($SD) ? strtotime("\x2b\x33\66\60\x30\x20\163\145\x63\x6f\x6e\144\163") : time() + $SD * 60;
$RV = ["\141\154\147" => "\x52\123\62\65\66", "\x74\x79\160" => "\x4a\x57\124"];
$SF = array("\151\163\163" => $base_url, "\x73\x75\x62" => $Z9, "\x61\x75\144" => $gs, "\156\157\x6e\x63\x65" => $hB, "\151\141\164" => time(), "\156\141\x6d\x65" => $ZU, "\145\155\141\x69\154" => $Pt, "\145\170\x70" => $SD);
$VV = base64_encode(json_encode($RV));
$Kv = base64_encode(json_encode($SF));
$NZ = $VV . "\x2e" . $Kv;
$bN = str_replace("\103\x6f\x6e\x74\162\157\x6c\154\145\162", '', dirname(__FILE__));
$k1 = $bN . "\x52\145\163\x6f\x75\162\x63\x65\x73\x5c\x70\x72\x69\x76\x61\164\x65\113\x65\x79\56\162\x73\x61";
$XY = file_get_contents($k1);
openssl_sign($NZ, $Vw, $XY, OPENSSL_ALGO_SHA256);
$YP = $NZ . "\56" . base64_encode($Vw);
$pI = \Drupal::config("\162\145\163\164\137\141\160\x69\137\141\165\164\x68\145\x6e\164\151\x63\x61\164\151\157\x6e\x2e\163\x65\x74\x74\151\x6e\x67\x73")->get("\164\157\x6b\x65\156\x5f\x65\x78\160\x69\x72\x79");
$pI = empty($pI) ? "\66\60\x20\x6d\x69\156\x75\x74\x65\x73" : $pI . "\x20\x6d\x69\156\165\164\145\163";
$Th = array("\x69\144\x5f\164\157\153\145\x6e" => urlencode($YP), "\145\170\x70\x69\162\x65\x73\x5f\x69\x6e" => $pI);
$Dn = time();
$ew = DBQueries::checkUser($Z9);
if (!($ew == FALSE)) {
goto Lm;
}
DBQueries::insert_user_in_table($Z9);
Lm:
$XN = DBQueries::insert_id_token_with_user_id($Z9, $YP, $Dn);
echo json_encode($Th, JSON_PRETTY_PRINT);
exit;
dF:
echo json_encode("\124\150\145\x20\x72\145\161\x75\145\163\164\x20\x69\163\40\x69\156\143\x6f\x6d\160\x6c\x65\x74\145\56");
exit;
return new Response();
}
public static function moRestAPILicenseFetch()
{
global $base_url;
$Ii = \Drupal::config("\162\x65\x73\164\137\141\160\151\x5f\141\165\x74\x68\x65\156\164\151\143\141\x74\151\x6f\x6e\56\x73\x65\164\164\x69\x6e\x67\163");
$F2 = \Drupal::configFactory()->getEditable("\162\x65\163\164\x5f\141\160\151\x5f\x61\x75\x74\150\x65\156\x74\x69\143\141\164\151\157\x6e\x2e\163\x65\x74\164\x69\x6e\147\x73");
$xt = $Ii->get("\x72\145\x73\x74\x5f\141\x70\151\137\x61\x75\164\x68\x65\x6e\164\x69\x63\141\164\x69\x6f\x6e\137\143\165\163\x74\x6f\x6d\x65\x72\137\141\x64\155\x69\x6e\137\x65\155\141\151\154");
$Ub = new MiniorangeRestAPICustomer($xt, null);
$hy = json_decode($Ub->ccl());
if ($hy->status == "\x53\125\103\x43\x45\x53\x53") {
goto AG;
}
$Q9 = t("\x46\141\151\x6c\x65\144\40\164\x6f\40\x66\x65\x74\143\150\40\165\x70\x64\x61\164\145");
$hk = "\x65\x72\x72\x6f\162";
goto fK;
AG:
$F2->set("\x6d\157\137\x6c\141\163\x74\137\x6c\151\x63\x65\x6e\163\x65\x5f\146\145\164\143\150\x5f\164\x69\155\145", time())->save();
$F2->set("\162\x65\163\164\x5f\x61\160\x69\x5f\x61\165\x74\150\145\x6e\x74\x69\x63\x61\164\x69\x6f\156\x5f\x61\x75\164\x68\137\x6c\x69\143\145\x6e\x73\145\105\x78\x70\x69\x72\x79", $hy->licenseExpiry)->save();
$F2->set("\162\145\163\164\137\141\160\151\137\141\x75\164\x68\x65\x6e\x74\x69\x63\141\x74\151\157\156\137\x73\165\x70\160\x6f\x72\164\x45\x78\x70\151\x72\x79", $hy->supportExpiry)->save();
$Q9 = t("\123\165\143\x63\145\x73\163\x66\x75\x6c\x6c\171\x20\146\145\164\143\x68\x65\x64\40\x74\150\145\x20\165\160\144\141\x74\x65");
$hk = "\163\164\x61\164\165\163";
fK:
if ($hk == "\x73\x74\141\164\165\163") {
goto ua;
}
\Drupal::messenger()->addError($Q9);
goto Cf;
ua:
\Drupal::messenger()->addStatus($Q9);
Cf:
$Yk = new RedirectResponse($base_url . "\x2f\141\144\155\151\x6e\x2f\143\x6f\x6e\146\x69\x67\57\160\x65\x6f\x70\x6c\145\57\162\145\163\164\137\x61\160\x69\x5f\141\x75\x74\x68\x65\x6e\164\151\143\141\164\151\157\156\57\143\x75\x73\164\157\155\x65\162\x5f\163\x65\164\165\160");
$Yk->send();
return new Response();
}
public function openCustomerRequestForm()
{
$Yk = new AjaxResponse();
$Ty = $this->formBuilder->getForm("\134\x44\162\165\x70\x61\x6c\134\162\145\x73\x74\137\141\160\151\x5f\x61\165\x74\x68\145\156\x74\151\x63\x61\164\x69\157\x6e\x5c\106\x6f\x72\155\x5c\115\x6f\122\145\163\164\101\x70\x69\x43\x75\x73\x74\157\155\145\162\122\x65\x71\x75\x65\163\x74");
$Yk->addCommand(new OpenModalDialogCommand("\x43\x6f\156\164\x61\143\x74\x20\155\x69\x6e\x69\117\162\141\x6e\x67\x65\40\123\x75\160\160\157\162\164", $Ty, ["\167\151\144\164\150" => "\64\65\45"]));
return $Yk;
}
}
Function Calls
None |
Stats
MD5 | 232e99445c548994e642a9c74156eedc |
Eval Count | 0 |
Decode Time | 78 ms |