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 MiniOrange\TwoFA\Helper; use MiniOrange\TwoFA\Helper\TwoFAConstant..

Decoded Output download

<?php 
 
 
namespace MiniOrange\TwoFA\Helper; 
 
use MiniOrange\TwoFA\Helper\TwoFAConstants; 
class Curl 
{ 
    public static function create_customer($hc, $j0, $Fc, $xh = '', $J5 = '', $LB = '') 
    { 
        $jv = "https://login.xecurify.com/moas/rest/customer/add"; 
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY; 
        $sI = TwoFAConstants::DEFAULT_API_KEY; 
        $ii = ["companyName" => $j0, "areaOfInterest" => "Magento 2 Factor Authentication Plugin", "firstname" => $J5, "lastname" => $LB, "email" => $hc, "phone" => '', "password" => $Fc]; 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function update_status($D_, $sI, $P8, $N1) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/api/backupcode/updatestatus"; 
        $ii = array("code" => $P8, "customerKey" => $D_, "additionalFields" => array("field1" => $N1)); 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function mius($D_, $sI, $P8) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/api/backupcode/updatestatus"; 
        $ii = array("code" => $P8, "customerKey" => $D_); 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function vml($D_, $sI, $P8, $N1) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/api/backupcode/verify"; 
        $ii = array("code" => $P8, "customerKey" => $D_, "additionalFields" => array("field1" => $N1)); 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function get_customer_key($hc, $Fc) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/rest/customer/key"; 
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY; 
        $sI = TwoFAConstants::DEFAULT_API_KEY; 
        $ii = ["email" => $hc, "password" => $Fc]; 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function check_customer($hc) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/rest/customer/check-if-exists"; 
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY; 
        $sI = TwoFAConstants::DEFAULT_API_KEY; 
        $ii = ["email" => $hc]; 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function update_customer_2fa($D_, $sI, $jv, $ii) 
    { 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function mo_send_access_token_request($Ep, $jv, $dw, $WQ) 
    { 
        $EA = ["Content-Type: application/x-www-form-urlencoded", "Authorization: Basic " . base64_encode($dw . ":" . $WQ)]; 
        $Th = self::callAPI($jv, $Ep, $EA); 
        return $Th; 
    } 
    public static function mo_send_user_info_request($jv, $Dn) 
    { 
        $Th = self::callAPI($jv, [], $Dn); 
        return $Th; 
    } 
    public static function submit_contact_us($Q8, $YF, $OF) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/rest/customer/contact-us"; 
        $OF = "[" . TwoFAConstants::AREA_OF_INTEREST . "]: " . $OF; 
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY; 
        $sI = TwoFAConstants::DEFAULT_API_KEY; 
        $ii = ["email" => $Q8, "phone" => $YF, "query" => $OF, "ccEmail" => "[email protected]"]; 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return true; 
    } 
    public static function challenge($D_, $sI, $jv, $ii) 
    { 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function validate($D_, $sI, $jv, $ii) 
    { 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    public static function update($D_, $sI, $jv, $ii) 
    { 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        return $Th; 
    } 
    private static function createAuthHeader($D_, $sI) 
    { 
        $Vv = round(microtime(true) * 1000); 
        $Vv = number_format($Vv, 0, '', ''); 
        $fZ = $D_ . $Vv . $sI; 
        $EA = hash("sha512", $fZ); 
        $T7 = ["Content-Type: application/json", "Customer-Key: {$D_}", "Timestamp: {$Vv}", "Authorization: {$EA}"]; 
        return $T7; 
    } 
    private static function callAPI($jv, $UJ = array(), $Dn = array("Content-Type: application/json")) 
    { 
        $SH = new MoCurl(); 
        $sZ = ["CURLOPT_FOLLOWLOCATION" => true, "CURLOPT_ENCODING" => '', "CURLOPT_RETURNTRANSFER" => true, "CURLOPT_AUTOREFERER" => true, "CURLOPT_TIMEOUT" => 0, "CURLOPT_MAXREDIRS" => 10]; 
        $AP = in_array("Content-Type: application/x-www-form-urlencoded", $Dn) ? !empty($UJ) ? http_build_query($UJ) : '' : (!empty($UJ) ? json_encode($UJ) : ''); 
        $TP = !empty($AP) ? "POST" : "GET"; 
        $SH->setConfig($sZ); 
        $SH->write($TP, $jv, "1.1", $Dn, $AP); 
        $ce = $SH->read(); 
        $SH->close(); 
        return $ce; 
    } 
    public static function get_email_sms_transactions($D_, $sI) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/rest/customer/license"; 
        $ii = array("customerId" => $D_, "applicationName" => TwoFAConstants::PLAN_NAME); 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        $DN = json_decode($Th); 
        if (!($DN->status != "SUCCESS")) { 
            goto lq; 
        } 
        $ii = array("customerId" => $D_, "licenseType" => "DEMO"); 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        $DN = json_decode($Th); 
        lq: 
        return $DN; 
    } 
    public static function ccl($D_, $sI) 
    { 
        $jv = TwoFAConstants::HOSTNAME . "/moas/rest/customer/license"; 
        $ii = array("customerId" => $D_, "applicationName" => TwoFAConstants::PLAN_NAME); 
        $EA = self::createAuthHeader($D_, $sI); 
        $Th = self::callAPI($jv, $ii, $EA); 
        $DN = json_decode($Th); 
        return $DN; 
    } 
    public static function CustomGateway_SMS_callAPI($jv, $UJ = array(), $Dn = array("Content-Type: application/json")) 
    { 
        $SH = new MoCurl(); 
        $sZ = ["CURLOPT_FOLLOWLOCATION" => true, "CURLOPT_ENCODING" => '', "CURLOPT_RETURNTRANSFER" => true, "CURLOPT_AUTOREFERER" => true, "CURLOPT_TIMEOUT" => 0, "CURLOPT_MAXREDIRS" => 10]; 
        $AP = in_array("Content-Type: application/x-www-form-urlencoded", $Dn) ? !empty($UJ) ? http_build_query($UJ) : '' : (!empty($UJ) ? json_encode($UJ) : ''); 
        $TP = !empty($AP) ? "POST" : "GET"; 
        $SH->setConfig($sZ); 
        $SH->write($TP, $jv, "1.1", $Dn, $AP); 
        $ce = $SH->read(); 
        $SH->close(); 
        return $ce; 
    } 
} 
 ?>

Did this file decode correctly?

Original Code

<?php


namespace MiniOrange\TwoFA\Helper;

use MiniOrange\TwoFA\Helper\TwoFAConstants;
class Curl
{
    public static function create_customer($hc, $j0, $Fc, $xh = '', $J5 = '', $LB = '')
    {
        $jv = "\x68\164\x74\160\x73\72\x2f\x2f\x6c\x6f\147\151\156\x2e\170\145\143\x75\x72\151\x66\x79\x2e\143\157\x6d\57\x6d\157\x61\x73\x2f\162\145\163\164\57\143\x75\163\x74\x6f\x6d\145\x72\x2f\141\x64\x64";
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY;
        $sI = TwoFAConstants::DEFAULT_API_KEY;
        $ii = ["\x63\x6f\x6d\160\141\x6e\x79\x4e\x61\x6d\145" => $j0, "\141\x72\x65\x61\x4f\146\x49\x6e\x74\x65\162\145\163\164" => "\x4d\x61\147\145\x6e\164\157\x20\62\40\x46\x61\143\164\157\162\x20\101\x75\164\150\145\x6e\x74\x69\x63\141\x74\x69\x6f\156\x20\120\154\165\x67\151\156", "\146\151\x72\x73\164\156\141\x6d\145" => $J5, "\154\141\163\x74\x6e\141\x6d\145" => $LB, "\145\155\x61\151\154" => $hc, "\x70\150\157\x6e\x65" => '', "\x70\x61\x73\x73\x77\157\162\144" => $Fc];
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function update_status($D_, $sI, $P8, $N1)
    {
        $jv = TwoFAConstants::HOSTNAME . "\x2f\155\x6f\x61\x73\x2f\x61\x70\x69\57\142\141\143\x6b\165\160\143\157\x64\x65\57\165\x70\x64\x61\x74\145\163\164\141\x74\x75\163";
        $ii = array("\143\x6f\x64\x65" => $P8, "\x63\165\163\x74\157\x6d\x65\x72\x4b\x65\x79" => $D_, "\x61\x64\x64\151\x74\151\x6f\x6e\141\154\x46\151\145\x6c\x64\x73" => array("\146\151\x65\154\144\x31" => $N1));
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function mius($D_, $sI, $P8)
    {
        $jv = TwoFAConstants::HOSTNAME . "\57\x6d\x6f\x61\163\x2f\141\x70\x69\57\x62\x61\143\153\165\160\143\x6f\144\x65\57\x75\x70\x64\141\x74\145\163\x74\141\164\165\163";
        $ii = array("\143\157\144\145" => $P8, "\x63\165\163\164\x6f\155\145\x72\113\145\171" => $D_);
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function vml($D_, $sI, $P8, $N1)
    {
        $jv = TwoFAConstants::HOSTNAME . "\57\x6d\157\141\x73\x2f\x61\160\151\x2f\x62\141\143\x6b\165\x70\x63\157\144\x65\x2f\x76\x65\x72\151\x66\x79";
        $ii = array("\x63\157\144\145" => $P8, "\143\165\x73\x74\157\x6d\x65\162\113\x65\171" => $D_, "\141\x64\x64\x69\164\151\x6f\156\141\154\106\x69\x65\x6c\x64\x73" => array("\x66\151\145\x6c\144\61" => $N1));
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function get_customer_key($hc, $Fc)
    {
        $jv = TwoFAConstants::HOSTNAME . "\x2f\155\x6f\x61\x73\57\x72\145\163\164\x2f\x63\165\x73\164\x6f\x6d\x65\162\x2f\x6b\145\171";
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY;
        $sI = TwoFAConstants::DEFAULT_API_KEY;
        $ii = ["\x65\x6d\x61\x69\154" => $hc, "\160\x61\163\x73\x77\x6f\x72\x64" => $Fc];
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function check_customer($hc)
    {
        $jv = TwoFAConstants::HOSTNAME . "\57\x6d\157\141\x73\x2f\162\145\163\164\57\x63\165\x73\x74\157\155\145\162\57\x63\x68\145\143\x6b\x2d\151\x66\x2d\145\170\x69\163\164\x73";
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY;
        $sI = TwoFAConstants::DEFAULT_API_KEY;
        $ii = ["\145\x6d\x61\151\x6c" => $hc];
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function update_customer_2fa($D_, $sI, $jv, $ii)
    {
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function mo_send_access_token_request($Ep, $jv, $dw, $WQ)
    {
        $EA = ["\x43\157\156\x74\145\x6e\164\55\124\x79\160\x65\72\x20\141\x70\x70\154\151\143\141\164\x69\x6f\156\x2f\170\x2d\x77\x77\167\x2d\x66\157\x72\155\x2d\x75\162\154\x65\156\143\x6f\144\145\x64", "\101\165\x74\150\x6f\x72\151\172\141\164\x69\157\156\x3a\x20\102\141\163\x69\143\40" . base64_encode($dw . "\x3a" . $WQ)];
        $Th = self::callAPI($jv, $Ep, $EA);
        return $Th;
    }
    public static function mo_send_user_info_request($jv, $Dn)
    {
        $Th = self::callAPI($jv, [], $Dn);
        return $Th;
    }
    public static function submit_contact_us($Q8, $YF, $OF)
    {
        $jv = TwoFAConstants::HOSTNAME . "\57\x6d\157\141\x73\x2f\162\145\x73\164\57\143\x75\163\x74\x6f\155\x65\x72\57\x63\x6f\156\164\141\x63\x74\x2d\165\163";
        $OF = "\133" . TwoFAConstants::AREA_OF_INTEREST . "\135\72\40" . $OF;
        $D_ = TwoFAConstants::DEFAULT_CUSTOMER_KEY;
        $sI = TwoFAConstants::DEFAULT_API_KEY;
        $ii = ["\x65\155\x61\x69\154" => $Q8, "\160\150\157\156\145" => $YF, "\161\165\145\162\171" => $OF, "\143\143\105\x6d\141\151\154" => "\155\141\x67\x65\x6e\164\x6f\x73\165\x70\x70\x6f\162\x74\x40\170\145\x63\x75\162\151\146\171\x2e\143\157\155"];
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return true;
    }
    public static function challenge($D_, $sI, $jv, $ii)
    {
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function validate($D_, $sI, $jv, $ii)
    {
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    public static function update($D_, $sI, $jv, $ii)
    {
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        return $Th;
    }
    private static function createAuthHeader($D_, $sI)
    {
        $Vv = round(microtime(true) * 1000);
        $Vv = number_format($Vv, 0, '', '');
        $fZ = $D_ . $Vv . $sI;
        $EA = hash("\x73\150\141\x35\x31\62", $fZ);
        $T7 = ["\103\x6f\x6e\164\x65\156\x74\x2d\124\171\x70\145\x3a\x20\x61\x70\160\154\x69\x63\x61\164\151\157\156\x2f\x6a\x73\157\x6e", "\x43\165\x73\164\157\x6d\145\162\x2d\x4b\x65\x79\72\x20{$D_}", "\x54\x69\x6d\x65\x73\x74\141\155\x70\x3a\40{$Vv}", "\x41\165\164\x68\157\x72\x69\172\x61\164\x69\157\x6e\x3a\x20{$EA}"];
        return $T7;
    }
    private static function callAPI($jv, $UJ = array(), $Dn = array("\x43\157\x6e\164\x65\x6e\164\55\124\x79\160\x65\72\x20\141\x70\160\x6c\151\x63\141\x74\x69\x6f\156\57\x6a\163\x6f\x6e"))
    {
        $SH = new MoCurl();
        $sZ = ["\x43\125\122\x4c\x4f\120\x54\x5f\x46\117\x4c\114\117\x57\x4c\x4f\x43\101\x54\x49\117\x4e" => true, "\x43\125\122\x4c\117\x50\124\x5f\x45\x4e\103\x4f\x44\111\x4e\107" => '', "\x43\x55\x52\114\117\x50\124\137\122\105\124\x55\x52\116\x54\122\x41\x4e\x53\x46\105\122" => true, "\x43\x55\122\x4c\117\120\x54\137\x41\125\x54\117\122\105\x46\105\x52\x45\x52" => true, "\x43\x55\x52\x4c\117\120\124\x5f\124\x49\115\x45\x4f\125\x54" => 0, "\x43\x55\122\114\117\120\124\137\x4d\x41\x58\x52\105\104\111\x52\x53" => 10];
        $AP = in_array("\x43\x6f\x6e\x74\x65\x6e\164\55\124\x79\x70\145\x3a\x20\141\160\x70\154\151\x63\141\164\151\x6f\156\x2f\x78\x2d\167\167\167\55\x66\x6f\162\155\55\165\162\x6c\145\156\x63\157\x64\145\144", $Dn) ? !empty($UJ) ? http_build_query($UJ) : '' : (!empty($UJ) ? json_encode($UJ) : '');
        $TP = !empty($AP) ? "\120\x4f\x53\x54" : "\107\105\x54";
        $SH->setConfig($sZ);
        $SH->write($TP, $jv, "\61\x2e\x31", $Dn, $AP);
        $ce = $SH->read();
        $SH->close();
        return $ce;
    }
    public static function get_email_sms_transactions($D_, $sI)
    {
        $jv = TwoFAConstants::HOSTNAME . "\x2f\x6d\157\141\163\57\x72\x65\163\164\x2f\143\x75\x73\164\157\x6d\145\162\x2f\x6c\x69\143\x65\x6e\x73\x65";
        $ii = array("\x63\x75\163\164\157\155\145\x72\111\x64" => $D_, "\141\160\160\x6c\x69\x63\x61\164\151\157\x6e\116\x61\x6d\x65" => TwoFAConstants::PLAN_NAME);
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        $DN = json_decode($Th);
        if (!($DN->status != "\123\x55\103\x43\105\123\x53")) {
            goto lq;
        }
        $ii = array("\x63\165\163\164\157\x6d\x65\162\x49\144" => $D_, "\x6c\x69\x63\145\156\163\145\x54\171\160\145" => "\104\x45\115\117");
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        $DN = json_decode($Th);
        lq:
        return $DN;
    }
    public static function ccl($D_, $sI)
    {
        $jv = TwoFAConstants::HOSTNAME . "\57\x6d\157\141\x73\57\162\x65\x73\x74\x2f\143\165\163\x74\157\155\x65\162\57\154\x69\x63\x65\x6e\x73\x65";
        $ii = array("\x63\165\163\164\157\155\145\162\x49\x64" => $D_, "\x61\160\160\x6c\151\143\x61\164\x69\x6f\x6e\x4e\x61\155\x65" => TwoFAConstants::PLAN_NAME);
        $EA = self::createAuthHeader($D_, $sI);
        $Th = self::callAPI($jv, $ii, $EA);
        $DN = json_decode($Th);
        return $DN;
    }
    public static function CustomGateway_SMS_callAPI($jv, $UJ = array(), $Dn = array("\x43\x6f\x6e\x74\145\x6e\164\55\124\x79\160\145\72\x20\141\x70\x70\x6c\151\x63\141\x74\x69\x6f\x6e\x2f\152\163\157\x6e"))
    {
        $SH = new MoCurl();
        $sZ = ["\103\125\x52\x4c\117\120\x54\137\x46\x4f\114\x4c\x4f\127\x4c\117\103\101\x54\111\117\116" => true, "\103\125\122\x4c\x4f\120\124\137\x45\x4e\103\117\x44\111\116\x47" => '', "\103\125\122\114\x4f\120\x54\x5f\122\105\124\125\122\x4e\124\122\x41\x4e\x53\106\105\122" => true, "\x43\x55\122\114\117\120\x54\137\x41\x55\124\117\122\x45\x46\105\x52\x45\x52" => true, "\103\125\122\114\x4f\120\x54\137\x54\x49\x4d\105\117\125\124" => 0, "\103\x55\x52\x4c\117\120\124\137\x4d\101\130\122\x45\104\x49\122\123" => 10];
        $AP = in_array("\103\x6f\x6e\164\145\x6e\x74\55\x54\x79\x70\145\72\x20\x61\160\x70\x6c\151\x63\141\164\151\157\x6e\x2f\x78\x2d\167\167\167\55\146\x6f\162\155\55\x75\162\x6c\x65\x6e\x63\157\144\145\x64", $Dn) ? !empty($UJ) ? http_build_query($UJ) : '' : (!empty($UJ) ? json_encode($UJ) : '');
        $TP = !empty($AP) ? "\120\x4f\123\x54" : "\107\x45\x54";
        $SH->setConfig($sZ);
        $SH->write($TP, $jv, "\x31\56\x31", $Dn, $AP);
        $ce = $SH->read();
        $SH->close();
        return $ce;
    }
}

Function Calls

None

Variables

None

Stats

MD5 88f89aa6a5185594b3c79fb09fecf8ed
Eval Count 0
Decode Time 69 ms