$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//ninja-forms.php
<?php
/**
 * Ninja Forms module.
 *
 * Blocks all API requests to api.ninjaforms.com and ninjaforms.com.
 * Replaces the Add-ons submenu with a HelloPack link.
 *
 * @package HelloPack\Client
 */

declare( strict_types=1 );

namespace HelloPack\Modules;

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

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

/**
 * Ninja Forms license module.
 */
class Ninja_Forms extends AbstractModule {

	/**
	 * Set up module properties.
	 */
	public function setup(): void {
		$this->id          = 'ninja-forms';
		$this->name        = 'Ninja Forms';
		$this->description = 'Blocks Ninja Forms API and manages menu.';
		$this->category    = 'plugin';
		$this->version     = '2.0.0';
		$this->target      = array(
			'plugin_dir'  => 'ninja-forms',
			'plugin_file' => 'ninja-forms.php',
		);
		$this->target_id   = '1018394750';

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

	/**
	 * Initialize module.
	 */
	public function init(): void {
		// Redirect both API domains to GLS3 ninja-forms handler.
		ApiRedirector::create(
			'https://api.ninjaforms.com',
			HELLOPACK_GLS3_URL . '/ninja-forms'
		);

		ApiRedirector::create(
			'https://ninjaforms.com',
			HELLOPACK_GLS3_URL . '/ninja-forms'
		);

		// Guard against a malformed `ninja_forms_addons_feed` option.
		// A previous GLS3 response could have written `{"success":true,"data":[]}`
		// into this option. NF_Admin_Menus_Addons::display() then iterates it
		// with `foreach ($items as &$item)`, which crashes on PHP 8+ with
		// "Cannot use a scalar value as an array". Returning false here makes
		// NF fall back to its bundled addons-feed.json.
		add_filter( 'option_ninja_forms_addons_feed', array( $this, 'filter_addons_feed' ) );

		// Replace Add-ons submenu with HelloPack link.
		add_action( 'admin_menu', array( $this, 'modify_menu' ), 999 );
	}

	/**
	 * Hide a malformed `ninja_forms_addons_feed` option from NF.
	 *
	 * A valid payload is a JSON-encoded list of addon objects. Anything else
	 * (notably `{"success":true,"data":[]}`) would crash the Add-Ons screen
	 * on PHP 8+, so we short-circuit to false and let NF use its bundled feed.
	 *
	 * @param mixed $value Option value from the database.
	 * @return mixed Original value when valid, false otherwise.
	 */
	public function filter_addons_feed( mixed $value ): mixed {
		if ( ! is_string( $value ) || '' === $value ) {
			return $value;
		}

		$decoded = json_decode( $value, true );

		if ( is_array( $decoded ) && ! empty( $decoded ) && is_array( reset( $decoded ) ) ) {
			return $value;
		}

		return false;
	}

	/**
	 * Modify Ninja Forms menu — replace Add-ons with HelloPack link.
	 */
	public function modify_menu(): void {
		global $submenu;

		if ( ! isset( $submenu['ninja-forms'] ) ) {
			return;
		}

		// Remove the original Add-ons menu item.
		foreach ( $submenu['ninja-forms'] as $key => $item ) {
			if ( isset( $item[2] ) && strpos( $item[2], '#add-ons' ) !== false ) {
				// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- Intentional menu modification.
				unset( $submenu['ninja-forms'][ $key ] );
				break;
			}
		}

		// Add HelloPack Add-ons link.
		// phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited -- Intentional menu modification.
		$submenu['ninja-forms'][] = array(
			__( 'Add-Ons', 'hellopack-client' ),
			'manage_options',
			'admin.php?page=hellopack-client&search_plugin=ninja+forms',
		);
	}

	/**
	 * Cleanup on disable.
	 */
	public function cleanup(): void {
		// No options to clean up — API blocking stops when module is disabled.
	}
}

Youez - 2016 - github.com/yon3zu
LinuXploit