$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/Cli/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/public_html/wp-content/plugins/hellopack-client/includes/Cli/SiteIterator.php
<?php
/**
 * Site iteration for WP-CLI commands.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Client\Cli;

use HelloPack\Client\Module\Loader as ModuleLoader;
use HelloPack\Client\Plugin;
use WP_CLI;

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

/**
 * Runs a callback on every site of a network (or the single site).
 */
trait SiteIterator {

	/**
	 * Run a callback on each selected site, switched into that site.
	 *
	 * On a single site the callback runs once for the current site. On a
	 * network it runs for every site, or only those in `--sites=1,2,3`.
	 *
	 * @param array<string, mixed> $assoc_args Command flags (reads `sites`).
	 * @param callable             $callback   Receives (int $blog_id, string $url).
	 */
	private function for_each_site( array $assoc_args, callable $callback ): void {
		if ( ! function_exists( 'is_plugin_active' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		if ( ! is_multisite() ) {
			$callback( get_current_blog_id(), home_url() );
			return;
		}

		$only = $this->parse_site_filter( $assoc_args );
		$ids  = get_sites(
			array(
				'fields' => 'ids',
				'number' => 10000,
			)
		);

		foreach ( $ids as $blog_id ) {
			$blog_id = (int) $blog_id;

			if ( ! empty( $only ) && ! in_array( $blog_id, $only, true ) ) {
				continue;
			}

			switch_to_blog( $blog_id );

			try {
				$callback( $blog_id, home_url() );
			} finally {
				restore_current_blog();
			}
		}
	}

	/**
	 * Parse the `--sites=1,2,3` filter.
	 *
	 * @param array<string, mixed> $assoc_args Command flags.
	 * @return array<int, int>
	 */
	private function parse_site_filter( array $assoc_args ): array {
		if ( empty( $assoc_args['sites'] ) ) {
			return array();
		}

		$ids = array_filter( array_map( 'absint', explode( ',', (string) $assoc_args['sites'] ) ) );

		if ( empty( $ids ) ) {
			WP_CLI::error( __( 'Invalid --sites value. Use a comma-separated list of site IDs.', 'hellopack-client' ) );
		}

		return array_values( $ids );
	}

	/**
	 * Make sure the purchased-items cache exists, so modules can tell whether
	 * their plugin is covered by the licence.
	 */
	private function warm_api_access(): void {
		$manager = Plugin::instance()->update_manager();

		if ( null !== $manager ) {
			$manager->items_cache()->get_plugins();
			$manager->items_cache()->get_themes();
		}
	}

	/**
	 * Get the module loader.
	 *
	 * @return ModuleLoader
	 */
	private function loader(): ModuleLoader {
		return ModuleLoader::instance();
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit