$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/www/wp-content/plugins/hellopack-client/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home2/krtkhu/www/wp-content/plugins/hellopack-client/modules/checkoutwc.php
<?php
/**
 * CheckoutWC module.
 *
 * Redirects Checkout for WooCommerce license API calls to GLS3.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

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

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

/**
 * Checkout for WooCommerce license module.
 */
class Checkoutwc extends AbstractModule {

	/**
	 * Valid Checkout for WooCommerce license key.
	 *
	 * The plugin only accepts a key that is exactly 32 characters long
	 * (UpdatesManager::get_license_key()); a shorter value makes every licence
	 * check bail out early and reset the stored plan to none.
	 *
	 * @var string
	 */
	private const LICENSE_KEY = '9f2b47c0d81e4a63b5f7c209ae63d418';

	/**
	 * Key length the plugin accepts.
	 *
	 * @var int
	 */
	private const LICENSE_KEY_LENGTH = 32;

	/**
	 * Licensed plan id (Agency).
	 *
	 * @var int
	 */
	private const PRICE_ID = 10;

	/**
	 * Licensed site limit.
	 *
	 * @var int
	 */
	private const LICENSE_LIMIT = 500;

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'checkoutwc';
		$this->name        = 'Checkout for WooCommerce';
		$this->description = 'Manages Checkout for WooCommerce license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.0.0';
		$this->target      = array(
			'plugin_dir'  => 'checkout-for-woocommerce',
			'plugin_file' => 'checkout-for-woocommerce.php',
		);
		$this->target_id   = '1750143640';

		$this->blocked_domains = array(
			'://www.checkoutwc.com/' => self::license_block(),
			'://checkoutwc.com/'     => self::license_block(),
		);
	}

	/**
	 * Blocked-domain response for the plugin's licence calls.
	 *
	 * Mirrors what GLS3 answers, so the plan the plugin stores matches the one
	 * this module writes and neither side keeps overwriting the other.
	 *
	 * @return array<string, array<string, mixed>>
	 */
	protected static function license_block(): array {
		return array(
			'response' => array(
				'success'          => true,
				'license'          => 'valid',
				'item_name'        => 'Checkout for WooCommerce',
				'expires'          => 'lifetime',
				'customer_name'    => 'HelloPack',
				'customer_email'   => 'license@hellowp.io',
				'license_limit'    => self::LICENSE_LIMIT,
				'site_count'       => 1,
				'activations_left' => 'unlimited',
				'payment_id'       => 1,
				'price_id'         => self::PRICE_ID,
			),
		);
	}

	/**
	 * Initialize module — redirect API calls, set license data.
	 */
	public function init(): void {
		ApiRedirector::create( 'https://www.checkoutwc.com', HELLOPACK_GLS3_URL . '/checkoutwc' );

		$this->set_license_data();
	}

	/**
	 * Replace a stored license key the plugin cannot use.
	 *
	 * The plugin reads the key only when it is exactly 32 characters long, so
	 * anything shorter — such as the placeholder written by earlier versions of
	 * this module — is swapped for a usable one. A key that is already the
	 * right length is left untouched.
	 */
	private function ensure_license_key(): void {
		$stored = get_option( '_cfw_licensing__license_key' );
		$stored = is_scalar( $stored ) ? trim( (string) $stored ) : '';

		if ( self::LICENSE_KEY_LENGTH !== strlen( $stored ) ) {
			update_option( '_cfw_licensing__license_key', self::LICENSE_KEY );
		}
	}

	/**
	 * Set EDD license options.
	 */
	private function set_license_data(): void {
		$this->ensure_license_key();

		$options = array(
			'_cfw_licensing__key_status'   => 'valid',
			'cfw_license_activation_limit' => self::LICENSE_LIMIT,
			'cfw_license_price_id'         => self::PRICE_ID,
		);

		foreach ( $options as $key => $value ) {
			$current = get_option( $key );

			// Options come back as strings, so compare loosely — a strict check
			// would rewrite the same value on every request.
			if ( false === $current || (string) $current !== (string) $value ) {
				update_option( $key, $value );
			}
		}

		$license_data = get_option( 'cfw_license_data' );

		if ( ! is_object( $license_data )
			|| ! isset( $license_data->customer_name )
			|| 'HelloPack' !== $license_data->customer_name
		) {
			$data = (object) array(
				'customer_name'  => 'HelloPack',
				'customer_email' => 'license@hellowp.io',
				'license'        => 'valid',
				'license_limit'  => self::LICENSE_LIMIT,
				'price_id'       => self::PRICE_ID,
			);
			update_option( 'cfw_license_data', $data, false );
		}
	}

	/**
	 * Cleanup on disable — remove license data.
	 */
	public function cleanup(): void {
		update_option( '_cfw_licensing__key_status', 'invalid' );
		hellopack_delete_option( '_cfw_licensing__license_key' );
		hellopack_delete_option( 'cfw_license_activation_limit' );
		hellopack_delete_option( 'cfw_license_price_id' );
		hellopack_delete_option( 'cfw_license_data' );
		hellopack_delete_option( 'cfw_license_cache' );
		hellopack_delete_option( 'cfw_license_cache_time' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit