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 MoSfSyncSalesforce\API; use MoSfSyncSalesforce\Handler\Authorizati..

Decoded Output download

<?php 
 
 
namespace MoSfSyncSalesforce\API; 
 
use MoSfSyncSalesforce\Handler\AuthorizationHandler; 
use MoSfSyncSalesforce\Helper\Instance; 
use MoSfSyncSalesforce\Helper\PluginConstants; 
use MoSfSyncSalesforce\IAPI\ISalesforce; 
use MoSfSyncSalesforce\Helper\BasicEnum; 
class Salesforce implements ISalesforce 
{ 
    use Instance; 
    private $AuthorizationUrl; 
    private $loginUrl; 
    private $tokenendpoint; 
    private $AuthorizationHandler; 
    private $access_token; 
    private $refresh_token; 
    private $api_version = "v52.0"; 
    private $sf_object = "User"; 
    public $instance_url; 
    public function __construct() 
    { 
        $this->AuthorizationHandler = AuthorizationHandler::instance(); 
        $jW = $this->AuthorizationHandler->mo_sf_sync_get_access_token(); 
        if (!$jW) { 
            goto KU; 
        } 
        $this->access_token = $jW[PluginConstants::ACCESS_TOKEN]; 
        $this->refresh_token = $jW[PluginConstants::REFRESH_TOKEN]; 
        $this->instance_url = $jW[PluginConstants::INSTANCE_URL]; 
        KU: 
    } 
    private function mo_sf_sync_get_api_endpoint($Wf) 
    { 
        return $this->instance_url . "/services/data/" . $this->api_version . "/sobjects/" . $Wf; 
    } 
    public function mo_sf_sync_get_access_token() 
    { 
        return $this->access_token; 
    } 
    public function mo_sf_sync_set_access_token($s2) : void 
    { 
        $this->access_token = $s2; 
    } 
    public function mo_sf_sync_get_objects() 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . "/services/data/" . $this->api_version . "/sobjects/"; 
        $To = array("Authorization" => "Bearer " . $s2); 
        $FQ = $this->mo_sf_sync_get_request($pL, $To); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ); 
    } 
    public function mo_sf_sync_get_fields($Wc) 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . "/services/data/" . $this->api_version . "/sobjects/" . $Wc . "/describe/"; 
        $To = array("Authorization" => "Bearer " . $s2); 
        $FQ = $this->mo_sf_sync_get_request($pL, $To); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ); 
    } 
    public function mo_sf_sync_check_token($pL, $To, $FQ, $uP = "GET", $rQ = '') 
    { 
        if (is_array($FQ) && count($FQ) && isset($FQ[0]["errorCode"]) && $FQ[0]["errorCode"] == "INVALID_SESSION_ID") { 
            goto Ap; 
        } 
        return $FQ; 
        goto y9; 
        Ap: 
        $Hs = $this->AuthorizationHandler->mo_sf_sync_get_new_token(); 
        if (isset($Hs["access_token"])) { 
            goto Pn; 
        } 
        return $Hs; 
        Pn: 
        $this->access_token = $Hs["access_token"]; 
        $To["Authorization"] = "Bearer " . $this->access_token; 
        if (!($uP != "GET")) { 
            goto Cp; 
        } 
        return $this->mo_sf_sync_post_request($pL, $uP, $To, $rQ); 
        Cp: 
        $FQ = $this->mo_sf_sync_get_request($pL, $To); 
        if (is_array($FQ) && count($FQ) && isset($FQ[0]["errorCode"]) && $FQ[0]["errorCode"] == "INVALID_SESSION_ID") { 
            goto KT; 
        } 
        return $FQ; 
        goto zD; 
        KT: 
        return "Invalid session"; 
        zD: 
        y9: 
    } 
    public function mo_sf_sync_update_record($vv, $Wc, $rQ) 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . "/services/data/" . $this->api_version . "/sobjects/" . $Wc . "/" . $vv; 
        $To = array("Authorization" => "Bearer " . $s2, "Content-Type" => "application/json"); 
        $FQ = $this->mo_sf_sync_post_request($pL, "PATCH", $To, wp_json_encode($rQ)); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ, "PATCH", wp_json_encode($rQ)); 
    } 
    public function mo_sf_sync_fetch_user_profile_images($h1) 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . "/services/data/" . $this->api_version . "/connect/user-profiles/" . $h1 . "/photo"; 
        $To = array("Authorization" => "Bearer " . $s2, "Content-Type" => "application/json"); 
        $FQ = $this->mo_sf_sync_get_request($pL, $To); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ); 
    } 
    public function mo_sf_sync_create_record($Wc, $rQ) 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . "/services/data/" . $this->api_version . "/sobjects/" . $Wc; 
        $To = array("Authorization" => "Bearer " . $s2, "Content-Type" => "application/json"); 
        $FQ = $this->mo_sf_sync_post_request($pL, "POST", $To, wp_json_encode($rQ)); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ, "POST", wp_json_encode($rQ)); 
    } 
    public function mo_sf_sync_get_request($pL, $To) 
    { 
        $FQ = wp_remote_get($pL, array("headers" => $To, "timeout" => 10)); 
        if (is_array($FQ) && !is_wp_error($FQ)) { 
            goto EU; 
        } 
        return $FQ->get_error_messages(); 
        goto td; 
        EU: 
        return json_decode($FQ["body"], true); 
        td: 
    } 
    public function mo_sf_sync_post_request($pL, $uP, $To, $rQ) 
    { 
        $FQ = wp_remote_post($pL, array("method" => $uP, "body" => $rQ, "headers" => $To)); 
        if (is_array($FQ) && !is_wp_error($FQ)) { 
            goto zX; 
        } 
        return $FQ->get_error_messages(); 
        goto TQ; 
        zX: 
        return json_decode($FQ["body"], true); 
        TQ: 
    } 
    public function mo_sf_sync_create_composite_request($Yt, $VD, $VF, $PY = "user") 
    { 
        $K2 = array(); 
        $od = 0; 
        ZI: 
        if (!($od < count($VD))) { 
            goto TA; 
        } 
        $S9 = array(); 
        $Pt = $VD[$od]["object"]; 
        $CS = $VD[$od]["creation"]; 
        $ud = $VD[$od]["updation"]; 
        if (!($CS == 1)) { 
            goto Ld; 
        } 
        $uP = "POST"; 
        $pL = "/services/data/" . $this->api_version . "/sobjects/" . $Pt; 
        Ld: 
        $e5 = $VF["meta_methods"]["read"]; 
        if (!($ud == 1 && !empty($e5($Yt, $VD[$od]["nomenclature"], true)))) { 
            goto qr; 
        } 
        $uP = "PATCH"; 
        $pL = "/services/data/" . $this->api_version . "/sobjects/" . $Pt; 
        $pL .= "/" . $e5($Yt, $VD[$od]["nomenclature"], true); 
        qr: 
        if (!($CS == 0 && $ud == 0)) { 
            goto eu; 
        } 
        return; 
        eu: 
        $lX = strval(wp_rand()); 
        $Lp = "ref" . $Pt . $lX; 
        $rQ = $VD[$od]["body"]; 
        $S9["method"] = $uP; 
        $S9["url"] = $pL; 
        $S9["referenceId"] = $Lp; 
        $S9["body"] = $rQ; 
        $K2[$od] = $S9; 
        nA: 
        $od++; 
        goto ZI; 
        TA: 
        $s2 = $this->access_token; 
        $mR = $this->instance_url . "/services/data/" . $this->api_version . "/composite"; 
        $To = array("Authorization" => "Bearer " . $s2, "Content-Type" => "application/json"); 
        $i3 = json_encode(array("compositeRequest" => $K2)); 
        $t0 = $this->mo_sf_sync_post_request($mR, "POST", $To, $i3); 
        return $this->mo_sf_sync_check_token($mR, $To, $t0, "POST", $i3); 
    } 
    public function mo_sf_sync_execute_soql($bx) 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . "/services/data/" . $this->api_version . "/query/?q=" . $bx; 
        $To = array("Authorization" => "Bearer " . $s2, "Content-Type" => "application/json"); 
        $FQ = $this->mo_sf_sync_get_request($pL, $To); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ); 
    } 
    public function mo_Sf_sync_get_next_records($B4) 
    { 
        $s2 = $this->access_token; 
        $pL = $this->instance_url . $B4; 
        $To = array("Authorization" => "Bearer " . $s2, "Content-Type" => "application/json"); 
        $FQ = $this->mo_sf_sync_get_request($pL, $To); 
        return $this->mo_sf_sync_check_token($pL, $To, $FQ); 
    } 
} ?>

Did this file decode correctly?

Original Code

<?php


namespace MoSfSyncSalesforce\API;

use MoSfSyncSalesforce\Handler\AuthorizationHandler;
use MoSfSyncSalesforce\Helper\Instance;
use MoSfSyncSalesforce\Helper\PluginConstants;
use MoSfSyncSalesforce\IAPI\ISalesforce;
use MoSfSyncSalesforce\Helper\BasicEnum;
class Salesforce implements ISalesforce
{
    use Instance;
    private $AuthorizationUrl;
    private $loginUrl;
    private $tokenendpoint;
    private $AuthorizationHandler;
    private $access_token;
    private $refresh_token;
    private $api_version = "\166\x35\62\x2e\60";
    private $sf_object = "\125\x73\145\162";
    public $instance_url;
    public function __construct()
    {
        $this->AuthorizationHandler = AuthorizationHandler::instance();
        $jW = $this->AuthorizationHandler->mo_sf_sync_get_access_token();
        if (!$jW) {
            goto KU;
        }
        $this->access_token = $jW[PluginConstants::ACCESS_TOKEN];
        $this->refresh_token = $jW[PluginConstants::REFRESH_TOKEN];
        $this->instance_url = $jW[PluginConstants::INSTANCE_URL];
        KU:
    }
    private function mo_sf_sync_get_api_endpoint($Wf)
    {
        return $this->instance_url . "\x2f\x73\145\x72\x76\151\x63\145\x73\57\144\x61\x74\x61\57" . $this->api_version . "\57\x73\x6f\x62\152\145\x63\164\x73\x2f" . $Wf;
    }
    public function mo_sf_sync_get_access_token()
    {
        return $this->access_token;
    }
    public function mo_sf_sync_set_access_token($s2) : void
    {
        $this->access_token = $s2;
    }
    public function mo_sf_sync_get_objects()
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . "\57\163\x65\x72\x76\151\x63\145\163\57\144\x61\x74\x61\57" . $this->api_version . "\x2f\x73\x6f\x62\152\x65\x63\x74\x73\57";
        $To = array("\101\165\x74\x68\157\x72\151\x7a\141\x74\x69\x6f\x6e" => "\x42\x65\141\162\x65\162\x20" . $s2);
        $FQ = $this->mo_sf_sync_get_request($pL, $To);
        return $this->mo_sf_sync_check_token($pL, $To, $FQ);
    }
    public function mo_sf_sync_get_fields($Wc)
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . "\x2f\163\x65\162\x76\x69\143\145\x73\57\144\x61\x74\141\57" . $this->api_version . "\x2f\x73\x6f\142\152\145\x63\164\163\x2f" . $Wc . "\57\x64\145\x73\x63\162\151\x62\145\57";
        $To = array("\101\165\164\150\x6f\162\151\x7a\x61\164\151\157\x6e" => "\x42\145\141\x72\145\162\x20" . $s2);
        $FQ = $this->mo_sf_sync_get_request($pL, $To);
        return $this->mo_sf_sync_check_token($pL, $To, $FQ);
    }
    public function mo_sf_sync_check_token($pL, $To, $FQ, $uP = "\x47\105\x54", $rQ = '')
    {
        if (is_array($FQ) && count($FQ) && isset($FQ[0]["\145\x72\162\157\x72\x43\157\144\x65"]) && $FQ[0]["\x65\x72\x72\157\x72\x43\x6f\144\145"] == "\111\116\x56\101\x4c\x49\104\137\123\105\123\123\x49\x4f\x4e\137\111\x44") {
            goto Ap;
        }
        return $FQ;
        goto y9;
        Ap:
        $Hs = $this->AuthorizationHandler->mo_sf_sync_get_new_token();
        if (isset($Hs["\141\x63\143\x65\163\163\137\164\157\x6b\145\x6e"])) {
            goto Pn;
        }
        return $Hs;
        Pn:
        $this->access_token = $Hs["\x61\x63\143\145\163\x73\137\x74\x6f\153\145\156"];
        $To["\101\x75\164\150\x6f\x72\151\x7a\141\x74\x69\x6f\x6e"] = "\x42\145\x61\162\x65\162\x20" . $this->access_token;
        if (!($uP != "\107\105\124")) {
            goto Cp;
        }
        return $this->mo_sf_sync_post_request($pL, $uP, $To, $rQ);
        Cp:
        $FQ = $this->mo_sf_sync_get_request($pL, $To);
        if (is_array($FQ) && count($FQ) && isset($FQ[0]["\145\162\x72\x6f\x72\x43\157\x64\145"]) && $FQ[0]["\x65\x72\162\x6f\x72\103\157\144\x65"] == "\111\116\126\x41\114\111\x44\x5f\x53\105\x53\123\x49\117\116\137\111\104") {
            goto KT;
        }
        return $FQ;
        goto zD;
        KT:
        return "\x49\x6e\166\x61\154\x69\144\x20\x73\x65\x73\163\151\157\x6e";
        zD:
        y9:
    }
    public function mo_sf_sync_update_record($vv, $Wc, $rQ)
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . "\x2f\163\x65\162\166\x69\143\x65\x73\x2f\x64\x61\164\141\x2f" . $this->api_version . "\57\x73\x6f\x62\x6a\x65\143\164\163\57" . $Wc . "\57" . $vv;
        $To = array("\x41\x75\164\x68\x6f\162\151\172\x61\x74\x69\x6f\x6e" => "\x42\x65\x61\162\145\162\40" . $s2, "\x43\157\156\164\x65\x6e\x74\55\124\171\x70\x65" => "\x61\160\x70\154\x69\x63\x61\x74\151\157\156\x2f\x6a\x73\x6f\x6e");
        $FQ = $this->mo_sf_sync_post_request($pL, "\120\x41\124\103\x48", $To, wp_json_encode($rQ));
        return $this->mo_sf_sync_check_token($pL, $To, $FQ, "\120\x41\124\103\x48", wp_json_encode($rQ));
    }
    public function mo_sf_sync_fetch_user_profile_images($h1)
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . "\x2f\163\145\162\166\151\143\145\x73\x2f\144\141\x74\141\x2f" . $this->api_version . "\57\x63\157\x6e\x6e\x65\143\x74\57\x75\x73\x65\x72\x2d\160\162\x6f\146\x69\x6c\x65\163\x2f" . $h1 . "\x2f\160\x68\157\164\x6f";
        $To = array("\101\x75\164\150\157\162\151\x7a\141\x74\151\x6f\x6e" => "\x42\x65\141\x72\x65\x72\x20" . $s2, "\103\157\156\164\x65\156\164\x2d\x54\171\x70\x65" => "\x61\x70\160\x6c\151\x63\x61\164\151\157\156\x2f\152\163\x6f\x6e");
        $FQ = $this->mo_sf_sync_get_request($pL, $To);
        return $this->mo_sf_sync_check_token($pL, $To, $FQ);
    }
    public function mo_sf_sync_create_record($Wc, $rQ)
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . "\x2f\163\x65\162\166\151\x63\x65\163\x2f\x64\141\x74\141\57" . $this->api_version . "\x2f\163\157\142\x6a\145\143\164\163\57" . $Wc;
        $To = array("\x41\165\164\x68\157\162\x69\x7a\141\x74\151\x6f\156" => "\102\x65\x61\x72\x65\162\x20" . $s2, "\x43\x6f\156\x74\x65\x6e\x74\x2d\124\171\x70\145" => "\x61\160\160\x6c\x69\143\141\x74\x69\x6f\x6e\57\152\x73\x6f\x6e");
        $FQ = $this->mo_sf_sync_post_request($pL, "\120\117\123\x54", $To, wp_json_encode($rQ));
        return $this->mo_sf_sync_check_token($pL, $To, $FQ, "\120\x4f\x53\x54", wp_json_encode($rQ));
    }
    public function mo_sf_sync_get_request($pL, $To)
    {
        $FQ = wp_remote_get($pL, array("\150\x65\x61\144\x65\162\x73" => $To, "\x74\x69\x6d\145\157\x75\164" => 10));
        if (is_array($FQ) && !is_wp_error($FQ)) {
            goto EU;
        }
        return $FQ->get_error_messages();
        goto td;
        EU:
        return json_decode($FQ["\142\157\144\171"], true);
        td:
    }
    public function mo_sf_sync_post_request($pL, $uP, $To, $rQ)
    {
        $FQ = wp_remote_post($pL, array("\155\x65\164\150\157\144" => $uP, "\x62\157\144\171" => $rQ, "\150\145\x61\x64\145\x72\163" => $To));
        if (is_array($FQ) && !is_wp_error($FQ)) {
            goto zX;
        }
        return $FQ->get_error_messages();
        goto TQ;
        zX:
        return json_decode($FQ["\x62\157\144\171"], true);
        TQ:
    }
    public function mo_sf_sync_create_composite_request($Yt, $VD, $VF, $PY = "\x75\163\145\162")
    {
        $K2 = array();
        $od = 0;
        ZI:
        if (!($od < count($VD))) {
            goto TA;
        }
        $S9 = array();
        $Pt = $VD[$od]["\x6f\142\x6a\145\143\x74"];
        $CS = $VD[$od]["\143\162\x65\x61\164\x69\x6f\x6e"];
        $ud = $VD[$od]["\165\160\x64\141\164\151\157\156"];
        if (!($CS == 1)) {
            goto Ld;
        }
        $uP = "\120\117\123\x54";
        $pL = "\57\163\x65\x72\166\x69\143\145\x73\x2f\x64\141\164\x61\x2f" . $this->api_version . "\x2f\163\x6f\142\x6a\x65\x63\164\163\57" . $Pt;
        Ld:
        $e5 = $VF["\155\x65\164\141\x5f\155\x65\x74\150\x6f\x64\163"]["\x72\145\141\x64"];
        if (!($ud == 1 && !empty($e5($Yt, $VD[$od]["\156\157\x6d\x65\156\143\x6c\x61\164\165\x72\x65"], true)))) {
            goto qr;
        }
        $uP = "\x50\101\124\x43\110";
        $pL = "\x2f\163\x65\162\x76\x69\x63\x65\163\57\144\141\164\x61\x2f" . $this->api_version . "\57\163\157\142\x6a\x65\143\x74\163\57" . $Pt;
        $pL .= "\57" . $e5($Yt, $VD[$od]["\x6e\x6f\155\145\156\x63\x6c\141\x74\165\x72\145"], true);
        qr:
        if (!($CS == 0 && $ud == 0)) {
            goto eu;
        }
        return;
        eu:
        $lX = strval(wp_rand());
        $Lp = "\162\x65\146" . $Pt . $lX;
        $rQ = $VD[$od]["\142\157\144\171"];
        $S9["\x6d\x65\x74\150\157\x64"] = $uP;
        $S9["\x75\x72\154"] = $pL;
        $S9["\162\x65\146\145\162\145\x6e\x63\x65\111\144"] = $Lp;
        $S9["\142\157\x64\x79"] = $rQ;
        $K2[$od] = $S9;
        nA:
        $od++;
        goto ZI;
        TA:
        $s2 = $this->access_token;
        $mR = $this->instance_url . "\x2f\x73\x65\162\x76\151\143\x65\x73\x2f\x64\x61\164\x61\57" . $this->api_version . "\57\143\157\x6d\160\157\x73\151\x74\145";
        $To = array("\101\x75\164\x68\157\x72\151\172\x61\x74\x69\x6f\x6e" => "\x42\x65\141\x72\145\162\40" . $s2, "\103\157\156\x74\x65\x6e\164\55\124\x79\x70\x65" => "\x61\160\160\x6c\151\143\x61\164\x69\x6f\156\x2f\152\163\157\156");
        $i3 = json_encode(array("\x63\157\155\160\157\163\151\x74\x65\x52\x65\x71\x75\145\163\x74" => $K2));
        $t0 = $this->mo_sf_sync_post_request($mR, "\120\x4f\123\x54", $To, $i3);
        return $this->mo_sf_sync_check_token($mR, $To, $t0, "\x50\117\x53\x54", $i3);
    }
    public function mo_sf_sync_execute_soql($bx)
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . "\x2f\x73\145\162\166\x69\x63\x65\x73\x2f\x64\x61\164\141\57" . $this->api_version . "\x2f\161\x75\145\x72\x79\57\77\161\75" . $bx;
        $To = array("\x41\x75\x74\x68\x6f\x72\151\172\141\x74\x69\x6f\x6e" => "\x42\x65\x61\162\145\x72\40" . $s2, "\x43\157\x6e\164\x65\156\164\x2d\124\171\x70\x65" => "\x61\160\160\x6c\x69\143\141\164\151\157\x6e\x2f\152\x73\x6f\x6e");
        $FQ = $this->mo_sf_sync_get_request($pL, $To);
        return $this->mo_sf_sync_check_token($pL, $To, $FQ);
    }
    public function mo_Sf_sync_get_next_records($B4)
    {
        $s2 = $this->access_token;
        $pL = $this->instance_url . $B4;
        $To = array("\101\165\x74\x68\157\x72\151\x7a\141\x74\151\157\x6e" => "\x42\x65\x61\162\x65\x72\40" . $s2, "\x43\157\x6e\x74\x65\156\164\x2d\124\171\x70\x65" => "\x61\x70\x70\x6c\x69\143\x61\x74\x69\157\x6e\x2f\x6a\163\157\156");
        $FQ = $this->mo_sf_sync_get_request($pL, $To);
        return $this->mo_sf_sync_check_token($pL, $To, $FQ);
    }
}

Function Calls

None

Variables

None

Stats

MD5 d8c1aeb0aca36fd8075b9cced58bb7ad
Eval Count 0
Decode Time 46 ms