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\ldap_auth; use GuzzleHttp\Exception\RequestException; clas..

Decoded Output download

<?php 
 
 
namespace Drupal\ldap_auth; 
 
use GuzzleHttp\Exception\RequestException; 
class MiniorangeLDAPCustomer 
{ 
    public $email; 
    public $phone; 
    public $customerKey; 
    public $transactionId; 
    public $password; 
    public $otpToken; 
    private $defaultCustomerId; 
    private $defaultCustomerApiKey; 
    public function __construct($OZ, $wz) 
    { 
        $this->email = $OZ; 
        $this->password = $wz; 
        $this->defaultCustomerId = "16555"; 
        $this->defaultCustomerApiKey = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq"; 
    } 
    public function verifyLicense($Ua) 
    { 
        $Xo = MiniorangeLDAPConstants::BASE_URL . "/moas/api/backupcode/verify"; 
        $Q_ = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_customer_id"); 
        $Uq = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_customer_api_key"); 
        global $base_url; 
        $N5 = round(microtime(TRUE) * 1000); 
        $Du = $Q_ . number_format($N5, 0, '', '') . $Uq; 
        $Vu = hash("sha512", $Du); 
        $lI = ''; 
        $lI = ["code" => $Ua, "customerKey" => $Q_, "additionalFields" => ["field1" => $base_url]]; 
        $mX = json_encode($lI); 
        try { 
            $cw = \Drupal::httpClient()->request("POST", $Xo, ["body" => $mX, "allow_redirects" => TRUE, "http_errors" => FALSE, "decode_content" => TRUE, "verify" => FALSE, "headers" => ["Content-Type" => "application/json", "Customer-Key" => $Q_, "Timestamp" => $N5, "Authorization" => $Vu]]); 
            return $cw->getBody()->getContents(); 
        } catch (RequestException $px) { 
            \Drupal::logger("ldap_auth")->notice("Error at %method of %file: %error", ["%method" => "checkCustomer", "%file" => "customer_setup.php", "%error" => $px->getMessage()]); 
        } 
    } 
    public function checkCustomer() 
    { 
        if (Utilities::isCurlInstalled()) { 
            goto yU; 
        } 
        return json_encode(["status" => "CURL_ERROR", "statusMessage" => "<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled."]); 
        yU: 
        $Xo = MiniorangeLDAPConstants::BASE_URL . "/moas/rest/customer/check-if-exists"; 
        $OZ = $this->email; 
        $lI = ["email" => $OZ]; 
        $mX = json_encode($lI); 
        try { 
            $cw = \Drupal::httpClient()->request("POST", $Xo, ["body" => $mX, "allow_redirects" => TRUE, "http_errors" => FALSE, "decode_content" => TRUE, "verify" => FALSE, "headers" => ["Content-Type" => "application/json", "Authorization" => "Basic"]]); 
            return [$cw->getStatusCode(), $cw->getBody()->getContents()]; 
        } catch (RequestException $px) { 
            \Drupal::logger("ldap_auth")->notice("Error at %method of %file: %error", ["%method" => "checkCustomer", "%file" => "customer_setup.php", "%error" => $px->getMessage()]); 
            return [$px->getCode(), $px->getMessage()]; 
        } 
    } 
    public function updateStatus() 
    { 
        $Xo = MiniorangeLDAPConstants::BASE_URL . "/moas/api/backupcode/updatestatus"; 
        $Q_ = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_customer_id"); 
        $Uq = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_customer_api_key"); 
        $N5 = round(microtime(TRUE) * 1000); 
        $Du = $Q_ . number_format($N5, 0, '', '') . $Uq; 
        $Vu = hash("sha512", $Du); 
        $Ua = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_license_key"); 
        $lI = ["code" => $Ua, "customerKey" => $Q_]; 
        $mX = json_encode($lI); 
        try { 
            $cw = \Drupal::httpClient()->request("POST", $Xo, ["body" => $mX, "allow_redirects" => TRUE, "http_errors" => FALSE, "decode_content" => TRUE, "verify" => FALSE, "headers" => ["Content-Type" => "application/json", "Customer-Key" => $Q_, "Timestamp" => $N5, "Authorization" => $Vu]]); 
            return $cw->getBody()->getContents(); 
        } catch (RequestException $px) { 
            echo "Request Error:" . $px->getMessage(); 
        } 
    } 
    public function getCustomerKeys() 
    { 
        if (Utilities::isCurlInstalled()) { 
            goto l5; 
        } 
        return json_encode(["apiKey" => "CURL_ERROR", "token" => "<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled."]); 
        l5: 
        $Xo = MiniorangeLDAPConstants::BASE_URL . "/moas/rest/customer/key"; 
        $OZ = $this->email; 
        $wz = $this->password; 
        $lI = ["email" => $OZ, "password" => $wz]; 
        $mX = json_encode($lI); 
        try { 
            $cw = \Drupal::httpClient()->request("POST", $Xo, ["body" => $mX, "allow_redirects" => TRUE, "http_errors" => FALSE, "decode_content" => TRUE, "verify" => FALSE, "headers" => ["Content-Type" => "application/json", "charset" => "UTF - 8", "Authorization" => "Basic"]]); 
            return $cw->getBody()->getContents(); 
        } catch (RequestException $px) { 
            \Drupal::logger("ldap_auth")->notice("Error at %method of %file: %error", ["%method" => "checkCustomer", "%file" => "customer_setup.php", "%error" => $px->getMessage()]); 
        } 
    } 
    public function ccl() 
    { 
        global $base_url; 
        $Xo = MiniorangeLDAPConstants::BASE_URL . "/moas/rest/customer/license"; 
        $Q_ = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_customer_id"); 
        $Uq = \Drupal::config("ldap_auth.settings")->get("miniorange_ldap_customer_api_key"); 
        $N5 = round(microtime(TRUE) * 1000); 
        $Du = $Q_ . number_format($N5, 0, '', '') . $Uq; 
        $Vu = hash("sha512", $Du); 
        $h5 = "Customer-Key: " . $Q_; 
        $ej = "Timestamp: " . number_format($N5, 0, '', ''); 
        $JO = "Authorization: " . $Vu; 
        $lI = ["customerId" => $Q_, "applicationName" => Utilities::GetPlanName()]; 
        $mX = json_encode($lI); 
        try { 
            $cw = \Drupal::httpClient()->request("POST", $Xo, ["body" => $mX, "allow_redirects" => TRUE, "http_errors" => FALSE, "decode_content" => TRUE, "verify" => FALSE, "headers" => ["Content-Type" => "application/json", "Customer-Key" => $Q_, "Timestamp" => $N5, "Authorization" => $Vu]]); 
            return $cw->getBody()->getContents(); 
        } catch (RequestException $px) { 
            echo "Request Error:" . $px->getMessage(); 
        } 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace Drupal\ldap_auth;

use GuzzleHttp\Exception\RequestException;
class MiniorangeLDAPCustomer
{
    public $email;
    public $phone;
    public $customerKey;
    public $transactionId;
    public $password;
    public $otpToken;
    private $defaultCustomerId;
    private $defaultCustomerApiKey;
    public function __construct($OZ, $wz)
    {
        $this->email = $OZ;
        $this->password = $wz;
        $this->defaultCustomerId = "\61\x36\x35\65\x35";
        $this->defaultCustomerApiKey = "\146\106\x64\62\130\143\x76\124\107\104\145\x6d\132\x76\142\x77\x31\142\x63\x55\x65\163\x4e\x4a\x57\105\x71\113\x62\x62\x55\161";
    }
    public function verifyLicense($Ua)
    {
        $Xo = MiniorangeLDAPConstants::BASE_URL . "\57\x6d\157\x61\x73\x2f\x61\x70\151\x2f\142\141\x63\x6b\165\x70\143\157\x64\x65\57\x76\x65\162\x69\x66\171";
        $Q_ = \Drupal::config("\154\144\x61\160\137\x61\x75\x74\x68\x2e\x73\x65\164\164\x69\156\x67\x73")->get("\155\x69\x6e\151\157\x72\x61\x6e\x67\x65\x5f\x6c\144\x61\160\x5f\143\x75\163\164\157\x6d\x65\162\x5f\x69\x64");
        $Uq = \Drupal::config("\154\144\141\160\x5f\x61\x75\164\x68\x2e\x73\145\164\x74\x69\156\x67\x73")->get("\155\x69\x6e\151\x6f\x72\x61\x6e\147\x65\137\x6c\144\x61\160\137\143\x75\x73\x74\x6f\155\x65\x72\x5f\x61\x70\x69\137\153\145\x79");
        global $base_url;
        $N5 = round(microtime(TRUE) * 1000);
        $Du = $Q_ . number_format($N5, 0, '', '') . $Uq;
        $Vu = hash("\163\150\141\x35\61\x32", $Du);
        $lI = '';
        $lI = ["\x63\157\x64\145" => $Ua, "\x63\165\163\164\157\155\x65\x72\113\x65\171" => $Q_, "\141\x64\144\x69\164\151\x6f\x6e\141\x6c\x46\151\145\154\x64\x73" => ["\x66\x69\x65\x6c\x64\x31" => $base_url]];
        $mX = json_encode($lI);
        try {
            $cw = \Drupal::httpClient()->request("\x50\117\x53\124", $Xo, ["\142\157\144\x79" => $mX, "\x61\x6c\154\157\x77\137\x72\145\x64\x69\x72\x65\x63\x74\x73" => TRUE, "\x68\164\164\x70\x5f\x65\162\162\157\x72\163" => FALSE, "\144\145\143\157\144\x65\137\x63\157\156\x74\x65\156\x74" => TRUE, "\166\145\162\151\x66\171" => FALSE, "\150\x65\x61\x64\x65\162\x73" => ["\103\157\156\x74\x65\x6e\164\x2d\x54\171\x70\145" => "\x61\160\160\x6c\151\143\x61\164\151\157\x6e\x2f\152\163\x6f\x6e", "\103\165\x73\164\x6f\155\145\162\55\113\x65\x79" => $Q_, "\x54\x69\x6d\x65\x73\x74\141\155\x70" => $N5, "\x41\x75\x74\150\x6f\x72\151\x7a\x61\x74\x69\x6f\156" => $Vu]]);
            return $cw->getBody()->getContents();
        } catch (RequestException $px) {
            \Drupal::logger("\154\144\x61\x70\137\x61\x75\164\x68")->notice("\x45\162\x72\x6f\162\x20\141\164\40\x25\x6d\145\164\150\x6f\144\x20\157\x66\40\45\x66\x69\154\145\x3a\x20\45\x65\x72\162\x6f\x72", ["\45\x6d\145\164\150\x6f\144" => "\x63\x68\145\x63\x6b\103\165\x73\164\x6f\155\x65\162", "\45\x66\x69\x6c\145" => "\143\165\163\x74\157\x6d\145\162\x5f\163\145\x74\x75\x70\x2e\x70\x68\x70", "\45\x65\162\x72\x6f\x72" => $px->getMessage()]);
        }
    }
    public function checkCustomer()
    {
        if (Utilities::isCurlInstalled()) {
            goto yU;
        }
        return json_encode(["\163\x74\x61\x74\x75\x73" => "\x43\x55\122\114\x5f\x45\122\x52\x4f\122", "\163\164\x61\164\x75\163\115\145\x73\163\141\147\x65" => "\x3c\141\x20\150\x72\145\146\x3d\x22\150\164\x74\x70\x3a\x2f\57\160\x68\160\x2e\156\x65\x74\57\155\x61\156\165\x61\154\57\x65\x6e\x2f\x63\x75\162\154\56\x69\x6e\163\164\x61\x6c\154\141\164\x69\x6f\x6e\56\160\x68\x70\x22\76\120\110\x50\x20\143\x55\122\114\40\x65\x78\x74\x65\x6e\x73\151\x6f\156\74\x2f\141\x3e\x20\151\163\40\x6e\x6f\164\x20\x69\x6e\163\164\x61\154\x6c\x65\144\x20\157\x72\40\x64\x69\x73\141\142\154\x65\144\56"]);
        yU:
        $Xo = MiniorangeLDAPConstants::BASE_URL . "\x2f\x6d\157\x61\163\57\x72\x65\x73\164\57\x63\x75\x73\164\157\x6d\145\162\57\143\x68\145\x63\x6b\x2d\x69\146\x2d\145\170\x69\x73\x74\x73";
        $OZ = $this->email;
        $lI = ["\145\155\141\x69\x6c" => $OZ];
        $mX = json_encode($lI);
        try {
            $cw = \Drupal::httpClient()->request("\x50\x4f\x53\x54", $Xo, ["\142\x6f\144\171" => $mX, "\x61\154\x6c\x6f\167\x5f\x72\x65\x64\151\162\145\143\x74\x73" => TRUE, "\150\x74\x74\160\x5f\145\162\162\157\x72\x73" => FALSE, "\x64\145\x63\157\144\145\x5f\143\157\x6e\164\145\x6e\164" => TRUE, "\166\x65\x72\151\x66\171" => FALSE, "\x68\145\x61\144\145\162\163" => ["\x43\x6f\156\164\x65\x6e\164\x2d\x54\x79\160\145" => "\141\160\160\154\x69\x63\141\164\151\x6f\156\57\152\163\157\x6e", "\x41\x75\x74\150\x6f\162\x69\x7a\x61\x74\151\x6f\x6e" => "\102\x61\163\151\143"]]);
            return [$cw->getStatusCode(), $cw->getBody()->getContents()];
        } catch (RequestException $px) {
            \Drupal::logger("\x6c\144\x61\x70\137\x61\165\164\150")->notice("\105\x72\162\x6f\x72\40\141\x74\x20\45\155\x65\x74\150\157\144\40\157\x66\40\45\146\151\x6c\145\x3a\x20\45\x65\162\x72\157\x72", ["\x25\x6d\x65\x74\150\157\144" => "\x63\x68\145\x63\x6b\x43\x75\x73\164\157\155\x65\x72", "\45\146\151\154\x65" => "\143\165\x73\164\x6f\155\145\x72\137\163\145\164\165\x70\x2e\160\150\x70", "\45\x65\x72\x72\157\x72" => $px->getMessage()]);
            return [$px->getCode(), $px->getMessage()];
        }
    }
    public function updateStatus()
    {
        $Xo = MiniorangeLDAPConstants::BASE_URL . "\x2f\x6d\x6f\x61\163\57\x61\160\x69\57\142\141\143\x6b\x75\160\143\157\144\x65\57\x75\x70\144\x61\164\x65\x73\x74\141\x74\x75\163";
        $Q_ = \Drupal::config("\x6c\144\141\160\137\141\x75\x74\x68\56\x73\145\x74\x74\x69\156\147\x73")->get("\155\151\156\x69\x6f\x72\141\156\147\145\x5f\154\x64\141\x70\137\x63\x75\163\x74\x6f\155\145\x72\x5f\x69\x64");
        $Uq = \Drupal::config("\x6c\144\x61\x70\x5f\x61\x75\164\150\x2e\163\x65\164\x74\151\156\x67\x73")->get("\x6d\x69\x6e\151\x6f\x72\141\156\147\x65\137\x6c\x64\x61\x70\137\143\x75\x73\x74\157\155\145\x72\137\141\x70\151\137\x6b\x65\x79");
        $N5 = round(microtime(TRUE) * 1000);
        $Du = $Q_ . number_format($N5, 0, '', '') . $Uq;
        $Vu = hash("\163\150\x61\x35\x31\62", $Du);
        $Ua = \Drupal::config("\x6c\144\141\x70\x5f\x61\165\x74\150\56\x73\145\164\x74\x69\156\x67\x73")->get("\155\x69\x6e\x69\x6f\x72\141\x6e\x67\x65\137\154\144\141\x70\x5f\154\x69\x63\145\156\163\145\x5f\153\x65\x79");
        $lI = ["\143\x6f\144\x65" => $Ua, "\143\165\163\164\157\155\145\x72\x4b\145\x79" => $Q_];
        $mX = json_encode($lI);
        try {
            $cw = \Drupal::httpClient()->request("\120\117\123\124", $Xo, ["\x62\157\144\171" => $mX, "\141\x6c\154\x6f\x77\137\x72\145\x64\x69\x72\145\143\164\163" => TRUE, "\x68\x74\164\160\137\x65\x72\162\157\162\x73" => FALSE, "\144\145\143\x6f\x64\145\x5f\x63\x6f\x6e\164\145\x6e\x74" => TRUE, "\166\x65\162\x69\x66\x79" => FALSE, "\x68\x65\x61\x64\145\x72\163" => ["\103\x6f\x6e\164\x65\x6e\x74\x2d\124\x79\160\x65" => "\x61\x70\160\154\x69\x63\141\x74\x69\x6f\156\x2f\152\x73\x6f\x6e", "\x43\x75\163\164\157\155\145\162\x2d\113\145\x79" => $Q_, "\124\151\x6d\x65\163\164\x61\x6d\160" => $N5, "\101\165\164\150\157\162\x69\172\x61\164\151\157\156" => $Vu]]);
            return $cw->getBody()->getContents();
        } catch (RequestException $px) {
            echo "\122\145\161\x75\x65\163\x74\x20\x45\162\x72\157\162\x3a" . $px->getMessage();
        }
    }
    public function getCustomerKeys()
    {
        if (Utilities::isCurlInstalled()) {
            goto l5;
        }
        return json_encode(["\x61\160\x69\113\145\x79" => "\x43\125\x52\114\x5f\x45\x52\x52\117\122", "\x74\x6f\153\x65\x6e" => "\x3c\x61\40\x68\162\145\146\x3d\42\150\164\164\160\x3a\57\x2f\x70\x68\160\x2e\x6e\145\x74\x2f\155\141\x6e\165\141\x6c\x2f\145\x6e\57\143\x75\x72\154\x2e\151\156\x73\x74\x61\154\154\x61\164\151\x6f\156\56\160\150\x70\x22\x3e\120\110\x50\x20\x63\125\x52\114\x20\x65\x78\x74\x65\x6e\163\x69\x6f\156\74\57\x61\x3e\40\151\x73\40\156\x6f\x74\40\x69\156\x73\164\141\154\154\145\144\x20\157\x72\x20\x64\151\x73\141\x62\154\x65\x64\56"]);
        l5:
        $Xo = MiniorangeLDAPConstants::BASE_URL . "\57\x6d\157\141\163\x2f\162\145\x73\164\57\x63\165\163\164\x6f\x6d\x65\x72\x2f\x6b\x65\171";
        $OZ = $this->email;
        $wz = $this->password;
        $lI = ["\145\x6d\141\151\154" => $OZ, "\x70\141\163\163\167\x6f\162\144" => $wz];
        $mX = json_encode($lI);
        try {
            $cw = \Drupal::httpClient()->request("\120\117\123\x54", $Xo, ["\x62\157\144\x79" => $mX, "\141\x6c\x6c\157\x77\137\162\145\144\151\162\145\143\x74\163" => TRUE, "\150\164\x74\x70\137\145\162\162\157\162\163" => FALSE, "\x64\x65\x63\157\x64\x65\x5f\x63\x6f\156\x74\x65\156\164" => TRUE, "\x76\x65\x72\151\x66\x79" => FALSE, "\x68\x65\141\x64\x65\x72\163" => ["\x43\157\156\x74\x65\x6e\164\x2d\x54\171\x70\145" => "\x61\x70\x70\154\151\143\141\x74\151\157\x6e\x2f\152\163\x6f\x6e", "\x63\x68\141\162\x73\145\x74" => "\x55\124\106\40\55\x20\70", "\x41\x75\164\150\157\162\151\172\x61\164\151\157\x6e" => "\x42\x61\163\x69\x63"]]);
            return $cw->getBody()->getContents();
        } catch (RequestException $px) {
            \Drupal::logger("\154\144\141\160\137\141\x75\164\150")->notice("\105\x72\x72\x6f\162\40\141\164\40\x25\x6d\x65\x74\x68\157\144\x20\x6f\146\x20\45\x66\151\154\x65\72\x20\45\145\162\x72\x6f\162", ["\x25\155\x65\164\150\x6f\x64" => "\x63\150\145\143\x6b\103\165\163\164\157\x6d\x65\x72", "\45\x66\151\154\x65" => "\x63\165\163\164\x6f\x6d\x65\162\x5f\x73\x65\x74\165\x70\x2e\x70\x68\x70", "\45\145\162\162\x6f\162" => $px->getMessage()]);
        }
    }
    public function ccl()
    {
        global $base_url;
        $Xo = MiniorangeLDAPConstants::BASE_URL . "\x2f\x6d\x6f\141\163\57\x72\x65\x73\x74\x2f\x63\165\163\x74\x6f\155\145\162\57\x6c\151\143\145\x6e\x73\x65";
        $Q_ = \Drupal::config("\154\144\x61\160\137\141\x75\164\x68\x2e\x73\x65\x74\164\x69\156\147\163")->get("\x6d\151\x6e\x69\157\x72\141\156\147\x65\x5f\x6c\144\x61\160\137\143\165\163\164\157\x6d\145\x72\x5f\151\144");
        $Uq = \Drupal::config("\x6c\144\141\x70\x5f\141\165\x74\150\56\163\145\x74\164\151\156\x67\x73")->get("\x6d\x69\156\x69\x6f\162\x61\156\147\145\x5f\x6c\144\x61\160\137\143\165\163\x74\157\x6d\145\162\137\141\160\151\137\153\145\x79");
        $N5 = round(microtime(TRUE) * 1000);
        $Du = $Q_ . number_format($N5, 0, '', '') . $Uq;
        $Vu = hash("\163\x68\141\65\61\62", $Du);
        $h5 = "\x43\165\163\x74\157\x6d\x65\162\x2d\113\x65\171\x3a\40" . $Q_;
        $ej = "\124\x69\x6d\x65\163\164\141\155\160\x3a\x20" . number_format($N5, 0, '', '');
        $JO = "\x41\x75\x74\x68\x6f\162\151\x7a\x61\x74\x69\157\156\x3a\40" . $Vu;
        $lI = ["\143\x75\x73\x74\157\155\x65\x72\111\x64" => $Q_, "\141\x70\x70\x6c\151\x63\x61\x74\151\x6f\156\x4e\141\x6d\145" => Utilities::GetPlanName()];
        $mX = json_encode($lI);
        try {
            $cw = \Drupal::httpClient()->request("\120\x4f\123\124", $Xo, ["\x62\157\144\171" => $mX, "\141\154\154\157\x77\137\x72\x65\144\151\162\145\x63\x74\x73" => TRUE, "\150\x74\x74\x70\x5f\x65\162\162\x6f\x72\x73" => FALSE, "\x64\145\143\157\144\145\x5f\143\157\156\x74\x65\156\164" => TRUE, "\166\x65\x72\x69\146\171" => FALSE, "\x68\145\x61\x64\145\162\x73" => ["\x43\x6f\156\164\x65\x6e\x74\55\124\171\x70\x65" => "\141\x70\x70\x6c\x69\x63\x61\x74\151\157\156\57\152\163\x6f\x6e", "\x43\165\x73\x74\x6f\x6d\145\162\55\x4b\x65\x79" => $Q_, "\x54\151\155\x65\x73\164\141\x6d\160" => $N5, "\101\165\164\x68\x6f\x72\x69\x7a\141\164\151\157\x6e" => $Vu]]);
            return $cw->getBody()->getContents();
        } catch (RequestException $px) {
            echo "\122\145\x71\165\x65\x73\164\x20\105\x72\162\157\x72\72" . $px->getMessage();
        }
    }
}

Function Calls

None

Variables

None

Stats

MD5 cf24b439f3b43677222255f3b9a0485e
Eval Count 0
Decode Time 63 ms