PK œqhYî¶J‚ßFßF)nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/ $#$#$#

Dir : /home/trave494/mytube.pm/wp-content/plugins/wp-simple-firewall/src/lib/src/Tables/Build/
Server: Linux ngx353.inmotionhosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64
IP: 209.182.202.254
Choose File :

Url:
Dir : /home/trave494/mytube.pm/wp-content/plugins/wp-simple-firewall/src/lib/src/Tables/Build/ScanWpv.php

<?php

namespace FernleafSystems\Wordpress\Plugin\Shield\Tables\Build;

use FernleafSystems\Wordpress\Plugin\Shield;
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\ModCon;
use FernleafSystems\Wordpress\Plugin\Shield\Modules\HackGuard\Scan;
use FernleafSystems\Wordpress\Services\Services;

/**
 * Class ScanWpv
 * @package FernleafSystems\Wordpress\Plugin\Shield\Tables\Build
 */
class ScanWpv extends ScanBase {

	/**
	 * @return array[]
	 */
	public function getEntriesFormatted() :array {
		$entries = [];

		/** @var ModCon $mod */
		$mod = $this->getMod();

		$WPP = Services::WpPlugins();
		$WPT = Services::WpThemes();

		// so that any available update will show
		$WPP->getUpdates( true );
		$WPT->getUpdates( true );

		$oConverter = new Scan\Results\ConvertBetweenTypes();
		foreach ( $this->getEntriesRaw() as $key => $entry ) {
			/** @var Shield\Databases\Scanner\EntryVO $entry */
			/** @var Shield\Scans\Wpv\ResultItem $item */
			$item = $oConverter
				->setScanController( $mod->getScanCon( $entry->scan ) )
				->convertVoToResultItem( $entry );
			$e = $entry->getRawData();
			if ( $item->context == 'plugins' ) {
				$asset = $WPP->getPluginAsVo( $item->slug );
				$e[ 'asset' ] = $asset;
				$e[ 'asset_name' ] = $asset->Name;
				$e[ 'asset_version' ] = $asset->Version;
				$e[ 'can_deactivate' ] = $WPP->isActive( $item->slug );
				$e[ 'has_update' ] = $WPP->isUpdateAvailable( $item->slug );
			}
			else {
				$asset = $WPT->getTheme( $item->slug );
				$e[ 'asset' ] = $asset;
				$e[ 'asset_name' ] = $asset->get( 'Name' );
				$e[ 'asset_version' ] = $asset->get( 'Version' );
				$e[ 'can_deactivate' ] = false;
				$e[ 'has_update' ] = $WPT->isUpdateAvailable( $item->slug );
			}
			$e[ 'slug' ] = $item->slug;
			$e[ 'wpvuln_vo' ] = $item->getVulnVo();
			$e[ 'ignored' ] = $this->formatIsIgnored( $entry );
			$e[ 'created_at' ] = $this->formatTimestampField( $entry->created_at );
			$entries[ $key ] = $e;
		}

		return $entries;
	}

	/**
	 * @return Shield\Tables\Render\WpListTable\ScanWpv
	 */
	protected function getTableRenderer() {
		return new Shield\Tables\Render\WpListTable\ScanWpv();
	}
}