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\miniorange_saml\EventSubscriber; use Drupal\miniorange_saml..

Decoded Output download

<?php 
 
 
namespace Drupal\miniorange_saml\EventSubscriber; 
 
use Drupal\miniorange_saml\Controller\miniorange_samlController; 
use Symfony\Component\HttpKernel\KernelEvents; 
use Symfony\Component\EventDispatcher\EventSubscriberInterface; 
use Symfony\Component\HttpFoundation\RedirectResponse; 
use Drupal\user\Entity\User; 
class InitSubscriber implements EventSubscriberInterface 
{ 
    public static function getSubscribedEvents() 
    { 
        return [KernelEvents::REQUEST => ["onEvent", 0]]; 
    } 
    public function onEvent() 
    { 
        $aC = \Drupal::config("miniorange_saml.settings")->get("miniorange_saml_force_auth"); 
        $GI = \Drupal::config("miniorange_saml.settings")->get("miniorange_saml_enable_login"); 
        $O7 = \Drupal::config("miniorange_saml.settings")->get("miniorange_saml_enable_backdoor"); 
        $UM = \Drupal::config("miniorange_saml.settings")->get("miniorange_saml_license_key"); 
        $bt = \Drupal::config("miniorange_saml.settings")->get("miniorange_saml_customer_api_key"); 
        if (!$GI) { 
            goto i4; 
        } 
        if ($O7 && isset($_GET["saml_login"]) && $_GET["saml_login"] == $bt) { 
            goto MX; 
        } 
        if (!($aC && !\Drupal::currentUser()->isAuthenticated() && !isset($_POST["SAMLResponse"]) && !isset($_POST["pass"]))) { 
            goto Sw; 
        } 
        $ia = "http://{$_SERVER["HTTP_HOST"]}{$_SERVER["REQUEST_URI"]}"; 
        \Drupal::configFactory()->getEditable("miniorange_saml.settings")->set("current_link", $ia)->save(); 
        miniorange_samlController::saml_login(); 
        Sw: 
        goto VE; 
        MX: 
        VE: 
        if (!($UM == NULL)) { 
            goto bw; 
        } 
        \Drupal::state()->delete("miniorange_saml_enable_login"); 
        \Drupal::state()->delete("miniorange_saml_force_auth"); 
        \Drupal::state()->delete("miniorange_saml_enable_backdoor"); 
        bw: 
        i4: 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace Drupal\miniorange_saml\EventSubscriber;

use Drupal\miniorange_saml\Controller\miniorange_samlController;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Drupal\user\Entity\User;
class InitSubscriber implements EventSubscriberInterface
{
    public static function getSubscribedEvents()
    {
        return [KernelEvents::REQUEST => ["\157\x6e\105\x76\x65\x6e\164", 0]];
    }
    public function onEvent()
    {
        $aC = \Drupal::config("\x6d\151\156\x69\157\x72\x61\156\x67\x65\137\x73\141\x6d\x6c\x2e\x73\x65\x74\x74\x69\156\147\x73")->get("\x6d\151\x6e\151\x6f\162\141\x6e\x67\145\137\163\x61\155\x6c\137\x66\x6f\162\x63\145\x5f\x61\x75\x74\x68");
        $GI = \Drupal::config("\155\x69\156\151\x6f\162\x61\156\147\x65\x5f\x73\x61\155\154\56\x73\x65\x74\x74\x69\x6e\147\163")->get("\155\151\x6e\151\157\x72\141\x6e\147\145\137\163\141\x6d\x6c\137\x65\x6e\141\142\154\145\x5f\x6c\157\147\x69\156");
        $O7 = \Drupal::config("\x6d\x69\x6e\151\x6f\x72\x61\x6e\x67\145\x5f\x73\x61\x6d\154\56\163\x65\164\164\151\x6e\147\x73")->get("\x6d\151\156\x69\157\x72\141\x6e\x67\x65\x5f\163\x61\155\x6c\137\x65\x6e\141\142\154\145\137\x62\141\x63\x6b\144\x6f\157\162");
        $UM = \Drupal::config("\x6d\151\156\151\157\x72\x61\156\x67\145\137\163\141\x6d\154\56\x73\x65\x74\x74\151\156\147\163")->get("\155\151\156\151\x6f\162\141\x6e\x67\145\137\x73\141\x6d\x6c\x5f\x6c\151\143\x65\x6e\163\145\137\x6b\x65\x79");
        $bt = \Drupal::config("\x6d\151\x6e\x69\157\162\x61\156\147\145\x5f\x73\x61\155\x6c\56\163\145\x74\164\x69\x6e\147\x73")->get("\155\151\x6e\x69\157\x72\141\x6e\147\x65\137\x73\141\x6d\154\137\x63\165\163\x74\157\155\145\162\137\141\160\x69\137\153\x65\171");
        if (!$GI) {
            goto i4;
        }
        if ($O7 && isset($_GET["\x73\141\155\x6c\x5f\154\157\x67\x69\x6e"]) && $_GET["\x73\141\155\x6c\x5f\154\157\x67\x69\156"] == $bt) {
            goto MX;
        }
        if (!($aC && !\Drupal::currentUser()->isAuthenticated() && !isset($_POST["\x53\x41\115\x4c\122\x65\x73\x70\x6f\x6e\163\x65"]) && !isset($_POST["\160\141\163\163"]))) {
            goto Sw;
        }
        $ia = "\150\x74\x74\x70\x3a\57\x2f{$_SERVER["\x48\124\x54\120\137\110\x4f\x53\x54"]}{$_SERVER["\x52\105\121\125\x45\x53\x54\x5f\125\x52\111"]}";
        \Drupal::configFactory()->getEditable("\155\151\x6e\x69\x6f\162\141\x6e\x67\145\137\x73\x61\x6d\x6c\56\x73\145\164\164\x69\x6e\147\x73")->set("\x63\x75\x72\162\145\156\164\137\x6c\151\156\153", $ia)->save();
        miniorange_samlController::saml_login();
        Sw:
        goto VE;
        MX:
        VE:
        if (!($UM == NULL)) {
            goto bw;
        }
        \Drupal::state()->delete("\155\x69\156\151\x6f\x72\141\x6e\x67\x65\137\163\141\x6d\x6c\137\145\156\x61\142\x6c\145\x5f\154\x6f\x67\151\x6e");
        \Drupal::state()->delete("\155\151\156\151\x6f\162\x61\x6e\x67\145\137\163\141\155\x6c\x5f\146\x6f\162\x63\145\137\141\x75\x74\150");
        \Drupal::state()->delete("\155\x69\x6e\x69\x6f\x72\x61\x6e\x67\145\137\x73\141\155\x6c\x5f\x65\156\x61\x62\154\145\x5f\142\x61\143\153\x64\157\157\162");
        bw:
        i4:
    }
}

Function Calls

None

Variables

None

Stats

MD5 3f3643c8e869c9194b3d949d13c9de8f
Eval Count 0
Decode Time 79 ms