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\Services; use MoSfSyncSalesforce\Helper\PluginC..
Decoded Output download
<?php
namespace MoSfSyncSalesforce\Services;
use MoSfSyncSalesforce\Helper\PluginConstants;
use MoSfSyncSalesforce\API\Salesforce;
class Utils
{
public static function mo_sf_sync_check_array_for_empty_or_null($W1)
{
if (!is_array($W1)) {
goto dB;
}
foreach ($W1 as $Ac => $mT) {
if (!(!isset($mT) || empty($mT))) {
goto nw;
}
return ["status" => "error", "key" => $Ac];
nw:
o9:
}
up:
goto Sn;
dB:
if (!(!isset($W1) || empty($W1))) {
goto UR;
}
return ["status" => "error", "key" => $W1];
UR:
Sn:
return ["status" => "success"];
}
public static function mo_sf_sync_check_empty_or_null($mT)
{
if (!(!isset($mT) || empty($mT))) {
goto E5;
}
return true;
E5:
return false;
}
public static function mo_sf_sync_save_settings($Ac, $mT)
{
return update_site_option($Ac, $mT);
}
public static function mo_sf_sync_save_site_specific_settings($Ac, $mT)
{
return update_option($Ac, $mT);
}
public static function mo_sf_sync_get_settings($Ac)
{
return maybe_unserialize(get_site_option($Ac));
}
public static function mo_sf_sync_get_site_specific_settings($Ac)
{
return maybe_unserialize(get_option($Ac));
}
public static function mo_sf_sync_delete_settings($Ac)
{
return delete_site_option($Ac);
}
public static function mo_sf_sync_delete_site_specific_settings($Ac)
{
return delete_option($Ac);
}
public static function mo_sf_sync_sanitize_and_index($Na)
{
$ko = [];
wp_parse_str($Na, $ko);
foreach ($ko as $Ac => $mT) {
if (empty($mT)) {
goto DE;
}
$ko[$Ac] = sanitize_text_field($mT);
goto hr;
DE:
unset($Ac);
hr:
CC:
}
f8:
if (!isset($ko["object_select"])) {
goto JC;
}
$Hs = [];
$Hs["object_select"] = $ko["object_select"];
$o4 = (sizeof($ko) - 1) / 2;
$od = 1;
Zb:
if (!($od <= $o4)) {
goto jX;
}
if (!(!empty($ko["key" . $od]) && !empty($ko["value" . $od]))) {
goto vy;
}
$Hs[$ko["key" . $od]] = $ko["value" . $od];
vy:
VA:
$od++;
goto Zb;
jX:
return $Hs;
JC:
return $ko;
}
public static function mo_sf_sync_manage_backward_compatability($wF)
{
foreach ($wF as $Ac => $mT) {
if (!(empty($Ac) || empty($mT))) {
goto O1;
}
unset($wF[$Ac]);
O1:
RT:
}
Gf:
$gP["object_select"] = $wF["object_select"];
unset($wF["object_select"]);
$gP = array_merge($gP, array_flip($wF));
self::mo_sf_sync_save_settings("mo_sf_sync_object", $gP);
return $gP;
}
public static function mo_sf_sync_show_feedback_message()
{
$Do = self::mo_sf_sync_get_settings("mo_sf_sync_notice_message");
if (!empty($Do)) {
goto gt;
}
return;
gt:
$jx = self::mo_sf_sync_get_settings("mo_sf_sync_notice_message_type");
echo "\xd
\x9\x9 <div class='mo-sf-sync-alert mo-sf-sync-alert-{$jx} mo-sf-mt-4'>\xd\xa\x9\x9 \x9<span class='dashicons dashicons-{$jx}'></span>
\x9 \x9<span>{$Do}</span>
\xa \x9 </div>\xd
";
self::mo_sf_sync_delete_settings("mo_sf_sync_notice_message");
self::mo_sf_sync_delete_settings("mo_sf_sync_notice_message_type");
}
public static function mo_sf_sync_show_error_message($Do)
{
self::mo_sf_sync_save_settings("mo_sf_sync_notice_message", $Do);
self::mo_sf_sync_save_settings("mo_sf_sync_notice_message_type", "warning");
}
public static function mo_sf_sync_show_success_message($Do)
{
self::mo_sf_sync_save_settings("mo_sf_sync_notice_message", $Do);
self::mo_sf_sync_save_settings("mo_sf_sync_notice_message_type", "info");
}
public static function mo_sf_sync_reset_plugin()
{
$fX = new DBUtils();
if (!self::mo_sf_sync_check_option_admin_referer("mo_sf_sync_reset")) {
goto tu;
}
delete_option("mo_sf_sync_config");
$fX->mo_sf_sync_delete_all_rows();
delete_option("mo_sf_sync_provision");
delete_site_option("mo_sf_sync_salesforce_response");
tu:
}
public static function mo_sf_sync_check_option_admin_referer($Op)
{
return isset($_POST["option"]) and $_POST["option"] == $Op and check_admin_referer($Op);
}
public static function mo_sf_sync_check_isset_empty($Ac, $t7)
{
if (!(!isset($t7[$Ac]) || empty($t7[$Ac]))) {
goto RU;
}
return false;
RU:
return true;
}
public static function mo_sf_sync_update_app_config($IG)
{
$IG[PluginConstants::ENVIRONMENT] = "prod";
$IG[PluginConstants::ENVIRONMENT_LINK] = "https://login.salesforce.com";
Utils::mo_sf_sync_save_settings(PluginConstants::CONFIG_OBJECT, $IG);
return $IG;
}
public static function mo_sf_sync_is_authorization_configured()
{
$up = get_site_option("mo_sf_sync_salesforce_response");
if (!(empty($up) || !is_array($up))) {
goto CG;
}
return false;
CG:
if (!(!self::mo_sf_sync_check_isset_empty("access_token", $up) || !self::mo_sf_sync_check_isset_empty("refresh_token", $up))) {
goto gW;
}
return false;
gW:
return true;
}
public static function mo_sf_sync_wp_remote_call($pL, $u1 = array(), $DP = false)
{
if (!$DP) {
goto yt;
}
$FQ = wp_remote_get($pL, $u1);
goto jx;
yt:
$FQ = wp_remote_post($pL, $u1);
jx:
if (!is_wp_error($FQ)) {
goto t1;
}
self::mo_sf_sync_show_error_message("Unable to connect to the Internet. Please try again.");
return false;
goto rj;
t1:
return $FQ["body"];
rj:
}
} ?>
Did this file decode correctly?
Original Code
<?php
namespace MoSfSyncSalesforce\Services;
use MoSfSyncSalesforce\Helper\PluginConstants;
use MoSfSyncSalesforce\API\Salesforce;
class Utils
{
public static function mo_sf_sync_check_array_for_empty_or_null($W1)
{
if (!is_array($W1)) {
goto dB;
}
foreach ($W1 as $Ac => $mT) {
if (!(!isset($mT) || empty($mT))) {
goto nw;
}
return ["\163\164\x61\164\165\163" => "\145\162\x72\x6f\162", "\x6b\145\171" => $Ac];
nw:
o9:
}
up:
goto Sn;
dB:
if (!(!isset($W1) || empty($W1))) {
goto UR;
}
return ["\163\164\x61\164\165\163" => "\x65\x72\162\157\x72", "\153\145\x79" => $W1];
UR:
Sn:
return ["\x73\164\141\x74\165\163" => "\x73\165\x63\x63\145\x73\x73"];
}
public static function mo_sf_sync_check_empty_or_null($mT)
{
if (!(!isset($mT) || empty($mT))) {
goto E5;
}
return true;
E5:
return false;
}
public static function mo_sf_sync_save_settings($Ac, $mT)
{
return update_site_option($Ac, $mT);
}
public static function mo_sf_sync_save_site_specific_settings($Ac, $mT)
{
return update_option($Ac, $mT);
}
public static function mo_sf_sync_get_settings($Ac)
{
return maybe_unserialize(get_site_option($Ac));
}
public static function mo_sf_sync_get_site_specific_settings($Ac)
{
return maybe_unserialize(get_option($Ac));
}
public static function mo_sf_sync_delete_settings($Ac)
{
return delete_site_option($Ac);
}
public static function mo_sf_sync_delete_site_specific_settings($Ac)
{
return delete_option($Ac);
}
public static function mo_sf_sync_sanitize_and_index($Na)
{
$ko = [];
wp_parse_str($Na, $ko);
foreach ($ko as $Ac => $mT) {
if (empty($mT)) {
goto DE;
}
$ko[$Ac] = sanitize_text_field($mT);
goto hr;
DE:
unset($Ac);
hr:
CC:
}
f8:
if (!isset($ko["\x6f\142\152\x65\143\164\x5f\163\145\x6c\145\x63\164"])) {
goto JC;
}
$Hs = [];
$Hs["\x6f\142\152\145\x63\164\x5f\163\145\154\x65\143\164"] = $ko["\x6f\142\x6a\145\x63\x74\137\x73\x65\x6c\145\143\x74"];
$o4 = (sizeof($ko) - 1) / 2;
$od = 1;
Zb:
if (!($od <= $o4)) {
goto jX;
}
if (!(!empty($ko["\153\x65\171" . $od]) && !empty($ko["\x76\141\x6c\x75\145" . $od]))) {
goto vy;
}
$Hs[$ko["\153\145\x79" . $od]] = $ko["\166\x61\154\165\x65" . $od];
vy:
VA:
$od++;
goto Zb;
jX:
return $Hs;
JC:
return $ko;
}
public static function mo_sf_sync_manage_backward_compatability($wF)
{
foreach ($wF as $Ac => $mT) {
if (!(empty($Ac) || empty($mT))) {
goto O1;
}
unset($wF[$Ac]);
O1:
RT:
}
Gf:
$gP["\x6f\x62\x6a\145\x63\164\x5f\163\145\x6c\145\143\164"] = $wF["\157\x62\152\x65\x63\x74\x5f\x73\145\x6c\145\143\164"];
unset($wF["\157\142\152\145\x63\164\137\x73\x65\154\145\x63\164"]);
$gP = array_merge($gP, array_flip($wF));
self::mo_sf_sync_save_settings("\155\x6f\137\x73\x66\x5f\x73\171\x6e\x63\137\157\x62\152\145\143\x74", $gP);
return $gP;
}
public static function mo_sf_sync_show_feedback_message()
{
$Do = self::mo_sf_sync_get_settings("\x6d\157\x5f\x73\146\x5f\x73\x79\x6e\x63\137\x6e\157\x74\151\143\x65\137\x6d\x65\x73\x73\141\147\145");
if (!empty($Do)) {
goto gt;
}
return;
gt:
$jx = self::mo_sf_sync_get_settings("\x6d\157\137\x73\x66\137\163\x79\x6e\x63\x5f\156\x6f\164\151\143\x65\x5f\x6d\x65\163\x73\x61\147\145\x5f\164\x79\160\x65");
echo "\xd\12\x9\x9\11\x3c\144\x69\166\40\143\154\141\x73\163\75\47\155\157\55\x73\x66\x2d\x73\x79\156\143\x2d\141\154\x65\162\x74\40\155\157\55\163\146\x2d\x73\x79\x6e\x63\55\141\x6c\145\x72\x74\x2d{$jx}\x20\155\x6f\x2d\163\146\x2d\x6d\x74\55\64\47\x3e\xd\xa\x9\x9\11\x9\74\163\160\141\x6e\40\x63\154\141\163\163\75\47\x64\141\x73\x68\151\x63\x6f\156\163\40\144\x61\x73\x68\151\x63\157\x6e\163\55{$jx}\x27\76\74\x2f\163\x70\141\156\x3e\15\12\11\x9\11\x9\x3c\163\160\x61\156\x3e{$Do}\74\57\x73\160\x61\156\x3e\15\xa\11\x9\11\x3c\57\x64\151\166\76\xd\12\11\11";
self::mo_sf_sync_delete_settings("\x6d\157\137\163\146\137\x73\171\x6e\143\137\x6e\x6f\x74\151\143\145\x5f\155\145\163\x73\141\x67\145");
self::mo_sf_sync_delete_settings("\155\157\x5f\x73\146\137\x73\x79\156\x63\137\x6e\x6f\164\x69\x63\x65\x5f\155\x65\163\x73\x61\x67\145\x5f\x74\x79\x70\x65");
}
public static function mo_sf_sync_show_error_message($Do)
{
self::mo_sf_sync_save_settings("\x6d\x6f\x5f\x73\146\x5f\x73\x79\x6e\143\x5f\156\x6f\x74\x69\143\145\x5f\x6d\x65\163\163\141\x67\145", $Do);
self::mo_sf_sync_save_settings("\x6d\157\137\163\x66\x5f\163\171\156\x63\137\x6e\157\164\x69\143\x65\x5f\x6d\x65\x73\163\141\x67\x65\137\x74\171\x70\x65", "\167\x61\162\156\151\x6e\x67");
}
public static function mo_sf_sync_show_success_message($Do)
{
self::mo_sf_sync_save_settings("\x6d\157\137\163\146\x5f\x73\x79\156\x63\137\x6e\157\164\x69\x63\x65\137\x6d\x65\x73\163\x61\x67\x65", $Do);
self::mo_sf_sync_save_settings("\155\x6f\x5f\x73\x66\x5f\163\171\156\143\137\x6e\157\164\151\143\x65\137\155\x65\x73\x73\x61\147\x65\x5f\164\x79\160\145", "\x69\x6e\146\x6f");
}
public static function mo_sf_sync_reset_plugin()
{
$fX = new DBUtils();
if (!self::mo_sf_sync_check_option_admin_referer("\x6d\x6f\137\x73\146\x5f\163\171\x6e\143\137\x72\145\x73\x65\164")) {
goto tu;
}
delete_option("\155\x6f\137\163\x66\x5f\x73\x79\x6e\x63\x5f\x63\x6f\156\146\151\147");
$fX->mo_sf_sync_delete_all_rows();
delete_option("\155\x6f\x5f\x73\146\x5f\x73\x79\x6e\143\x5f\x70\162\157\166\x69\163\x69\157\156");
delete_site_option("\x6d\x6f\x5f\163\146\x5f\x73\171\156\x63\x5f\163\141\154\145\163\x66\x6f\x72\x63\145\x5f\x72\145\x73\x70\157\x6e\163\145");
tu:
}
public static function mo_sf_sync_check_option_admin_referer($Op)
{
return isset($_POST["\157\160\164\x69\x6f\x6e"]) and $_POST["\x6f\160\164\x69\157\x6e"] == $Op and check_admin_referer($Op);
}
public static function mo_sf_sync_check_isset_empty($Ac, $t7)
{
if (!(!isset($t7[$Ac]) || empty($t7[$Ac]))) {
goto RU;
}
return false;
RU:
return true;
}
public static function mo_sf_sync_update_app_config($IG)
{
$IG[PluginConstants::ENVIRONMENT] = "\160\162\157\144";
$IG[PluginConstants::ENVIRONMENT_LINK] = "\x68\x74\x74\x70\163\x3a\57\57\x6c\x6f\147\151\156\56\163\141\154\x65\163\146\157\162\143\145\56\143\x6f\x6d";
Utils::mo_sf_sync_save_settings(PluginConstants::CONFIG_OBJECT, $IG);
return $IG;
}
public static function mo_sf_sync_is_authorization_configured()
{
$up = get_site_option("\155\x6f\x5f\163\x66\137\163\x79\156\x63\x5f\x73\x61\x6c\145\163\x66\157\162\x63\145\x5f\162\145\x73\160\157\156\163\x65");
if (!(empty($up) || !is_array($up))) {
goto CG;
}
return false;
CG:
if (!(!self::mo_sf_sync_check_isset_empty("\x61\x63\143\x65\x73\163\137\x74\157\x6b\145\156", $up) || !self::mo_sf_sync_check_isset_empty("\162\x65\x66\162\x65\163\150\x5f\x74\x6f\153\145\x6e", $up))) {
goto gW;
}
return false;
gW:
return true;
}
public static function mo_sf_sync_wp_remote_call($pL, $u1 = array(), $DP = false)
{
if (!$DP) {
goto yt;
}
$FQ = wp_remote_get($pL, $u1);
goto jx;
yt:
$FQ = wp_remote_post($pL, $u1);
jx:
if (!is_wp_error($FQ)) {
goto t1;
}
self::mo_sf_sync_show_error_message("\x55\x6e\141\142\154\x65\40\164\x6f\40\x63\x6f\156\x6e\145\x63\164\x20\x74\157\40\x74\x68\x65\x20\111\156\x74\145\x72\156\x65\x74\x2e\40\120\154\145\x61\x73\x65\40\x74\162\171\40\141\x67\141\151\156\x2e");
return false;
goto rj;
t1:
return $FQ["\142\x6f\x64\171"];
rj:
}
}
Function Calls
None |
Stats
MD5 | 2eb29481a1737b5fb92a9b9f286c6dba |
Eval Count | 0 |
Decode Time | 47 ms |