Online PHP and Javascript Decoder decode hidden script to uncover its real functionality


Show other level

namespace MO_CAW\Common\Views;

use MO_CAW\Common\DB_Utils;
use MO_CAW\Common\Constants;
use MO_CAW\Common\Functionality\MO_User as Common_MO_User_Functionality;
use MO_CAW\common\Utils;
class UI_Handler
{
    public $tab;
    public $action;
    public $connection_name;
    public function __construct()
    {
        $this->tab = !empty($_GET["tab"]) ? sanitize_text_field(wp_unslash($_GET["tab"])) : '';
        $this->action = !empty($_GET["action"]) ? sanitize_text_field(wp_unslash($_GET["action"])) : '';
        $this->connection_name = !empty($_GET["connection_name"]) ? sanitize_text_field(wp_unslash($_GET["connection_name"])) : '';
        $TJ = Constants::PLAN_NAMESPACE . "\Views\Display_Common";
        $user = "User verified";
        if (!("User verified" !== $user && Constants::USER_ACCOUNT_TAB !== $this->tab)) {
            goto Wy;
        }
        $this->tab = Constants::USER_ACCOUNT_TAB;
        $this->action = '';
        $this->connection_name = '';
        Wy:
    }
    private function display_tab_content()
    {
        $HU = Constants::PLAN_NAMESPACE . "\Functionality\MO_User";
        if (!(!$HU::does_user_has_license() && Constants::PRICING_PLAN_TAB !== $this->tab)) {
            goto hl;
        }
        $this->tab = Constants::USER_ACCOUNT_TAB;
        hl:
        switch ($this->tab) {
            case Constants::CUSTOM_API_TAB:
                $Yu = $this->instance_creator("API_Creation");
                $Yu->display_api_creation_ui($this->tab, $this->action);
                goto JJ;
            case Constants::CUSTOM_SQL_API_TAB:
                $Ck = $this->instance_creator("SQL_API_Creation");
                $Ck->display_sql_api_creation_ui($this->tab, $this->action);
                goto JJ;
            case Constants::CONNECT_EXTERNAL_API_TAB:
                $bg = $this->instance_creator("External_API_Connection");
                $bg->display_external_api_connection_ui($this->tab, $this->action);
                goto JJ;
            case Constants::PRICING_PLAN_TAB:
                License::display_license_plans();
                goto JJ;
            case Constants::USER_ACCOUNT_TAB:
                $bg = $this->instance_creator("MO_User");
                $bg->display_user_account_ui($this->tab, $this->action);
                goto JJ;
            default:
                $Yu = $this->instance_creator("API_Creation");
                $Yu->display_api_creation_ui($this->tab, $this->action);
        }
        kp:
        JJ:
    }
    public function display_complete_content()
    {
        Display_Common::display_top_navbar();
        Display_Common::display_side_navbar($this->tab);
        MO_User::display_support_popup();
        echo "	\x9<div class="row ps-5 ms-4 mei">
			<div>\xa	\x9\x9\x9";
        Display_Common::display_notice();
        echo "\x9	\x9</div>\xa\x9\x9\x9<div class="col-md-8 ps-3" >
		\x9	<div class="my-3" >
\x9\x9	\x9	";
        $this->display_tab_content();
        echo "\x9\x9		</div>
		\x9</div>\xa\x9		<div class="col-md-4">
\x9		\x9";
        Display_Common::display_side_section();
        echo "\x9\x9	</div>
\x9	</div>
\x9\x9";
    }
    public static function enable_disable_api()
    {
        $zi = isset($_POST["type"]) ? sanitize_text_field(wp_unslash($_POST["type"])) : true;
        if (Constants::GUI_ENDPOINT === $zi) {
            goto AT;
        }
        if (Constants::SQL_ENDPOINT === $zi) {
            goto cF;
        }
        if (Constants::EXTERNAL_ENDPOINT === $zi) {
            goto RD;
        }
        goto jE;
        AT:
        $Sw = "mo_caw_custom_api_enable_disable_api";
        goto jE;
        cF:
        $Sw = "mo_caw_custom_sql_api_enable_disable_api";
        goto jE;
        RD:
        $Sw = "mo_caw_external_api_enable_disable_api";
        jE:
        if (isset($_POST["nonce"]) && check_ajax_referer($Sw, "nonce")) {
            goto zT;
        }
        wp_send_json_error("Invalid nonce", 400);
        goto Ai;
        zT:
        $hW = isset($_POST["api-name"]) ? sanitize_text_field(wp_unslash($_POST["api-name"])) : '';
        $we = isset($_POST["method"]) ? sanitize_text_field(wp_unslash($_POST["method"])) : '';
        $Qi = isset($_POST["namespace"]) ? sanitize_text_field(wp_unslash($_POST["namespace"])) : '';
        $ip = isset($_POST["is-enabled"]) ? sanitize_text_field(wp_unslash($_POST["is-enabled"])) : true;
        $ip = "false" === $ip ? false : true;
        if (!empty($hW)) {
            goto Lk;
        }
        wp_send_json_error("Invalid API name", 400);
        goto eM;
        Lk:
        $ax = array("type" => $zi, "connection_name" => $hW, "method" => $we, "namespace" => $Qi, "is_enabled" => $ip);
        $nm = DB_Utils::update_enable_of_endpoint($ax);
        if ($nm) {
            goto od;
        }
        wp_send_json_error("An error occurred " . ($ip ? "enabling" : "disabling") . " the API", 400);
        goto UC;
        od:
        wp_send_json_success("API " . ($ip ? "enabled" : "disabled") . " successfully", 200);
        UC:
        eM:
        Ai:
    }
    public function instance_creator($lr)
    {
        $mM = Constants::PLAN_NAMESPACE . "\Views\";
        $z8 = $mM . $lr;
        $Y7 = new $z8($this->action);
        return $Y7;
    }
}

namespace MO_CAW\Common\Views;

use MO_CAW\Common\DB_Utils;
use MO_CAW\Common\Constants;
use MO_CAW\Common\Functionality\MO_User as Common_MO_User_Functionality;
use MO_CAW\common\Utils;
class UI_Handler
{
    public $tab;
    public $action;
    public $connection_name;
    public function __construct()
    {
        $this->tab = !empty($_GET["tab"]) ? sanitize_text_field(wp_unslash($_GET["tab"])) : '';
        $this->action = !empty($_GET["action"]) ? sanitize_text_field(wp_unslash($_GET["action"])) : '';
        $this->connection_name = !empty($_GET["connection_name"]) ? sanitize_text_field(wp_unslash($_GET["connection_name"])) : '';
        $TJ = Constants::PLAN_NAMESPACE . "\Views\Display_Common";
        $user = "User verified";
        if (!("User verified" !== $user && Constants::USER_ACCOUNT_TAB !== $this->tab)) {
            goto Wy;
        }
        $this->tab = Constants::USER_ACCOUNT_TAB;
        $this->action = '';
        $this->connection_name = '';
        Wy:
    }
    private function display_tab_content()
    {
        $HU = Constants::PLAN_NAMESPACE . "\Functionality\MO_User";
        if (!(!$HU::does_user_has_license() && Constants::PRICING_PLAN_TAB !== $this->tab)) {
            goto hl;
        }
        $this->tab = Constants::USER_ACCOUNT_TAB;
        hl:
        switch ($this->tab) {
            case Constants::CUSTOM_API_TAB:
                $Yu = $this->instance_creator("API_Creation");
                $Yu->display_api_creation_ui($this->tab, $this->action);
                goto JJ;
            case Constants::CUSTOM_SQL_API_TAB:
                $Ck = $this->instance_creator("SQL_API_Creation");
                $Ck->display_sql_api_creation_ui($this->tab, $this->action);
                goto JJ;
            case Constants::CONNECT_EXTERNAL_API_TAB:
                $bg = $this->instance_creator("External_API_Connection");
                $bg->display_external_api_connection_ui($this->tab, $this->action);
                goto JJ;
            case Constants::PRICING_PLAN_TAB:
                License::display_license_plans();
                goto JJ;
            case Constants::USER_ACCOUNT_TAB:
                $bg = $this->instance_creator("MO_User");
                $bg->display_user_account_ui($this->tab, $this->action);
                goto JJ;
            default:
                $Yu = $this->instance_creator("API_Creation");
                $Yu->display_api_creation_ui($this->tab, $this->action);
        }
        kp:
        JJ:
    }
    public function display_complete_content()
    {
        Display_Common::display_top_navbar();
        Display_Common::display_side_navbar($this->tab);
        MO_User::display_support_popup();
        echo "	\x9<div class="row ps-5 ms-4 mei">
			<div>\xa	\x9\x9\x9";
        Display_Common::display_notice();
        echo "\x9	\x9</div>\xa\x9\x9\x9<div class="col-md-8 ps-3" >
		\x9	<div class="my-3" >
\x9\x9	\x9	";
        $this->display_tab_content();
        echo "\x9\x9		</div>
		\x9</div>\xa\x9		<div class="col-md-4">
\x9		\x9";
        Display_Common::display_side_section();
        echo "\x9\x9	</div>
\x9	</div>
\x9\x9";
    }
    public static function enable_disable_api()
    {
        $zi = isset($_POST["type"]) ? sanitize_text_field(wp_unslash($_POST["type"])) : true;
        if (Constants::GUI_ENDPOINT === $zi) {
            goto AT;
        }
        if (Constants::SQL_ENDPOINT === $zi) {
            goto cF;
        }
        if (Constants::EXTERNAL_ENDPOINT === $zi) {
            goto RD;
        }
        goto jE;
        AT:
        
        goto jE;
        cF:
        "mo_caw_custom_api_enable_disable_api" = "mo_caw_custom_sql_api_enable_disable_api";
        goto jE;
        RD:
        "mo_caw_custom_api_enable_disable_api" = "mo_caw_external_api_enable_disable_api";
        jE:
        if (isset($_POST["nonce"]) && check_ajax_referer("mo_caw_custom_api_enable_disable_api", "nonce")) {
            goto zT;
        }
        wp_send_json_error("Invalid nonce", 400);
        goto Ai;
        zT:
        $hW = isset($_POST["api-name"]) ? sanitize_text_field(wp_unslash($_POST["api-name"])) : '';
        $we = isset($_POST["method"]) ? sanitize_text_field(wp_unslash($_POST["method"])) : '';
        $Qi = isset($_POST["namespace"]) ? sanitize_text_field(wp_unslash($_POST["namespace"])) : '';
        $ip = isset($_POST["is-enabled"]) ? sanitize_text_field(wp_unslash($_POST["is-enabled"])) : true;
        $ip = "false" === $ip ? false : true;
        if (!empty($hW)) {
            goto Lk;
        }
        wp_send_json_error("Invalid API name", 400);
        goto eM;
        Lk:
        $ax = array("type" => $zi, "connection_name" => $hW, "method" => $we, "namespace" => $Qi, "is_enabled" => $ip);
        $nm = DB_Utils::update_enable_of_endpoint($ax);
        if ($nm) {
            goto od;
        }
        wp_send_json_error("An error occurred " . ($ip ? "enabling" : "disabling") . " the API", 400);
        goto UC;
        od:
        wp_send_json_success("API " . ($ip ? "enabled" : "disabled") . " successfully", 200);
        UC:
        eM:
        Ai:
    }
    public function instance_creator($lr)
    {
        $mM = Constants::PLAN_NAMESPACE . "\Views\";
        $z8 = $mM . $lr;
        $Y7 = new $z8($this->action);
        return $Y7;
    }
}



© 2023 Quttera Ltd. All rights reserved.