asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T index.pl000064400000013070151030253020006200 0ustar00#!/usr/bin/perl ############################################################################### # Copyright 2006-2023, Way to the Web Limited # URL: http://www.configserver.com # Email: sales@waytotheweb.com ############################################################################### # start main use strict; use File::Find; use Fcntl qw(:DEFAULT :flock); use Sys::Hostname qw(hostname); use IPC::Open3; use lib '/usr/local/csf/lib'; use ConfigServer::DisplayUI; use ConfigServer::Config; our ($script, $images, $myv, %FORM, %in); my $config = ConfigServer::Config->loadconfig(); my %config = $config->config; open (my $IN, "<", "/etc/csf/version.txt") or die $!; $myv = <$IN>; close ($IN); chomp $myv; $script = "/nodeworx/configservercsf"; $images = "/configserver/csf"; my $buffer = $ENV{'QUERY_STRING'}; if ($buffer eq "") {$buffer = $ENV{POST}} my @pairs = split(/&/, $buffer); foreach my $pair (@pairs) { my ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } $FORM{action} = $FORM{iworxme}; delete $FORM{iworxme}; print "content-type: text/html\n\n"; #foreach my $key (keys %ENV) { # print "$key = [$ENV{$key}]
\n"; #} my $bootstrapcss = ""; my $jqueryjs = ""; my $bootstrapjs = ""; unless ($FORM{action} eq "tailcmd" or $FORM{action} =~ /^cf/ or $FORM{action} eq "logtailcmd" or $FORM{action} eq "loggrepcmd") { print < ConfigServer Security & Firewall $bootstrapcss $jqueryjs $bootstrapjs \n"; print <

ConfigServer Security & Firewall - csf v$myv

EOF } my $templatehtml; open (my $SCRIPTOUT, '>', \$templatehtml); select $SCRIPTOUT; ConfigServer::DisplayUI::main(\%FORM, $script, $script, $images, $myv); close ($SCRIPTOUT); select STDOUT; $templatehtml =~ s/\?action\=/?iworxme=/g; $templatehtml =~ s/\&action\=/&iworxme=/g; $templatehtml =~ s/\{action\}/{iworxme}/g; $templatehtml =~ s/\'action'/'iworxme'/g; $templatehtml =~ s/\"action"/"iworxme"/g; print $templatehtml; unless ($FORM{action} eq "tailcmd" or $FORM{action} =~ /^cf/ or $FORM{action} eq "logtailcmd" or $FORM{action} eq "loggrepcmd") { print < \n"; print "\n"; print "\n"; } 1; reseller.pl000064400000014463151030253020006715 0ustar00#!/usr/bin/perl ############################################################################### # Copyright 2006-2023, Way to the Web Limited # URL: http://www.configserver.com # Email: sales@waytotheweb.com ############################################################################### # start main use strict; use File::Find; use Fcntl qw(:DEFAULT :flock); use Sys::Hostname qw(hostname); use IPC::Open3; use lib '/usr/local/csf/lib'; use ConfigServer::DisplayUI; use ConfigServer::DisplayResellerUI; use ConfigServer::Config; use ConfigServer::Slurp qw(slurp); our ($reseller, %rprivs, $script, $images, $myv, %FORM, %in); my $config = ConfigServer::Config->loadconfig(); my %config = $config->config; my $slurpreg = ConfigServer::Slurp->slurpreg; my $cleanreg = ConfigServer::Slurp->cleanreg; foreach my $line (slurp("/etc/csf/csf.resellers")) { $line =~ s/$cleanreg//g; my ($user,$alert,$privs) = split(/\:/,$line); $privs =~ s/\s//g; foreach my $priv (split(/\,/,$privs)) { $rprivs{$user}{$priv} = 1; } $rprivs{$user}{ALERT} = $alert; } #print "content-type: text/html\n\n"; #foreach my $key (keys %ENV) { # print "ENV $key = [$ENV{$key}]
\n"; #} $reseller = 0; if ($ENV{REMOTE_USER} ne "" and $rprivs{$ENV{REMOTE_USER}}{USE}) { $reseller = 1; } else { print "content-type: text/html\n\n"; print "You do not have access to this feature\n"; exit(); } open (my $IN, "<", "/etc/csf/version.txt") or die $!; $myv = <$IN>; close ($IN); chomp $myv; $script = "/nodeworx/configservercsf"; $images = "/configserver/csf"; my $buffer = $ENV{'QUERY_STRING'}; if ($buffer eq "") {$buffer = $ENV{POST}} my @pairs = split(/&/, $buffer); foreach my $pair (@pairs) { my ($name, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $FORM{$name} = $value; } $FORM{action} = $FORM{iworxme}; delete $FORM{iworxme}; print "content-type: text/html\n\n"; #foreach my $key (keys %ENV) { # print "$key = [$ENV{$key}]
\n"; #} my $bootstrapcss = ""; my $jqueryjs = ""; my $bootstrapjs = ""; unless ($FORM{action} eq "tailcmd" or $FORM{action} =~ /^cf/ or $FORM{action} eq "logtailcmd" or $FORM{action} eq "loggrepcmd") { print < ConfigServer Security & Firewall $bootstrapcss $jqueryjs $bootstrapjs \n"; print <

ConfigServer Security & Firewall - csf v$myv

EOF } my $templatehtml; open (my $SCRIPTOUT, '>', \$templatehtml); select $SCRIPTOUT; ConfigServer::DisplayResellerUI::main(\%FORM, $script, 0, $images, $myv); close ($SCRIPTOUT); select STDOUT; $templatehtml =~ s/\?action\=/?iworxme=/g; $templatehtml =~ s/\&action\=/&iworxme=/g; $templatehtml =~ s/\{action\}/{iworxme}/g; $templatehtml =~ s/\'action'/'iworxme'/g; $templatehtml =~ s/\"action"/"iworxme"/g; print $templatehtml; unless ($FORM{action} eq "tailcmd" or $FORM{action} =~ /^cf/ or $FORM{action} eq "logtailcmd" or $FORM{action} eq "loggrepcmd") { print < \n"; print "\n"; print "\n"; } 1;