$plugin = <<403WebShell
403Webshell
Server IP : 193.224.177.188  /  Your IP : 216.73.216.209
Web Server : Apache
System : Linux cpanel.krtk.mta.hu 3.10.0-962.3.2.lve1.5.89.el7.x86_64 #1 SMP Thu Jul 9 15:55:31 UTC 2026 x86_64
User : krtkhu ( 1061)
PHP Version : 8.4.28
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home2/krtkhu/public_html/wp-content/plugins/hellopack-client/includes/License/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/public_html/wp-content/plugins/hellopack-client/includes/License/OptionRecorder.php
<?php
/**
 * Licence option recorder.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Client\License;

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

/**
 * Records the licence options modules write through hellopack_ensure_option().
 *
 * Modules do not declare which options they set, so the only way to know is to
 * watch them do it. The recorder collects option name/value pairs while a
 * module initialises, and in dry-run mode it also suppresses the actual write —
 * which lets a read-only command (such as `wp hellopack network status`) learn
 * what a site *should* contain without changing it.
 */
final class OptionRecorder {

	/**
	 * Whether writes are currently suppressed.
	 *
	 * @var bool
	 */
	private static bool $dry_run = false;

	/**
	 * Whether recording is active.
	 *
	 * @var bool
	 */
	private static bool $recording = false;

	/**
	 * Recorded options: name => expected value.
	 *
	 * @var array<string, mixed>
	 */
	private static array $expected = array();

	/**
	 * Start recording.
	 *
	 * @param bool $dry_run Suppress writes while recording.
	 */
	public static function start( bool $dry_run = false ): void {
		self::$recording = true;
		self::$dry_run   = $dry_run;
		self::$expected  = array();
	}

	/**
	 * Stop recording and return what was recorded.
	 *
	 * @return array<string, mixed> Option name => expected value.
	 */
	public static function stop(): array {
		$expected = self::$expected;

		self::$recording = false;
		self::$dry_run   = false;
		self::$expected  = array();

		return $expected;
	}

	/**
	 * Record an option write.
	 *
	 * @param string $option Option name.
	 * @param mixed  $value  Value being written.
	 * @return bool True when the caller must skip the actual write (dry run).
	 */
	public static function record( string $option, mixed $value ): bool {
		if ( ! self::$recording ) {
			return false;
		}

		self::$expected[ $option ] = $value;

		return self::$dry_run;
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit