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 moApiIntegrator\API; use moApiIntegrator\Wrapper\wpWrapper; use R..

Decoded Output download

<?php 
 
 
namespace moApiIntegrator\API; 
 
use moApiIntegrator\Wrapper\wpWrapper; 
use Requests; 
class Authorization 
{ 
    private static $instance; 
    public static function getController() 
    { 
        if (isset(self::$instance)) { 
            goto yB; 
        } 
        $RN = __CLASS__; 
        self::$instance = new $RN(); 
        yB: 
        return self::$instance; 
    } 
    public function mo_azos_get_access_token_using_client_credentials($z0, $Oi, $Fj) 
    { 
        $cp = ["body" => ["grant_type" => "client_credentials", "client_secret" => $Oi["client_secret"], "client_id" => $Oi["client_id"], "scope" => $Fj], "headers" => ["Content-type" => "application/x-www-form-urlencoded"]]; 
        $Vx = wp_remote_post(esc_url_raw($z0["token"]), $cp); 
        if (is_wp_error($Vx)) { 
            goto t8; 
        } 
        $KU = json_decode($Vx["body"], true); 
        if (!isset($KU["access_token"])) { 
            goto jH; 
        } 
        return $KU["access_token"]; 
        jH: 
        goto iG; 
        t8: 
        $QW = $Vx->get_error_message(); 
        wp_die("Error Occurred : " . esc_html($QW)); 
        iG: 
        return false; 
    } 
    public function mo_sps_get_access_token_using_client_credentials($z0, $Oi) 
    { 
        $Nk = $Oi["admin_url"]; 
        $OY = wpWrapper::mo_api_sps_get_domain_from_url($Nk); 
        $cp = ["body" => ["grant_type" => "client_credentials", "client_secret" => $Oi["client_secret"], "client_id" => $Oi["client_id"] . "@" . $Oi["tenant_id"], "resource" => "00000003-0000-0ff1-ce00-000000000000/" . $OY . "@" . $Oi["tenant_id"]], "headers" => ["Content-type" => "application/x-www-form-urlencoded"]]; 
        $Vx = wp_remote_post(esc_url_raw($z0["sharepoint_token"]), $cp); 
        if (is_wp_error($Vx)) { 
            goto NK; 
        } 
        $KU = json_decode($Vx["body"], true); 
        if (!isset($KU["access_token"])) { 
            goto gK; 
        } 
        return $KU["access_token"]; 
        gK: 
        goto OH; 
        NK: 
        $QW = $Vx->get_error_message(); 
        wp_die("Error Occurred : " . esc_html($QW)); 
        OH: 
        return false; 
    } 
    public function mo_azos_get_request($Nk, $Qv = array()) 
    { 
        $cp = ["timeout" => 10, "headers" => $Qv]; 
        $Vx = wp_remote_get(esc_url_raw($Nk), $cp); 
        if (is_array($Vx) && !is_wp_error($Vx)) { 
            goto t3; 
        } 
        wp_die("Error occurred: " . esc_html($Vx->get_error_message())); 
        goto YU; 
        t3: 
        return json_decode($Vx["body"], true); 
        YU: 
    } 
    public function mo_azos_get_request_for_media($Nk, $Qv = array()) 
    { 
        $cp = ["headers" => $Qv]; 
        $Vx = wp_remote_get(esc_url_raw($Nk), $cp); 
        if (is_array($Vx) && !is_wp_error($Vx)) { 
            goto Qz; 
        } 
        wp_die("Error occurred: " . esc_html($Vx->get_error_message())); 
        goto yh; 
        Qz: 
        $IA = (array) json_decode($Vx["body"], true); 
        if (!array_key_exists("error", $IA)) { 
            goto oS; 
        } 
        return null; 
        oS: 
        return base64_encode($Vx["body"]); 
        yh: 
    } 
    public function mo_azos_post_request($Nk, $Qv, $KU) 
    { 
        $cp = ["body" => $KU, "headers" => $Qv]; 
        $Vx = wp_remote_post(esc_url_raw($Nk), $cp); 
        if (is_wp_error($Vx)) { 
            goto wn; 
        } 
        $KU = json_decode($Vx["body"], true); 
        return $KU; 
        goto ef; 
        wn: 
        $QW = $Vx->get_error_message(); 
        wp_die("Error Occurred : " . esc_html($QW)); 
        ef: 
        return false; 
    } 
    public function mo_azos_patch_request($Nk, $Qv, $KU) 
    { 
        $Vx = Requests::patch(esc_url_raw($Nk), $Qv, $KU); 
        if (is_wp_error($Vx)) { 
            goto y2; 
        } 
        $Vx = (array) $Vx; 
        $KU = json_decode($Vx["body"], true); 
        return $KU; 
        goto Tm; 
        y2: 
        $QW = $Vx->get_error_message(); 
        wp_die("Error Occurred : " . esc_html($QW)); 
        Tm: 
        return false; 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace moApiIntegrator\API;

use moApiIntegrator\Wrapper\wpWrapper;
use Requests;
class Authorization
{
    private static $instance;
    public static function getController()
    {
        if (isset(self::$instance)) {
            goto yB;
        }
        $RN = __CLASS__;
        self::$instance = new $RN();
        yB:
        return self::$instance;
    }
    public function mo_azos_get_access_token_using_client_credentials($z0, $Oi, $Fj)
    {
        $cp = ["\142\x6f\144\x79" => ["\x67\162\141\156\x74\x5f\164\x79\x70\145" => "\x63\154\x69\x65\x6e\164\137\143\x72\145\x64\145\x6e\x74\151\x61\x6c\163", "\x63\x6c\151\145\x6e\x74\x5f\x73\x65\x63\162\145\164" => $Oi["\x63\154\151\145\156\x74\x5f\163\145\x63\x72\x65\x74"], "\143\154\151\x65\156\164\x5f\151\x64" => $Oi["\143\x6c\x69\x65\x6e\x74\137\x69\x64"], "\x73\143\x6f\x70\x65" => $Fj], "\x68\x65\x61\x64\x65\x72\163" => ["\x43\x6f\x6e\x74\x65\156\x74\55\x74\x79\x70\145" => "\141\x70\160\154\151\x63\x61\x74\x69\157\x6e\57\x78\55\x77\x77\x77\55\x66\x6f\x72\155\55\165\x72\154\145\156\143\157\144\x65\144"]];
        $Vx = wp_remote_post(esc_url_raw($z0["\x74\157\153\x65\156"]), $cp);
        if (is_wp_error($Vx)) {
            goto t8;
        }
        $KU = json_decode($Vx["\142\x6f\144\171"], true);
        if (!isset($KU["\141\x63\143\x65\x73\x73\137\164\x6f\153\x65\x6e"])) {
            goto jH;
        }
        return $KU["\141\x63\143\x65\163\x73\x5f\x74\x6f\153\x65\156"];
        jH:
        goto iG;
        t8:
        $QW = $Vx->get_error_message();
        wp_die("\105\162\x72\x6f\162\x20\117\143\143\165\x72\x72\145\144\40\72\x20" . esc_html($QW));
        iG:
        return false;
    }
    public function mo_sps_get_access_token_using_client_credentials($z0, $Oi)
    {
        $Nk = $Oi["\141\x64\155\151\156\x5f\165\162\154"];
        $OY = wpWrapper::mo_api_sps_get_domain_from_url($Nk);
        $cp = ["\142\x6f\144\x79" => ["\147\x72\141\x6e\164\x5f\x74\x79\160\x65" => "\x63\x6c\x69\x65\x6e\x74\x5f\x63\x72\145\x64\x65\x6e\x74\x69\141\154\x73", "\x63\154\x69\x65\156\x74\137\x73\x65\x63\x72\145\164" => $Oi["\143\x6c\x69\x65\156\164\137\x73\x65\143\x72\145\164"], "\x63\x6c\151\145\x6e\164\137\x69\144" => $Oi["\143\x6c\151\145\156\x74\137\x69\144"] . "\100" . $Oi["\164\x65\x6e\x61\156\x74\x5f\151\x64"], "\162\x65\163\x6f\165\x72\143\145" => "\60\x30\60\x30\60\60\x30\x33\x2d\60\60\x30\x30\55\60\x66\x66\61\x2d\x63\x65\60\x30\55\60\60\x30\x30\x30\x30\60\60\x30\60\60\x30\57" . $OY . "\x40" . $Oi["\164\x65\156\x61\156\x74\x5f\151\144"]], "\x68\145\x61\144\145\x72\x73" => ["\103\x6f\156\x74\145\x6e\x74\x2d\x74\x79\x70\x65" => "\141\160\160\154\151\x63\141\x74\x69\x6f\156\x2f\x78\55\x77\167\167\x2d\x66\x6f\162\x6d\x2d\x75\x72\x6c\x65\x6e\143\157\144\145\x64"]];
        $Vx = wp_remote_post(esc_url_raw($z0["\x73\150\141\162\145\160\157\151\156\164\x5f\164\157\153\145\x6e"]), $cp);
        if (is_wp_error($Vx)) {
            goto NK;
        }
        $KU = json_decode($Vx["\x62\x6f\144\x79"], true);
        if (!isset($KU["\141\143\x63\x65\163\163\137\164\x6f\153\x65\156"])) {
            goto gK;
        }
        return $KU["\141\x63\x63\x65\x73\163\x5f\x74\x6f\153\x65\156"];
        gK:
        goto OH;
        NK:
        $QW = $Vx->get_error_message();
        wp_die("\105\x72\x72\157\162\x20\x4f\x63\143\x75\x72\x72\145\144\40\72\40" . esc_html($QW));
        OH:
        return false;
    }
    public function mo_azos_get_request($Nk, $Qv = array())
    {
        $cp = ["\x74\151\x6d\145\x6f\165\x74" => 10, "\150\145\141\x64\x65\162\163" => $Qv];
        $Vx = wp_remote_get(esc_url_raw($Nk), $cp);
        if (is_array($Vx) && !is_wp_error($Vx)) {
            goto t3;
        }
        wp_die("\x45\x72\x72\x6f\162\x20\157\143\x63\165\162\x72\x65\144\72\x20" . esc_html($Vx->get_error_message()));
        goto YU;
        t3:
        return json_decode($Vx["\142\157\144\171"], true);
        YU:
    }
    public function mo_azos_get_request_for_media($Nk, $Qv = array())
    {
        $cp = ["\150\145\141\x64\x65\x72\x73" => $Qv];
        $Vx = wp_remote_get(esc_url_raw($Nk), $cp);
        if (is_array($Vx) && !is_wp_error($Vx)) {
            goto Qz;
        }
        wp_die("\105\162\162\x6f\162\x20\x6f\143\x63\x75\162\162\x65\x64\x3a\x20" . esc_html($Vx->get_error_message()));
        goto yh;
        Qz:
        $IA = (array) json_decode($Vx["\x62\x6f\x64\171"], true);
        if (!array_key_exists("\x65\162\162\157\162", $IA)) {
            goto oS;
        }
        return null;
        oS:
        return base64_encode($Vx["\142\x6f\144\171"]);
        yh:
    }
    public function mo_azos_post_request($Nk, $Qv, $KU)
    {
        $cp = ["\142\x6f\144\x79" => $KU, "\150\145\x61\144\145\162\x73" => $Qv];
        $Vx = wp_remote_post(esc_url_raw($Nk), $cp);
        if (is_wp_error($Vx)) {
            goto wn;
        }
        $KU = json_decode($Vx["\142\x6f\144\x79"], true);
        return $KU;
        goto ef;
        wn:
        $QW = $Vx->get_error_message();
        wp_die("\x45\162\162\x6f\162\x20\x4f\x63\x63\165\x72\x72\145\x64\x20\72\x20" . esc_html($QW));
        ef:
        return false;
    }
    public function mo_azos_patch_request($Nk, $Qv, $KU)
    {
        $Vx = Requests::patch(esc_url_raw($Nk), $Qv, $KU);
        if (is_wp_error($Vx)) {
            goto y2;
        }
        $Vx = (array) $Vx;
        $KU = json_decode($Vx["\x62\157\144\171"], true);
        return $KU;
        goto Tm;
        y2:
        $QW = $Vx->get_error_message();
        wp_die("\x45\162\x72\x6f\x72\40\x4f\x63\x63\165\x72\x72\145\144\x20\72\x20" . esc_html($QW));
        Tm:
        return false;
    }
}

Function Calls

None

Variables

None

Stats

MD5 5fabd5b30ba5963907d976b66a523f7e
Eval Count 0
Decode Time 55 ms