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\Controller; use moApiIntegrator\API\azure; use mo..

Decoded Output download

<?php 
 
 
namespace moApiIntegrator\Controller; 
 
use moApiIntegrator\APIzure; 
use moApiIntegrator\Wrapper\pluginConstants; 
use moApiIntegrator\Wrapper\wpCron; 
use moApiIntegrator\Wrapper\wpWrapper; 
use WP_Batch; 
use WP_Batch_Item; 
if (!class_exists("WP_Batch")) { 
    goto L7; 
} 
class BatchProcess extends WP_Batch 
{ 
    public function setup() 
    { 
        switch ($this->id) { 
            case "sync_all_users": 
                $WI = get_option("mo_api_users_need_to_be_synced"); 
                if (empty($WI)) { 
                    goto xL; 
                } 
                $a2 = wpCron::getCron(); 
                $a2->setClient(); 
                $a2->setMapping(); 
                foreach ($WI as $At) { 
                    $this->push(new WP_Batch_Item($At, ["handler" => $a2])); 
                    FC: 
                } 
                RZ: 
                xL: 
                goto sg; 
            case "clear_unmatched_users": 
                $AQ = get_option("mo_api_users_need_to_be_cleared"); 
                $Gv = wpWrapper::mo_api_get_option(pluginConstants::client_config); 
                $h_ = isset($Gv["tenant_name"]) ? $Gv["tenant_name"] : ''; 
                $g9 = wpWrapper::mo_api_get_option(pluginConstants::list_of_users_added_to_delete); 
                if (!empty($g9)) { 
                    goto XK; 
                } 
                $g9 = []; 
                XK: 
                if (empty($AQ)) { 
                    goto wd; 
                } 
                $a2 = wpCron::getCron(); 
                $a2->setClient(); 
                $a2->setMapping(); 
                foreach ($AQ as $At) { 
                    $this->push(new WP_Batch_Item($At["username"], ["handler" => $a2, "useremail" => $At["useremail"], "tenant_name" => $h_, "list_to_delete" => $g9])); 
                    eC: 
                } 
                uy: 
                wd: 
                goto sg; 
            case "sync_users_to_ad": 
                $bz = get_option("mo_api_users_need_to_be_synced_to_ad"); 
                if (empty($bz)) { 
                    goto dS; 
                } 
                $w8 = wpWrapper::mo_api_get_option(pluginConstants::client_config); 
                $a2 = azure::getClient($w8); 
                if (!(!isset($w8["tenant_name"]) || isset($w8["tenant_name"]) && empty($w8["tenant_name"]))) { 
                    goto bC; 
                } 
                wpWrapper::mo_api__show_error_notice(esc_html__("Tenant name need to be configured in basic app configuration.")); 
                return; 
                bC: 
                foreach ($bz as $At) { 
                    $this->push(new WP_Batch_Item($At, ["handler" => $a2, "id" => username_exists($At)])); 
                    bm: 
                } 
                Uf: 
                dS: 
                goto sg; 
        } 
        cU: 
        sg: 
    } 
    public function process($kH) 
    { 
        switch ($this->id) { 
            case "sync_all_users": 
                $PN = $kH->get_value("handler")->getClient()->mo_azos_get_specific_user_detail($kH->id); 
                $DM = $kH->get_value("handler")->mo_api_process_user_details($PN); 
                if (!is_numeric($DM)) { 
                    goto s2; 
                } 
                return true; 
                s2: 
                return new \WP_Error($kH->id, "User skipped"); 
            case "clear_unmatched_users": 
                if (!empty($kH->get_value("useremail"))) { 
                    goto H8; 
                } 
                return true; 
                H8: 
                $n1 = $kH->get_value("handler")->getClient()->check_if_user_present_in_ad($kH->id, $kH->get_value("useremail"), $kH->get_value("tenant_name")); 
                if (!$n1) { 
                    goto mz; 
                } 
                return true; 
                mz: 
                $n3 = username_exists($kH->id); 
                if (is_numeric($n3)) { 
                    goto IW; 
                } 
                $n3 = email_exists($kH->get_value("useremail")); 
                IW: 
                $g9 = $kH->get_value("list_to_delete"); 
                $g9[] = ["email" => $kH->get_value("useremail"), "user_id" => $n3]; 
                wpWrapper::mo_api_set_option(pluginConstants::list_of_users_added_to_delete, $g9); 
                return new \WP_Error($kH->id, "will be deleted"); 
            case "sync_users_to_ad": 
                $PN = get_user_by("id", $kH->get_value("id")); 
                $DM = true; 
                $dm = (array) $PN->data; 
                $Xr = ["user_email" => $dm["user_email"], "user_login" => $dm["user_login"], "first_name" => get_user_meta($dm["ID"], "first_name", true) ?? '', "last_name" => get_user_meta($dm["ID"], "last_name", true) ?? '', "user_pass" => $dm["user_pass"], "display_name" => $dm["display_name"]]; 
                $DM = $kH->get_value("handler")->create_user_in_app($kH->get_value("id"), $Xr); 
                if (isset($DM["error"])) { 
                    goto Ua; 
                } 
                return true; 
                Ua: 
                return new \WP_Error($kH->id, isset($DM["error"]) ? $DM["error"]["message"] : "User skipped"); 
        } 
        em: 
        Nx: 
    } 
} 
L7: 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace moApiIntegrator\Controller;

use moApiIntegrator\API\azure;
use moApiIntegrator\Wrapper\pluginConstants;
use moApiIntegrator\Wrapper\wpCron;
use moApiIntegrator\Wrapper\wpWrapper;
use WP_Batch;
use WP_Batch_Item;
if (!class_exists("\127\120\x5f\102\x61\164\143\x68")) {
    goto L7;
}
class BatchProcess extends WP_Batch
{
    public function setup()
    {
        switch ($this->id) {
            case "\x73\x79\156\x63\x5f\141\154\x6c\x5f\x75\163\145\162\x73":
                $WI = get_option("\155\x6f\137\141\x70\151\x5f\x75\x73\145\x72\163\137\x6e\145\x65\x64\x5f\x74\157\x5f\142\x65\x5f\x73\171\156\x63\145\144");
                if (empty($WI)) {
                    goto xL;
                }
                $a2 = wpCron::getCron();
                $a2->setClient();
                $a2->setMapping();
                foreach ($WI as $At) {
                    $this->push(new WP_Batch_Item($At, ["\150\x61\156\x64\x6c\x65\162" => $a2]));
                    FC:
                }
                RZ:
                xL:
                goto sg;
            case "\143\x6c\x65\x61\162\137\165\x6e\155\x61\164\x63\150\x65\x64\137\165\x73\x65\162\x73":
                $AQ = get_option("\x6d\157\x5f\x61\160\151\x5f\165\x73\x65\162\163\137\156\145\145\x64\137\164\157\137\142\x65\x5f\143\154\x65\141\162\145\x64");
                $Gv = wpWrapper::mo_api_get_option(pluginConstants::client_config);
                $h_ = isset($Gv["\x74\x65\x6e\x61\156\x74\137\x6e\x61\x6d\145"]) ? $Gv["\x74\x65\x6e\x61\x6e\164\x5f\x6e\x61\155\x65"] : '';
                $g9 = wpWrapper::mo_api_get_option(pluginConstants::list_of_users_added_to_delete);
                if (!empty($g9)) {
                    goto XK;
                }
                $g9 = [];
                XK:
                if (empty($AQ)) {
                    goto wd;
                }
                $a2 = wpCron::getCron();
                $a2->setClient();
                $a2->setMapping();
                foreach ($AQ as $At) {
                    $this->push(new WP_Batch_Item($At["\165\163\145\x72\156\141\155\145"], ["\x68\141\x6e\x64\x6c\x65\x72" => $a2, "\x75\163\145\x72\145\x6d\x61\x69\x6c" => $At["\x75\x73\x65\162\145\x6d\x61\x69\x6c"], "\x74\x65\156\x61\156\x74\x5f\156\141\155\145" => $h_, "\x6c\151\x73\164\x5f\x74\x6f\x5f\x64\x65\154\x65\x74\145" => $g9]));
                    eC:
                }
                uy:
                wd:
                goto sg;
            case "\x73\x79\x6e\x63\x5f\x75\163\145\x72\x73\137\x74\157\137\141\144":
                $bz = get_option("\155\157\137\141\x70\x69\137\x75\x73\x65\x72\x73\137\156\x65\145\144\x5f\x74\x6f\137\x62\145\x5f\x73\x79\156\143\x65\144\137\x74\157\137\x61\x64");
                if (empty($bz)) {
                    goto dS;
                }
                $w8 = wpWrapper::mo_api_get_option(pluginConstants::client_config);
                $a2 = azure::getClient($w8);
                if (!(!isset($w8["\164\x65\156\141\x6e\164\x5f\x6e\141\x6d\x65"]) || isset($w8["\164\x65\x6e\141\156\x74\137\156\x61\155\x65"]) && empty($w8["\x74\x65\x6e\x61\x6e\x74\x5f\156\141\x6d\x65"]))) {
                    goto bC;
                }
                wpWrapper::mo_api__show_error_notice(esc_html__("\124\145\156\141\x6e\164\40\x6e\141\155\x65\40\156\x65\x65\x64\40\x74\157\40\x62\x65\x20\x63\157\156\146\151\147\x75\162\145\x64\x20\x69\156\x20\x62\141\163\151\x63\40\x61\160\x70\40\x63\x6f\x6e\146\151\147\165\x72\141\164\151\157\x6e\56"));
                return;
                bC:
                foreach ($bz as $At) {
                    $this->push(new WP_Batch_Item($At, ["\x68\x61\156\144\x6c\145\162" => $a2, "\x69\x64" => username_exists($At)]));
                    bm:
                }
                Uf:
                dS:
                goto sg;
        }
        cU:
        sg:
    }
    public function process($kH)
    {
        switch ($this->id) {
            case "\x73\x79\x6e\143\x5f\x61\154\x6c\137\165\163\x65\162\163":
                $PN = $kH->get_value("\x68\141\x6e\144\x6c\145\162")->getClient()->mo_azos_get_specific_user_detail($kH->id);
                $DM = $kH->get_value("\x68\141\x6e\x64\154\145\162")->mo_api_process_user_details($PN);
                if (!is_numeric($DM)) {
                    goto s2;
                }
                return true;
                s2:
                return new \WP_Error($kH->id, "\x55\x73\145\162\40\163\x6b\x69\x70\160\145\x64");
            case "\x63\x6c\145\x61\x72\137\165\156\x6d\141\x74\143\150\x65\x64\137\x75\163\145\x72\163":
                if (!empty($kH->get_value("\165\163\x65\162\x65\x6d\x61\x69\x6c"))) {
                    goto H8;
                }
                return true;
                H8:
                $n1 = $kH->get_value("\150\141\156\144\154\x65\x72")->getClient()->check_if_user_present_in_ad($kH->id, $kH->get_value("\x75\x73\x65\162\145\155\141\x69\154"), $kH->get_value("\164\145\156\x61\156\x74\x5f\x6e\x61\155\x65"));
                if (!$n1) {
                    goto mz;
                }
                return true;
                mz:
                $n3 = username_exists($kH->id);
                if (is_numeric($n3)) {
                    goto IW;
                }
                $n3 = email_exists($kH->get_value("\165\x73\x65\162\145\155\x61\x69\x6c"));
                IW:
                $g9 = $kH->get_value("\154\151\163\x74\137\164\157\137\x64\145\154\145\x74\145");
                $g9[] = ["\145\x6d\x61\x69\x6c" => $kH->get_value("\x75\163\145\x72\x65\x6d\x61\151\154"), "\165\x73\145\162\137\x69\x64" => $n3];
                wpWrapper::mo_api_set_option(pluginConstants::list_of_users_added_to_delete, $g9);
                return new \WP_Error($kH->id, "\167\151\x6c\154\40\x62\145\x20\x64\145\154\x65\x74\145\144");
            case "\163\171\x6e\x63\137\x75\x73\145\x72\163\137\x74\x6f\x5f\141\x64":
                $PN = get_user_by("\x69\144", $kH->get_value("\151\x64"));
                $DM = true;
                $dm = (array) $PN->data;
                $Xr = ["\165\x73\145\x72\x5f\145\x6d\x61\151\154" => $dm["\165\163\145\162\137\145\155\x61\151\x6c"], "\x75\x73\145\162\x5f\154\157\x67\x69\156" => $dm["\165\x73\x65\x72\137\x6c\x6f\x67\151\156"], "\x66\151\162\x73\164\137\x6e\x61\x6d\x65" => get_user_meta($dm["\111\104"], "\x66\x69\x72\x73\x74\x5f\156\x61\155\x65", true) ?? '', "\154\141\x73\164\x5f\x6e\x61\155\145" => get_user_meta($dm["\111\x44"], "\x6c\x61\x73\164\x5f\x6e\141\x6d\145", true) ?? '', "\165\163\x65\x72\x5f\x70\141\163\163" => $dm["\165\163\145\x72\137\x70\x61\163\x73"], "\x64\151\163\160\x6c\x61\x79\137\x6e\141\x6d\145" => $dm["\144\151\x73\x70\154\x61\x79\137\156\141\x6d\x65"]];
                $DM = $kH->get_value("\x68\141\x6e\144\154\145\162")->create_user_in_app($kH->get_value("\x69\144"), $Xr);
                if (isset($DM["\145\x72\162\x6f\162"])) {
                    goto Ua;
                }
                return true;
                Ua:
                return new \WP_Error($kH->id, isset($DM["\145\x72\x72\157\x72"]) ? $DM["\x65\x72\162\x6f\x72"]["\155\145\x73\163\x61\147\x65"] : "\x55\163\145\162\x20\163\x6b\151\160\x70\x65\144");
        }
        em:
        Nx:
    }
}
L7:

Function Calls

None

Variables

None

Stats

MD5 06079ad4fc829814a8814fc96a931838
Eval Count 0
Decode Time 44 ms