403Webshell
Server IP : 178.212.43.201  /  Your IP : 10.100.0.33
Web Server : Apache/2.4.37 (Oracle Linux Server) OpenSSL/1.1.1k
System : Linux spa0007.srv.paxillus.pl 5.4.17-2136.355.3.1.el8uek.x86_64 #3 SMP Sat May 9 17:11:55 PDT 2026 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/paxillus/wp-content/plugins/wp-optimize-premium/webp/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/paxillus/wp-content/plugins/wp-optimize-premium/webp/class-wpo-server-info.php
<?php
if (!defined('WPO_PLUGIN_MAIN_PATH')) die('No direct access allowed');

class WPO_Server_Info {

	private static $_instance = null;

	/**
	 * @var $_server_name Web server engine name
	 */
	private $_server_name;

	/**
	 * @var $_rewrite_status Web server's URL rewrite ability
	 */
	private $_rewrite_status;

	/**
	 * Setup server information
	 */
	public function __construct() {
		$this->set_server_name();
		$this->set_rewrite_status();
	}

	/**
	 * Gets singleton instance
	 *
	 * @return object
	 */
	public static function get_instance() {
		if (null === self::$_instance) {
			self::$_instance = new self();
		}
		return self::$_instance;
	}

	/**
	 * Detect and set web server names
	 */
	private function set_server_name() {
		global $is_apache, $is_nginx, $is_iis7, $is_IIS;
		
		if ($is_apache) {
			$this->_server_name = 'apache';
		}

		if ($is_iis7) {
			$this->_server_name = 'iis7';
		}

		if ($is_IIS) {
			$this->_server_name = 'iis';
		}

		if ($is_nginx) {
			$this->_server_name = 'nginx';
		}
	}

	/**
	 * Sets web server's rewrite ability
	 */
	private function set_rewrite_status() {
		if ('apache' === $this->_server_name) {
			$this->test_htaccess_capabilities();
		} else {
			$this->_rewrite_status = false;
		}
	}

	/**
	 * Test Apache/LiteSpeed server's htaccess capabilities, and sets status and info
	 */
	private function test_htaccess_capabilities() {
		$htc = WPO_Htaccess_Capabilities::get_instance();
		if ($htc->htaccess_enabled && $htc->mod_rewrite && $htc->mod_headers && $htc->mod_mime) {
			$this->_rewrite_status = true;
		} elseif ($htc->htaccess_enabled) {
			$this->_rewrite_status = false;
		}
	}

	/**
	 * Getter for web server name
	 *
	 * @return string
	 */
	public function get_server_name() {
		return $this->_server_name;
	}

	/**
	 * Getter for web server's rewrite capability
	 *
	 * @return bool
	 */
	public function get_rewrite_status() {
		return $this->_rewrite_status;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit