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 /** * Plugin Name: miniorange saml sp multiple idp url domain mapping add-on * ..

Decoded Output download

<?php 
/** 
 * Plugin Name: miniorange saml sp multiple idp url domain mapping add-on 
 * Plugin URI: http://miniorange.com 
 * Description: miniorange saml sp multiple idp url domain mapping add-on. 
 * Version: 1.0.0 
 * Author: miniOrange 
 * License: GPL2 
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html  
 */ 
 
 
include_once __DIR__ . "/views/mo_saml_url_domain_view.php"; 
include_once ABSPATH . "wp-admin/includes/plugin.php"; 
class mo_saml_url_domain_map 
{ 
    public function __construct() 
    { 
        add_action("admin_menu", array($this, "mo_saml_url_domain_map_miniorange_menu"), 11); 
        add_action("admin_init", array($this, "mo_saml_check_current_url_addon"), 10); 
        add_filter("redirect_filter", array($this, "redirect_to_url"), 10, 1); 
    } 
    public function mo_saml_url_domain_map_miniorange_menu() 
    { 
        add_menu_page("URL based mapping to IDP", "URL based mapping to IDP", "administrator", "mo_saml_url_domain_map::MENU_SLUG", "mo_saml_url_based_domain_mapping", plugin_dir_url(__FILE__) . "images/miniorange.png"); 
    } 
    public function mo_saml_check_current_url_addon() 
    { 
        if (!(array_key_exists("option", $_POST) && $_POST["option"] == "url_domain_mapping_failed_options")) { 
            goto s0; 
        } 
        $Io = ''; 
        if (!isset($_POST["mo_saml_domain_url_login_fail"])) { 
            goto ih; 
        } 
        $Io = $_POST["mo_saml_domain_url_login_fail"]; 
        ih: 
        if ($Io === "use_wp_credentials") { 
            goto hE; 
        } 
        if (!($Io === "redirect_to_default_idp")) { 
            goto TW; 
        } 
        $yP = ''; 
        $CT = "true"; 
        TW: 
        goto JE; 
        hE: 
        $yP = "true"; 
        $CT = ''; 
        JE: 
        $yP = $CT === "true" ? '' : $yP; 
        update_option("mo_saml_domain_url_login_fail", $yP); 
        update_option("mo_saml_fallback_to_default_idp_for_url_domain_mapping_addon", $CT); 
        s0: 
        if (!(array_key_exists("option", $_POST) && $_POST["option"] == "mo_saml_login_form_for_url_domain_mapping")) { 
            goto Lu; 
        } 
        $Ek = maybe_unserialize(get_option("saml_identity_providers")); 
        $Ek = maybe_unserialize($Ek); 
        $RD = array(); 
        foreach ($Ek as $Ue => $Pb) { 
            $zb = "mo_saml_url_domain_mapping_" . $Ue; 
            $RD[$zb] = stripslashes($_POST[$zb]); 
            zI: 
        } 
        OJ: 
        update_option("mo_saml_url_domain_mapping", $RD); 
        Lu: 
    } 
    function redirect_to_url($w2) 
    { 
        $o2 = get_option("mo_saml_url_domain_mapping"); 
        $EH = maybe_unserialize(get_option("saml_identity_providers")); 
        foreach ($EH as $Ue => $Pb) { 
            $o_ = ''; 
            if (!array_key_exists("mo_saml_url_domain_mapping_" . $Ue, $o2)) { 
                goto MY; 
            } 
            $o_ = $o2["mo_saml_url_domain_mapping_" . $Ue]; 
            MY: 
            if (empty($o_)) { 
                goto cx; 
            } 
            $iq = parse_url($o_); 
            if (!($_SERVER["HTTP_HOST"] == $iq["host"])) { 
                goto pf; 
            } 
            return $EH[$Ue]; 
            pf: 
            cx: 
            gp: 
        } 
        aY: 
        if (!(get_option("mo_saml_fallback_to_default_idp_for_url_domain_mapping_addon") == '' and !is_user_logged_in())) { 
            goto FR; 
        } 
        if (!is_plugin_active("ultimate-member/ultimate-member.php")) { 
            goto tA; 
        } 
        return null; 
        tA: 
        $qu = parse_url($this->saml_get_current_page_url(), PHP_URL_PATH); 
        wp_redirect(wp_login_url($qu)); 
        exit; 
        FR: 
        return $w2; 
    } 
    public function saml_get_current_page_url() 
    { 
        $d2 = $_SERVER["HTTP_HOST"]; 
        if (!(substr($d2, -1) == "/")) { 
            goto qn; 
        } 
        $d2 = substr($d2, 0, -1); 
        qn: 
        $Vu = $_SERVER["REQUEST_URI"]; 
        if (!(substr($Vu, 0, 1) == "/")) { 
            goto UU; 
        } 
        $Vu = substr($Vu, 1); 
        UU: 
        $P6 = isset($_SERVER["HTTPS"]) && strcasecmp($_SERVER["HTTPS"], "on") == 0; 
        $iw = "http" . ($P6 ? "s" : '') . "://" . $d2 . "/" . $Vu; 
        return $iw; 
    } 
} 
$bl = new mo_saml_url_domain_map(); 
 ?>

Did this file decode correctly?

Original Code

<?php
/**
 * Plugin Name: miniorange saml sp multiple idp url domain mapping add-on
 * Plugin URI: http://miniorange.com
 * Description: miniorange saml sp multiple idp url domain mapping add-on.
 * Version: 1.0.0
 * Author: miniOrange
 * License: GPL2
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html 
 */


include_once __DIR__ . "\x2f\166\x69\145\167\x73\57\x6d\x6f\x5f\x73\x61\x6d\x6c\137\x75\162\154\137\144\157\x6d\x61\x69\156\x5f\166\x69\x65\x77\56\160\150\x70";
include_once ABSPATH . "\167\x70\55\141\x64\x6d\x69\x6e\x2f\151\x6e\143\154\165\x64\x65\x73\57\x70\x6c\165\x67\x69\x6e\56\x70\x68\160";
class mo_saml_url_domain_map
{
    public function __construct()
    {
        add_action("\141\x64\x6d\x69\x6e\x5f\155\x65\x6e\x75", array($this, "\x6d\157\x5f\163\141\155\x6c\x5f\165\162\154\137\x64\157\155\x61\151\x6e\137\x6d\x61\160\x5f\155\x69\x6e\151\157\x72\141\156\147\145\x5f\155\145\156\x75"), 11);
        add_action("\x61\x64\155\151\x6e\137\151\156\x69\x74", array($this, "\155\x6f\137\x73\x61\155\154\x5f\x63\150\145\x63\153\x5f\143\165\x72\x72\x65\156\x74\137\165\x72\x6c\x5f\x61\x64\x64\157\x6e"), 10);
        add_filter("\162\x65\144\x69\x72\x65\x63\164\x5f\x66\x69\154\x74\145\x72", array($this, "\x72\x65\x64\151\x72\x65\x63\x74\x5f\164\x6f\137\165\x72\154"), 10, 1);
    }
    public function mo_saml_url_domain_map_miniorange_menu()
    {
        add_menu_page("\x55\x52\x4c\40\142\x61\x73\145\x64\x20\155\141\160\160\x69\x6e\147\40\164\x6f\x20\111\x44\x50", "\125\x52\x4c\x20\142\141\x73\x65\144\x20\155\141\160\x70\151\x6e\x67\40\164\x6f\40\111\104\x50", "\141\144\x6d\151\x6e\151\x73\164\162\141\164\157\x72", "\155\157\137\163\141\x6d\154\x5f\165\x72\154\x5f\144\x6f\155\141\x69\x6e\137\x6d\x61\x70\x3a\72\x4d\105\x4e\x55\x5f\x53\x4c\x55\x47", "\155\x6f\137\x73\141\x6d\154\x5f\x75\162\154\137\x62\141\x73\x65\x64\x5f\x64\x6f\155\141\x69\x6e\x5f\155\x61\160\160\151\x6e\147", plugin_dir_url(__FILE__) . "\x69\x6d\x61\x67\145\163\x2f\155\151\156\151\x6f\x72\141\x6e\147\145\x2e\x70\156\x67");
    }
    public function mo_saml_check_current_url_addon()
    {
        if (!(array_key_exists("\157\160\x74\151\x6f\x6e", $_POST) && $_POST["\157\160\x74\151\157\156"] == "\165\162\154\x5f\x64\x6f\155\x61\x69\156\x5f\155\x61\160\x70\151\x6e\x67\x5f\146\141\151\154\145\144\137\x6f\x70\x74\151\157\x6e\x73")) {
            goto s0;
        }
        $Io = '';
        if (!isset($_POST["\155\x6f\x5f\x73\x61\155\x6c\137\144\x6f\155\141\x69\x6e\x5f\x75\162\154\x5f\x6c\x6f\147\151\x6e\x5f\146\x61\151\x6c"])) {
            goto ih;
        }
        $Io = $_POST["\x6d\157\137\x73\x61\155\154\x5f\144\157\155\x61\151\x6e\137\x75\x72\154\x5f\154\157\147\x69\x6e\x5f\x66\x61\x69\154"];
        ih:
        if ($Io === "\x75\x73\145\137\167\160\137\143\162\145\144\145\156\x74\x69\x61\154\163") {
            goto hE;
        }
        if (!($Io === "\162\x65\144\151\x72\x65\143\x74\137\164\157\x5f\144\x65\x66\x61\165\x6c\164\x5f\151\x64\160")) {
            goto TW;
        }
        $yP = '';
        $CT = "\x74\x72\165\x65";
        TW:
        goto JE;
        hE:
        $yP = "\x74\162\165\x65";
        $CT = '';
        JE:
        $yP = $CT === "\x74\x72\x75\x65" ? '' : $yP;
        update_option("\x6d\x6f\137\163\141\155\x6c\137\x64\157\155\x61\151\x6e\x5f\x75\x72\154\137\154\x6f\x67\151\156\x5f\146\x61\151\x6c", $yP);
        update_option("\155\x6f\x5f\x73\x61\155\154\137\146\x61\x6c\154\142\141\143\x6b\137\164\157\137\x64\x65\x66\141\x75\x6c\x74\x5f\151\x64\160\x5f\x66\x6f\x72\137\x75\162\154\137\144\x6f\x6d\x61\151\156\x5f\155\141\160\x70\x69\x6e\x67\137\141\x64\x64\x6f\x6e", $CT);
        s0:
        if (!(array_key_exists("\157\x70\164\x69\157\x6e", $_POST) && $_POST["\x6f\x70\164\x69\x6f\156"] == "\155\157\x5f\163\x61\155\154\x5f\154\157\147\x69\156\137\146\x6f\162\155\137\146\x6f\x72\x5f\x75\x72\x6c\137\144\x6f\x6d\141\x69\x6e\137\x6d\x61\x70\x70\151\156\x67")) {
            goto Lu;
        }
        $Ek = maybe_unserialize(get_option("\x73\141\155\x6c\137\151\144\x65\156\164\x69\164\171\137\x70\162\157\166\151\x64\145\x72\163"));
        $Ek = maybe_unserialize($Ek);
        $RD = array();
        foreach ($Ek as $Ue => $Pb) {
            $zb = "\155\157\137\x73\141\x6d\154\137\165\162\154\137\144\157\x6d\141\151\x6e\137\155\141\160\160\x69\156\147\x5f" . $Ue;
            $RD[$zb] = stripslashes($_POST[$zb]);
            zI:
        }
        OJ:
        update_option("\155\157\x5f\x73\141\x6d\x6c\x5f\x75\162\x6c\x5f\x64\157\155\x61\151\156\x5f\155\x61\160\x70\x69\156\147", $RD);
        Lu:
    }
    function redirect_to_url($w2)
    {
        $o2 = get_option("\x6d\157\x5f\x73\x61\x6d\154\x5f\x75\162\154\137\x64\157\x6d\x61\x69\156\x5f\155\141\160\x70\151\156\x67");
        $EH = maybe_unserialize(get_option("\x73\141\x6d\154\x5f\x69\x64\x65\x6e\x74\x69\x74\x79\x5f\x70\162\x6f\x76\x69\x64\145\162\x73"));
        foreach ($EH as $Ue => $Pb) {
            $o_ = '';
            if (!array_key_exists("\x6d\157\x5f\x73\141\155\x6c\x5f\x75\x72\x6c\137\x64\x6f\x6d\x61\x69\156\x5f\155\x61\x70\x70\x69\x6e\x67\x5f" . $Ue, $o2)) {
                goto MY;
            }
            $o_ = $o2["\x6d\x6f\137\163\141\x6d\154\x5f\165\x72\x6c\x5f\x64\x6f\155\x61\x69\156\x5f\155\x61\x70\160\151\x6e\147\x5f" . $Ue];
            MY:
            if (empty($o_)) {
                goto cx;
            }
            $iq = parse_url($o_);
            if (!($_SERVER["\x48\124\124\x50\137\x48\117\x53\x54"] == $iq["\150\x6f\163\x74"])) {
                goto pf;
            }
            return $EH[$Ue];
            pf:
            cx:
            gp:
        }
        aY:
        if (!(get_option("\x6d\x6f\x5f\163\141\x6d\154\137\x66\x61\x6c\154\142\x61\x63\153\137\x74\x6f\137\144\x65\146\x61\x75\x6c\x74\x5f\151\x64\160\x5f\x66\x6f\162\x5f\165\x72\154\137\144\x6f\x6d\x61\x69\156\x5f\x6d\x61\x70\x70\x69\x6e\147\137\141\x64\x64\x6f\156") == '' and !is_user_logged_in())) {
            goto FR;
        }
        if (!is_plugin_active("\x75\154\x74\x69\x6d\x61\x74\145\55\155\145\x6d\142\x65\x72\57\165\154\x74\x69\155\141\164\145\55\155\145\155\142\145\x72\x2e\160\150\x70")) {
            goto tA;
        }
        return null;
        tA:
        $qu = parse_url($this->saml_get_current_page_url(), PHP_URL_PATH);
        wp_redirect(wp_login_url($qu));
        exit;
        FR:
        return $w2;
    }
    public function saml_get_current_page_url()
    {
        $d2 = $_SERVER["\110\124\x54\120\137\110\x4f\123\x54"];
        if (!(substr($d2, -1) == "\57")) {
            goto qn;
        }
        $d2 = substr($d2, 0, -1);
        qn:
        $Vu = $_SERVER["\122\105\x51\125\105\123\124\x5f\125\122\x49"];
        if (!(substr($Vu, 0, 1) == "\57")) {
            goto UU;
        }
        $Vu = substr($Vu, 1);
        UU:
        $P6 = isset($_SERVER["\110\x54\124\120\123"]) && strcasecmp($_SERVER["\110\x54\124\120\x53"], "\157\156") == 0;
        $iw = "\x68\x74\x74\160" . ($P6 ? "\163" : '') . "\72\x2f\57" . $d2 . "\57" . $Vu;
        return $iw;
    }
}
$bl = new mo_saml_url_domain_map();

Function Calls

None

Variables

None

Stats

MD5 2fdae11c4d76a7c12042258cb30519d9
Eval Count 0
Decode Time 222 ms