HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vm8 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: afleverb (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //var/www/wintergenomics_site/wp-content/plugins/ninjascanner/uninstall.php
<?php 
/* 
 +=====================================================================+ 
 |     _   _ _        _       ____                                     | 
 |    | \ | (_)_ __  (_) __ _/ ___|  ___ __ _ _ __  _ __   ___ _ __    | 
 |    |  \| | | '_ \ | |/ _` \___ \ / __/ _` | '_ \| '_ \ / _ \ '__|   | 
 |    | |\  | | | | || | (_| |___) | (_| (_| | | | | | | |  __/ |      | 
 |    |_| \_|_|_| |_|/ |\__,_|____/ \___\__,_|_| |_|_| |_|\___|_|      | 
 |                 |__/                                                | 
 |                                                                     | 
 | (c) NinTechNet ~ https://nintechnet.com/                            | 
 +=====================================================================+ 
*/ 
 
if (! defined('WP_UNINSTALL_PLUGIN') ) { exit( "Not allowed" ); } 
 
// ===================================================================== // 
// NinjaScanner uninstaller (database + files + cron jobs). 
 
$nscan_options = get_option( 'nscan_options' ); 
 
if ( empty( $nscan_options['dont_delete_cache'] ) ) { 
 
	// Remove database options: 
	delete_option( 'nscan_options' ); 
 
	// Find and recursively delete any files and folders 
	// located inside the cache directory: 
	nscan_remove_dir_uninstall( WP_CONTENT_DIR .'/ninjascanner' ); 
} 
 
// Remove any potential cron jobs: 
if ( wp_next_scheduled( 'nscan_garbage_collector' ) ) { 
	wp_clear_scheduled_hook( 'nscan_garbage_collector' ); 
} 
if ( wp_next_scheduled( 'nscan_scheduled_scan' ) ) { 
	wp_clear_scheduled_hook( 'nscan_scheduled_scan' ); 
} 
 
return; 
 
// ===================================================================== // 
 
function nscan_remove_dir_uninstall( $dir ) { 
 
	if ( is_dir( $dir ) ) { 
		$files = scandir( $dir ); 
		foreach ( $files as $file ) { 
			if ( $file == '.' || $file == '..' ) { continue; } 
			if ( is_dir( "$dir/$file" ) ) { 
				nscan_remove_dir_uninstall( "$dir/$file" ); 
			} else { 
				unlink( "$dir/$file" ); 
			} 
		} 
		rmdir( $dir ); 
	} 
} 
 
// ===================================================================== 
// EOF