403Webshell
Server IP : 195.130.67.5  /  Your IP : 216.73.217.154
Web Server : Microsoft-IIS/10.0
System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586
User : IUSR ( 0)
PHP Version : 7.4.19
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /inetpub/wwwroot/stirizo/wp-content/plugins/pojo-accessibility/modules/settings/rest/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /inetpub/wwwroot/stirizo/wp-content/plugins/pojo-accessibility/modules/settings/rest/get-media.php
<?php

namespace EA11y\Modules\Settings\Rest;

use EA11y\Modules\Settings\Classes\Route_Base;
use EA11y\Modules\Settings\Module as Settings;
use Throwable;
use WP_Error;
use WP_REST_Response;
use WP_REST_Request;

if ( ! defined( 'ABSPATH' ) ) {
	exit; // Exit if accessed directly
}

class Get_Media extends Route_Base {
	public string $path = 'get-media';

	public function get_methods(): array {
		return [ 'POST' ];
	}

	public function get_name(): string {
		return 'get-media';
	}

	/**
	 * @param WP_REST_Request $request
	 * @return WP_REST_Response | WP_Error
	 */
	public function POST( WP_REST_Request $request ) {

		try {
			$error = $this->verify_capability();

			if ( $error ) {
				return $error;
			}

			$url = esc_url_raw( $request->get_body() );

			$response = Settings::get_media( $url );

			return $this->respond_success_json( $response['body'] );

		} catch ( Throwable $t ) {
			return $this->respond_error_json( [
				'message' => $t->getMessage(),
				'code' => 'internal_server_error',
			] );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit