$plugin = <<403WebShell
403Webshell
Server IP : 193.224.177.188  /  Your IP : 216.73.217.123
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/www/wp-content/plugins/hellopack-client/includes/Admin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/www/wp-content/plugins/hellopack-client/includes/Admin/DomainMismatchNotice.php
<?php
/**
 * Domain mismatch admin notice.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Client\Admin;

use HelloPack\Client\License\TokenInspector;
use HelloPack\Client\Options;
use HelloPack\Client\Whitelabel;

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

/**
 * Warns on every admin screen when the API token belongs to another domain.
 *
 * Updates stop working silently in this case, so the notice is shown across the
 * whole admin area rather than only on the plugin's own pages, and it is not
 * dismissible while the condition holds.
 */
final class DomainMismatchNotice {

	/**
	 * Register the notice hooks.
	 */
	public static function register(): void {
		add_action( 'admin_notices', array( self::class, 'render' ) );

		if ( HELLOPACK_CLIENT_NETWORK_ACTIVATED ) {
			add_action( 'network_admin_notices', array( self::class, 'render' ) );
		}
	}

	/**
	 * Render the notice when the stored token belongs to another domain.
	 */
	public static function render(): void {
		// The API is the authority. When it reports an active connection it
		// accepted the token, and there is nothing to warn about.
		if ( 'active' === Options::get_status() ) {
			return;
		}

		$mismatch = TokenInspector::mismatch();

		if ( null === $mismatch ) {
			return;
		}

		$brand = Whitelabel::name();
		$brand = '' !== $brand ? $brand : __( 'HelloPack', 'hellopack-client' );

		// The "lw-notice" class keeps the notice visible on Lightweight plugin
		// screens, which hide every admin notice that does not carry it.
		printf(
			'<div class="notice notice-error lw-notice"><p><strong>%s</strong></p><p>%s</p><p>%s</p></div>',
			esc_html(
				sprintf(
					/* translators: %s: plugin or brand name. */
					__( '%s: this API key belongs to a different domain.', 'hellopack-client' ),
					$brand
				)
			),
			wp_kses(
				sprintf(
					/* translators: 1: domain the key was issued for, 2: domain of this site. */
					__( 'The key was issued for <code>%1$s</code>, but this site is <code>%2$s</code>. Updates and installs will not work until the key matches this domain.', 'hellopack-client' ),
					esc_html( $mismatch['token_domain'] ),
					esc_html( $mismatch['site_domain'] )
				),
				array( 'code' => array() )
			),
			sprintf(
				'<a href="%s">%s</a>',
				esc_url( self::settings_url() ),
				esc_html__( 'Enter a key for this domain', 'hellopack-client' )
			)
		);
	}

	/**
	 * Get the plugin settings page URL.
	 *
	 * @return string
	 */
	private static function settings_url(): string {
		$page = 'admin.php?page=hellopack-client';

		return HELLOPACK_CLIENT_NETWORK_ACTIVATED ? network_admin_url( $page ) : admin_url( $page );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit