SILENT KILLERPanel

Current Path: > > usr > src > litespeed-wp-plugin > > 7.1 > > litespeed-cache > src >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //usr/src/litespeed-wp-plugin//7.1//litespeed-cache/src/

NameTypeSizeLast ModifiedActions
cdn Directory - -
data_structure Directory - -
activation.cls.php File 15262 bytes April 24 2025 21:30:14.
admin-display.cls.php File 36240 bytes April 24 2025 21:30:14.
admin-settings.cls.php File 10266 bytes April 24 2025 21:30:14.
admin.cls.php File 4548 bytes April 24 2025 21:30:14.
api.cls.php File 11342 bytes April 24 2025 21:30:14.
avatar.cls.php File 6215 bytes April 24 2025 21:30:14.
base.cls.php File 31349 bytes April 24 2025 21:30:14.
cdn.cls.php File 13500 bytes April 24 2025 21:30:14.
cloud.cls.php File 53678 bytes April 24 2025 21:30:14.
conf.cls.php File 17803 bytes April 24 2025 21:30:14.
control.cls.php File 22153 bytes April 24 2025 21:30:14.
core.cls.php File 20310 bytes April 24 2025 21:30:14.
crawler-map.cls.php File 15013 bytes April 24 2025 21:30:14.
crawler.cls.php File 41611 bytes April 24 2025 21:30:14.
css.cls.php File 15501 bytes April 24 2025 21:30:14.
data.cls.php File 18036 bytes April 24 2025 21:30:14.
data.upgrade.func.php File 23662 bytes April 24 2025 21:30:14.
db-optm.cls.php File 10059 bytes April 24 2025 21:30:14.
debug2.cls.php File 13398 bytes April 24 2025 21:30:14.
doc.cls.php File 4843 bytes April 24 2025 21:30:14.
error.cls.php File 7056 bytes April 24 2025 21:30:14.
esi.cls.php File 27585 bytes April 24 2025 21:30:14.
file.cls.php File 10716 bytes April 24 2025 21:30:14.
gui.cls.php File 28133 bytes April 24 2025 21:30:14.
health.cls.php File 2962 bytes April 24 2025 21:30:14.
htaccess.cls.php File 24737 bytes April 24 2025 21:30:14.
img-optm.cls.php File 65636 bytes April 24 2025 21:30:14.
import.cls.php File 4250 bytes April 24 2025 21:30:14.
import.preset.cls.php File 5560 bytes April 24 2025 21:30:14.
lang.cls.php File 15247 bytes April 24 2025 21:30:14.
localization.cls.php File 3471 bytes April 24 2025 21:30:14.
media.cls.php File 33489 bytes April 24 2025 21:30:14.
metabox.cls.php File 4306 bytes April 24 2025 21:30:14.
object-cache.cls.php File 16216 bytes April 24 2025 21:30:14.
object.lib.php File 34784 bytes April 24 2025 21:30:14.
optimize.cls.php File 37847 bytes April 24 2025 21:30:14.
optimizer.cls.php File 9621 bytes April 24 2025 21:30:14.
placeholder.cls.php File 14424 bytes April 24 2025 21:30:14.
purge.cls.php File 31220 bytes April 24 2025 21:30:14.
report.cls.php File 6289 bytes April 24 2025 21:30:14.
rest.cls.php File 7629 bytes April 24 2025 21:30:14.
root.cls.php File 13085 bytes April 24 2025 21:30:14.
router.cls.php File 19975 bytes April 24 2025 21:30:14.
str.cls.php File 2429 bytes April 24 2025 21:30:14.
tag.cls.php File 9115 bytes April 24 2025 21:30:14.
task.cls.php File 6065 bytes April 24 2025 21:30:14.
tool.cls.php File 3499 bytes April 24 2025 21:30:14.
ucss.cls.php File 14513 bytes April 24 2025 21:30:14.
utility.cls.php File 21162 bytes April 24 2025 21:30:14.
vary.cls.php File 20572 bytes April 24 2025 21:30:14.
vpi.cls.php File 7364 bytes April 24 2025 21:30:14.

Reading File: //usr/src/litespeed-wp-plugin//7.1//litespeed-cache/src//report.cls.php

<?php

/**
 * The report class
 *
 *
 * @since      1.1.0
 * @package    LiteSpeed
 * @subpackage LiteSpeed/src
 * @author     LiteSpeed Technologies <info@litespeedtech.com>
 */

namespace LiteSpeed;

defined('WPINC') || exit();

class Report extends Base
{
	const TYPE_SEND_REPORT = 'send_report';

	/**
	 * Handle all request actions from main cls
	 *
	 * @since  1.6.5
	 * @access public
	 */
	public function handler()
	{
		$type = Router::verify_type();

		switch ($type) {
			case self::TYPE_SEND_REPORT:
				$this->post_env();
				break;

			default:
				break;
		}

		Admin::redirect();
	}

	/**
	 * post env report number to ls center server
	 *
	 * @since  1.6.5
	 * @access public
	 */
	public function post_env()
	{
		$report_con = $this->generate_environment_report();

		// Generate link
		$link = !empty($_POST['link']) ? esc_url($_POST['link']) : '';

		$notes = !empty($_POST['notes']) ? esc_html($_POST['notes']) : '';

		$php_info = !empty($_POST['attach_php']) ? esc_html($_POST['attach_php']) : '';
		$report_php = $php_info === '1' ? $this->generate_php_report() : '';

		if ($report_php) {
			$report_con .= "\nPHPINFO\n" . $report_php;
		}

		$data = array(
			'env' => $report_con,
			'link' => $link,
			'notes' => $notes,
		);

		$json = Cloud::post(Cloud::API_REPORT, $data);
		if (!is_array($json)) {
			return;
		}

		$num = !empty($json['num']) ? $json['num'] : '--';
		$summary = array(
			'num' => $num,
			'dateline' => time(),
		);

		self::save_summary($summary);

		return $num;
	}

	/**
	 * Gathers the PHP information.
	 *
	 * @since 7.0
	 * @access public
	 */
	public function generate_php_report($flags = INFO_GENERAL | INFO_CONFIGURATION | INFO_MODULES)
	{
		// INFO_ENVIRONMENT
		$report = '';

		ob_start();
		phpinfo($flags);
		$report = ob_get_contents();
		ob_end_clean();

		preg_match('%<style type="text/css">(.*?)</style>.*?<body>(.*?)</body>%s', $report, $report);

		return $report[2];
	}

	/**
	 * Gathers the environment details and creates the report.
	 * Will write to the environment report file.
	 *
	 * @since 1.0.12
	 * @access public
	 */
	public function generate_environment_report($options = null)
	{
		global $wp_version, $_SERVER;
		$frontend_htaccess = Htaccess::get_frontend_htaccess();
		$backend_htaccess = Htaccess::get_backend_htaccess();
		$paths = array($frontend_htaccess);
		if ($frontend_htaccess != $backend_htaccess) {
			$paths[] = $backend_htaccess;
		}

		if (is_multisite()) {
			$active_plugins = get_site_option('active_sitewide_plugins');
			if (!empty($active_plugins)) {
				$active_plugins = array_keys($active_plugins);
			}
		} else {
			$active_plugins = get_option('active_plugins');
		}

		if (function_exists('wp_get_theme')) {
			$theme_obj = wp_get_theme();
			$active_theme = $theme_obj->get('Name');
		} else {
			$active_theme = get_current_theme();
		}

		$extras = array(
			'wordpress version' => $wp_version,
			'siteurl' => get_option('siteurl'),
			'home' => get_option('home'),
			'home_url' => home_url(),
			'locale' => get_locale(),
			'active theme' => $active_theme,
		);

		$extras['active plugins'] = $active_plugins;
		$extras['cloud'] = Cloud::get_summary();
		foreach (array('mini_html', 'pk_b64', 'sk_b64', 'cdn_dash', 'ips') as $v) {
			if (!empty($extras['cloud'][$v])) {
				unset($extras['cloud'][$v]);
			}
		}

		if (is_null($options)) {
			$options = $this->get_options(true);

			if (is_multisite()) {
				$options2 = $this->get_options();
				foreach ($options2 as $k => $v) {
					if (isset($options[$k]) && $options[$k] !== $v) {
						$options['[Overwritten] ' . $k] = $v;
					}
				}
			}
		}

		if (!is_null($options) && is_multisite()) {
			$blogs = Activation::get_network_ids();
			if (!empty($blogs)) {
				$i = 0;
				foreach ($blogs as $blog_id) {
					if (++$i > 3) {
						// Only log 3 subsites
						break;
					}
					$opts = $this->cls('Conf')->load_options($blog_id, true);
					if (isset($opts[self::O_CACHE])) {
						$options['blog ' . $blog_id . ' radio select'] = $opts[self::O_CACHE];
					}
				}
			}
		}

		// Security: Remove cf key in report
		$secure_fields = array(self::O_CDN_CLOUDFLARE_KEY, self::O_OBJECT_PSWD);
		foreach ($secure_fields as $v) {
			if (!empty($options[$v])) {
				$options[$v] = str_repeat('*', strlen($options[$v]));
			}
		}

		$report = $this->build_environment_report($_SERVER, $options, $extras, $paths);
		return $report;
	}

	/**
	 * Builds the environment report buffer with the given parameters
	 *
	 * @access private
	 */
	private function build_environment_report($server, $options, $extras = array(), $htaccess_paths = array())
	{
		$server_keys = array(
			'DOCUMENT_ROOT' => '',
			'SERVER_SOFTWARE' => '',
			'X-LSCACHE' => '',
			'HTTP_X_LSCACHE' => '',
		);
		$server_vars = array_intersect_key($server, $server_keys);
		$server_vars[] = 'LSWCP_TAG_PREFIX = ' . LSWCP_TAG_PREFIX;

		$server_vars = array_merge($server_vars, $this->cls('Base')->server_vars());

		$buf = $this->_format_report_section('Server Variables', $server_vars);

		$buf .= $this->_format_report_section('WordPress Specific Extras', $extras);

		$buf .= $this->_format_report_section('LSCache Plugin Options', $options);

		if (empty($htaccess_paths)) {
			return $buf;
		}

		foreach ($htaccess_paths as $path) {
			if (!file_exists($path) || !is_readable($path)) {
				$buf .= $path . " does not exist or is not readable.\n";
				continue;
			}

			$content = file_get_contents($path);
			if ($content === false) {
				$buf .= $path . " returned false for file_get_contents.\n";
				continue;
			}
			$buf .= $path . " contents:\n" . $content . "\n\n";
		}
		return $buf;
	}

	/**
	 * Creates a part of the environment report based on a section header and an array for the section parameters.
	 *
	 * @since 1.0.12
	 * @access private
	 */
	private function _format_report_section($section_header, $section)
	{
		$tab = '    '; // four spaces

		if (empty($section)) {
			return 'No matching ' . $section_header . "\n\n";
		}
		$buf = $section_header;

		foreach ($section as $k => $v) {
			$buf .= "\n" . $tab;

			if (!is_numeric($k)) {
				$buf .= $k . ' = ';
			}

			if (!is_string($v)) {
				$v = var_export($v, true);
			} else {
				$v = esc_html($v);
			}

			$buf .= $v;
		}
		return $buf . "\n\n";
	}
}

SILENT KILLER Tool