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

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/public_html/wp-content/plugins/hellopack-client/modules//wordpress-seo-premium.php
<?php
/**
 * Yoast SEO Premium module.
 *
 * Redirects my.yoast.com subscription API calls to GLS3.
 * GLS3 returns valid subscription data for all Yoast addons.
 *
 * Subscription-based license system.
 * API domain: my.yoast.com
 * Addon slug: yoast-seo-wordpress-premium
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

use HelloPack\Client\Module\AbstractModule;
use HelloPack\Client\License\ApiRedirector;

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

/**
 * Yoast SEO Premium license module.
 */
/**
 * Yoast SEO Premium license module.
 *
 * phpcs:ignore WordPress.WP.CapitalPDangit.MisspelledClassName
 */
class WordPress_Seo_Premium extends AbstractModule {

	/**
	 * Yoast addon slug for Premium.
	 *
	 * @var string
	 */
	private const ADDON_SLUG = 'yoast-seo-wordpress-premium';

	/**
	 * Transient names used by WPSEO_Addon_Manager.
	 *
	 * @var string
	 */
	private const TRANSIENT_MAIN = 'wpseo_site_information';

	/**
	 * Quick transient (60s TTL, used on dashboard/plugins pages).
	 *
	 * @var string
	 */
	private const TRANSIENT_QUICK = 'wpseo_site_information_quick';

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'wordpress-seo-premium';
		$this->name        = 'Yoast SEO Premium';
		$this->description = 'Manages Yoast SEO Premium license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.0.0';
		$this->target      = array(
			'plugin_dir'  => 'wordpress-seo-premium',
			'plugin_file' => 'wp-seo-premium.php',
		);
		$this->target_id   = '1279260631';

		$this->blocked_domains = array(
			'my.yoast.com/edd-sl-api' => self::edd_sl_block(),
			'://my.yoast.com/'        => self::edd_sl_block(),
		);
	}

	/**
	 * Initialize module.
	 */
	public function init(): void {
		ApiRedirector::create(
			'https://my.yoast.com',
			HELLOPACK_GLS3_URL . '/yoast-seo'
		);

		$this->seed_transients();
		$this->disable_ai_generator();

		// Suppress the "activate your subscription" notification.
		add_action( 'admin_init', array( $this, 'dismiss_license_notices' ), 14 );
	}

	/**
	 * Force-disable the Yoast AI content generator.
	 */
	private function disable_ai_generator(): void {
		if ( ! class_exists( 'WPSEO_Options' ) ) {
			return;
		}

		if ( \WPSEO_Options::get( 'enable_ai_generator' ) ) {
			\WPSEO_Options::set( 'enable_ai_generator', false );
		}
	}

	/**
	 * Pre-seed Yoast site information transients.
	 *
	 * Sets valid subscription data so Yoast never needs to call the API.
	 * The ApiRedirector is a safety net for when transients expire.
	 *
	 * Uses the mapped (snake_case) format because transients store
	 * post-map_subscription() data.
	 */
	private function seed_transients(): void {
		$existing = get_transient( self::TRANSIENT_MAIN );

		if ( $this->is_valid_transient( $existing ) ) {
			return;
		}

		$site_info = $this->build_site_information();
		set_transient( self::TRANSIENT_MAIN, $site_info, DAY_IN_SECONDS );
		set_transient( self::TRANSIENT_QUICK, $site_info, 60 );
	}

	/**
	 * Check if the existing transient has valid Premium subscription.
	 *
	 * @param mixed $transient The transient value.
	 * @return bool
	 */
	private function is_valid_transient( $transient ): bool {
		if ( ! is_object( $transient ) || ! isset( $transient->subscriptions ) ) {
			return false;
		}

		if ( ! is_array( $transient->subscriptions ) ) {
			return false;
		}

		foreach ( $transient->subscriptions as $sub ) {
			if (
				isset( $sub->product->slug ) &&
				self::ADDON_SLUG === $sub->product->slug &&
				isset( $sub->expiry_date ) &&
				strtotime( $sub->expiry_date ) > time()
			) {
				return true;
			}
		}

		return false;
	}

	/**
	 * Build site information object with all Yoast addon subscriptions.
	 *
	 * Format matches WPSEO_Addon_Manager::map_site_information() output
	 * (snake_case, stdClass objects).
	 *
	 * @return \stdClass
	 */
	private function build_site_information(): \stdClass {
		$expiry = gmdate( 'Y-m-d\TH:i:s.000\Z', strtotime( '+10 years' ) );
		$now    = gmdate( 'Y-m-d\TH:i:s.000\Z' );

		$addons = array(
			array(
				'slug'    => 'yoast-seo-wordpress-premium',
				'name'    => 'Yoast SEO Premium',
				'version' => defined( 'WPSEO_PREMIUM_VERSION' ) ? WPSEO_PREMIUM_VERSION : '26.9',
			),
			array(
				'slug'    => 'yoast-seo-local',
				'name'    => 'Yoast Local SEO',
				'version' => '15.7',
			),
			array(
				'slug'    => 'yoast-seo-video',
				'name'    => 'Yoast Video SEO',
				'version' => '15.1',
			),
			array(
				'slug'    => 'yoast-seo-news',
				'name'    => 'Yoast News SEO',
				'version' => '13.3',
			),
			array(
				'slug'    => 'yoast-seo-woocommerce',
				'name'    => 'Yoast WooCommerce SEO',
				'version' => '16.7',
			),
		);

		$subscriptions = array();

		foreach ( $addons as $addon ) {
			$subscriptions[] = (object) array(
				'renewal_url' => '',
				'expiry_date' => $expiry,
				'product'     => (object) array(
					'version'      => $addon['version'],
					'name'         => $addon['name'],
					'slug'         => $addon['slug'],
					'last_updated' => $now,
					'store_url'    => 'https://yoast.com/shop',
					'download'     => '',
					'changelog'    => '',
				),
			);
		}

		$url = function_exists( 'home_url' ) ? home_url( '/' ) : 'https://localhost/';

		return (object) array(
			'url'           => $url,
			'subscriptions' => $subscriptions,
		);
	}

	/**
	 * Dismiss Yoast license activation notices.
	 *
	 * Runs at priority 14 (before Yoast's validate_addons at priority 15)
	 * to remove any existing "activate your license" notifications.
	 */
	public function dismiss_license_notices(): void {
		if ( ! class_exists( 'Yoast_Notification_Center' ) ) {
			return;
		}

		$center = \Yoast_Notification_Center::get();

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

		$addon_names = array(
			'Yoast SEO Premium',
			'Yoast News SEO',
			'Yoast WooCommerce SEO',
			'Yoast Video SEO',
			'Yoast Local SEO',
		);

		foreach ( $addon_names as $name ) {
			$id           = 'wpseo-dismiss-' . sanitize_title_with_dashes( $name, null, 'save' );
			$notification = new \Yoast_Notification( '', array( 'id' => $id ) );
			$center->remove_notification( $notification );
		}
	}

	/**
	 * Cleanup on disable.
	 */
	public function cleanup(): void {
		delete_transient( self::TRANSIENT_MAIN );
		delete_transient( self::TRANSIENT_QUICK );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit