Linux server.thearyasamaj.org 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
Apache
: 103.90.241.146 | : 216.73.216.158
Cant Read [ /etc/named.conf ]
5.6.40
ftpuser@mantra.thearyasamaj.org
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
usr /
libexec /
webmin /
syslog /
[ HOME SHELL ]
Name
Size
Permission
Action
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
1.43
KB
-rw-r--r--
acl_security.pl
1.47
KB
-rwxr-xr-x
backup_config.pl
643
B
-rwxr-xr-x
cgi_args.pl
799
B
-rwxr-xr-x
config-AlmaLinux-6.0-ALL
701
B
-rw-r--r--
config-CentOS-Linux-6.0-ALL
681
B
-rw-r--r--
config-CentOS-Stream-Linux-8.0...
701
B
-rw-r--r--
config-Oracle-Linux-8.0-ALL
701
B
-rw-r--r--
config-Redhat-Enterprise-Linux...
701
B
-rw-r--r--
config-Rocky-Linux-6.0-ALL
701
B
-rw-r--r--
config-Ubuntu-Linux-10.04-ALL
442
B
-rw-r--r--
config-aix
324
B
-rw-r--r--
config-cobalt-linux
410
B
-rw-r--r--
config-coherent-linux
676
B
-rw-r--r--
config-corel-linux
399
B
-rw-r--r--
config-debian-linux
399
B
-rw-r--r--
config-debian-linux-3.1-3.2
443
B
-rw-r--r--
config-debian-linux-4.0
471
B
-rw-r--r--
config-debian-linux-5.0-9.0
475
B
-rw-r--r--
config-debian-linux-9.0-ALL
442
B
-rw-r--r--
config-freebsd
337
B
-rw-r--r--
config-generic-linux
330
B
-rw-r--r--
config-gentoo-linux
330
B
-rw-r--r--
config-hpux
304
B
-rw-r--r--
config-irix
293
B
-rw-r--r--
config-macos
389
B
-rw-r--r--
config-mandrake-linux
662
B
-rw-r--r--
config-msc-linux
672
B
-rw-r--r--
config-netbsd
308
B
-rw-r--r--
config-open-linux
634
B
-rw-r--r--
config-openSUSE-Linux-15.0-ALL
362
B
-rw-r--r--
config-openbsd
337
B
-rw-r--r--
config-openserver
311
B
-rw-r--r--
config-pardus-linux
330
B
-rw-r--r--
config-redhat-linux-16.0-23.0
671
B
-rw-r--r--
config-redhat-linux-24.0-ALL
701
B
-rw-r--r--
config-slackware-linux
330
B
-rw-r--r--
config-sol-linux
330
B
-rw-r--r--
config-solaris
444
B
-rw-r--r--
config-solaris-9-10
448
B
-rw-r--r--
config-suse-linux
330
B
-rw-r--r--
config-suse-linux-11-ALL
364
B
-rw-r--r--
config-suse-linux-7.2-8.0
326
B
-rw-r--r--
config-suse-linux-8.2-10.9
361
B
-rw-r--r--
config-trustix-linux
666
B
-rw-r--r--
config-turbo-linux
326
B
-rw-r--r--
config-united-linux
326
B
-rw-r--r--
config-unixware
324
B
-rw-r--r--
config.info
1.29
KB
-rw-r--r--
config.info.bg
2.24
KB
-rw-r--r--
config.info.ca
1.39
KB
-rw-r--r--
config.info.cs
752
B
-rw-r--r--
config.info.de
1.41
KB
-rw-r--r--
config.info.el
2.16
KB
-rw-r--r--
config.info.es
1.17
KB
-rw-r--r--
config.info.fr
1.2
KB
-rw-r--r--
config.info.hu
871
B
-rw-r--r--
config.info.it
1.34
KB
-rw-r--r--
config.info.ja
1.63
KB
-rw-r--r--
config.info.ko
1.2
KB
-rw-r--r--
config.info.nl
1.28
KB
-rw-r--r--
config.info.no
1.18
KB
-rw-r--r--
config.info.pl
1.34
KB
-rw-r--r--
config.info.ru
1.68
KB
-rw-r--r--
config.info.sv
609
B
-rw-r--r--
config.info.tr
1.12
KB
-rw-r--r--
config.info.uk
1.71
KB
-rw-r--r--
config.info.zh
555
B
-rw-r--r--
config.info.zh_TW
615
B
-rw-r--r--
defaultacl
31
B
-rw-r--r--
edit_log.cgi
5.01
KB
-rwxr-xr-x
index.cgi
4.96
KB
-rwxr-xr-x
install_check.pl
333
B
-rwxr-xr-x
log_parser.pl
722
B
-rwxr-xr-x
m4.cgi
804
B
-rwxr-xr-x
module.info
255
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
116
B
-rw-r--r--
module.info.ar
0
B
-rw-r--r--
module.info.ar.auto
167
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
205
B
-rw-r--r--
module.info.bg
0
B
-rw-r--r--
module.info.bg.auto
231
B
-rw-r--r--
module.info.ca
124
B
-rw-r--r--
module.info.ca.auto
15
B
-rw-r--r--
module.info.cs
25
B
-rw-r--r--
module.info.cs.auto
110
B
-rw-r--r--
module.info.da
0
B
-rw-r--r--
module.info.da.auto
113
B
-rw-r--r--
module.info.de
111
B
-rw-r--r--
module.info.de.auto
15
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
213
B
-rw-r--r--
module.info.es
39
B
-rw-r--r--
module.info.es.auto
102
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
144
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
225
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
145
B
-rw-r--r--
module.info.fr
26
B
-rw-r--r--
module.info.fr.auto
110
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
170
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
144
B
-rw-r--r--
module.info.hu
35
B
-rw-r--r--
module.info.hu.auto
114
B
-rw-r--r--
module.info.it
28
B
-rw-r--r--
module.info.it.auto
108
B
-rw-r--r--
module.info.ja
28
B
-rw-r--r--
module.info.ja.auto
121
B
-rw-r--r--
module.info.ko
25
B
-rw-r--r--
module.info.ko.auto
110
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
146
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
128
B
-rw-r--r--
module.info.ms
105
B
-rw-r--r--
module.info.ms.auto
15
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
136
B
-rw-r--r--
module.info.nl
21
B
-rw-r--r--
module.info.nl.auto
101
B
-rw-r--r--
module.info.no
22
B
-rw-r--r--
module.info.no.auto
90
B
-rw-r--r--
module.info.pl
23
B
-rw-r--r--
module.info.pl.auto
104
B
-rw-r--r--
module.info.pt
30
B
-rw-r--r--
module.info.pt.auto
104
B
-rw-r--r--
module.info.pt_BR
33
B
-rw-r--r--
module.info.pt_BR.auto
110
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
137
B
-rw-r--r--
module.info.ru
40
B
-rw-r--r--
module.info.ru.auto
184
B
-rw-r--r--
module.info.sk
0
B
-rw-r--r--
module.info.sk.auto
142
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
136
B
-rw-r--r--
module.info.sv
21
B
-rw-r--r--
module.info.sv.auto
95
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
216
B
-rw-r--r--
module.info.tr
27
B
-rw-r--r--
module.info.tr.auto
131
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
203
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
176
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
203
B
-rw-r--r--
module.info.zh
21
B
-rw-r--r--
module.info.zh.auto
94
B
-rw-r--r--
module.info.zh_TW
24
B
-rw-r--r--
module.info.zh_TW.auto
100
B
-rw-r--r--
prefs.info
60
B
-rw-r--r--
rbac-mapping
119
B
-rw-r--r--
restart.cgi
253
B
-rwxr-xr-x
safeacl
33
B
-rw-r--r--
save_log.cgi
8.79
KB
-rwxr-xr-x
start.cgi
372
B
-rwxr-xr-x
syslog-lib.pl
8.94
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : syslog-lib.pl
# syslog-lib.pl # Functions for the syslog module BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); %access = &get_module_acl(); # get_config([file]) # Parses the syslog configuration file into an array ref of hash refs, one # for each log file or destination sub get_config { local ($cfile) = @_; $cfile ||= $config{'syslog_conf'}; local $lnum = 0; local ($line, $cont, @rv); local $tag = { 'tag' => '*', 'index' => 0, 'line' => 0 }; push(@rv, $tag); &open_readfile(CONF, $cfile); local @lines = <CONF>; close(CONF); foreach my $line (@lines) { local $slnum = $lnum; $line =~ s/\r|\n//g; if ($line =~ /\\$/) { # continuation .. get the next lines $line =~ s/\\$//; while($cont = <CONF>) { $lnum++; $cont =~ s/^[#\s]+//; $cont =~ s/\r|\n//g; $line .= $cont; last if ($line !~ s/\\$//); } } if ($line =~ /^\$IncludeConfig\s+(\S+)/ || $line =~ /^include\(file="([^"]+)"/) { # rsyslog include statement .. follow the money foreach my $icfile (glob($1)) { my $ic = &get_config($icfile); if ($ic) { foreach my $c (@$ic) { $c->{'index'} += scalar(@rv); } push(@rv, @$ic); } } } elsif ($line =~ /^\$(\S+)\s*(\S*)/) { # rsyslog special directive - ignored for now } elsif ($line =~ /^if\s+/) { # rsyslog if statement .. ignored too } elsif ($line =~ /^(#*)\s*([^#\s]+\.\S+)\s+(\S+)$/ || $line =~ /^(#*)\s*([^#\s]+\.\S+)\s+(\|.*)$/) { # Regular log destination local $act = $3; local $log = { 'active' => !$1, 'sel' => [ split(/;/, $2) ], 'cfile' => $cfile, 'line' => $slnum, 'eline' => $lnum }; if ($act =~ /^\-(\/\S+)$/) { $log->{'file'} = $1; $log->{'sync'} = 0; } elsif ($act =~ /^\|(.*)$/) { $log->{'pipe'} = $1; } elsif ($act =~ /^(\/\S+)$/) { $log->{'file'} = $1; $log->{'sync'} = 1; } elsif ($act =~ /^\@\@(\S+)$/) { $log->{'socket'} = $1; } elsif ($act =~ /^\@(\S+)$/) { $log->{'host'} = $1; } elsif ($act eq '*') { $log->{'all'} = 1; } else { $log->{'users'} = [ split(/,/, $act) ]; } $log->{'index'} = scalar(@rv); $log->{'section'} = $tag; $tag->{'eline'} = $lnum; if ($log->{'file'} =~ s/^(\/\S+);(\S+)$/$1/ || $log->{'pipe'} =~ s/^(\/\S+);(\S+)$/$1/) { # rsyslog file format $log->{'format'} = $2; } push(@rv, $log); } elsif ($line =~ /^(#?)!(\S+)$/) { # Start of tagged section, as seen on BSD push(@rv, { 'tag' => $2, 'index' => scalar(@rv), 'cfile' => $cfile, 'line' => $lnum, 'eline' => $lnum }); $tag = $rv[@rv-1]; } $lnum++; } return \@rv; } # create_log(&log) sub create_log { local $lref = &read_file_lines($config{'syslog_conf'}); if ($config{'tags'}) { splice(@$lref, $_[0]->{'section'}->{'eline'}+1, 0, &log_line($_[0])); } else { push(@$lref, &log_line($_[0])); } &flush_file_lines(); } # update_log(&old, &log) sub update_log { local $lref = &read_file_lines($_[0]->{'cfile'} || $config{'syslog_conf'}); if ($config{'tags'} && $_[0]->{'section'} ne $_[1]->{'section'}) { if ($_[0]->{'section'}->{'line'} < $_[1]->{'section'}->{'line'}) { splice(@$lref, $_[1]->{'section'}->{'eline'}+1, 0, &log_line($_[1])); splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1); } else { splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1); splice(@$lref, $_[1]->{'section'}->{'eline'}+1, 0, &log_line($_[1])); } } else { splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1, &log_line($_[1])); } &flush_file_lines(); } # delete_log(&log) sub delete_log { local $lref = &read_file_lines($_[0]->{'cfile'} || $config{'syslog_conf'}); splice(@$lref, $_[0]->{'line'}, $_[0]->{'eline'} - $_[0]->{'line'} + 1); &flush_file_lines(); } sub log_line { local $d; if ($_[0]->{'file'}) { $d = ($_[0]->{'sync'} || !$config{'sync'} ? "" : "-").$_[0]->{'file'}; } elsif ($_[0]->{'pipe'}) { $d = '|'.$_[0]->{'pipe'}; } elsif ($_[0]->{'host'}) { $d = '@'.$_[0]->{'host'}; } elsif ($_[0]->{'users'}) { $d = join(",", @{$_[0]->{'users'}}); } elsif ($_[0]->{'socket'}) { $d = '@@'.$_[0]->{'socket'}; } else { $d = '*'; } if ($_[0]->{'format'}) { # Add rsyslog format $d .= ";".$_[0]->{'format'}; } return ($_[0]->{'active'} ? "" : "#").join(";", @{$_[0]->{'sel'}})."\t".$d; } # list_priorities() # Returns a list of all priorities sub list_priorities { return ( 'debug', 'info', 'notice', 'warning', 'err', 'crit', 'alert', 'emerg' ); } # can_edit_log(&log|file) # Returns 1 if some log can be viewed/edited, 0 if not sub can_edit_log { return 1 if (!$access{'logs'}); local @files = split(/\s+/, $access{'logs'}); local $lf; if (ref($_[0])) { $lf = $_[0]->{'file'} || $_[0]->{'pipe'} || $_[0]->{'host'} || $_[0]->{'socket'} || $_[0]->{'cmd'} || ($_[0]->{'all'} ? "*" : "users"); } else { $lf = $_[0]; } foreach $f (@files) { return 1 if ($f eq $lf || &is_under_directory($f, $lf)); } return 0; } sub needs_m4 { local $oldslash = $/; $/ = undef; &open_readfile(CONF, $config{'syslog_conf'}); local $conf1 = <CONF>; close(CONF); &open_execute_command(CONF, "$config{'m4_path'} $config{'syslog_conf'}", 1, 1); local $conf2 = <CONF>; close(CONF); $/ = $oldslash; return $conf1 ne $conf2; } # get_syslog_pid(pid) # Returns the syslog PID file sub get_syslog_pid { my ($pid) = &find_byname("syslogd"); ($pid) = &find_byname("rsyslogd") if (!$pid); if (!$pid && $config{'pid_file'}) { foreach my $pfile (map { glob($_) } split(/\s+/, $config{'pid_file'})) { my $poss = &check_pid_file($pfile); if ($poss) { $pid = $poss; last; } } } return $pid; } # restart_syslog() # Stop and re-start the syslog server. Returns an error message on failure. sub restart_syslog { if ($config{'restart_cmd'}) { &system_logged("$config{'restart_cmd'} >/dev/null 2>/dev/null </dev/null"); } else { local $pid = &get_syslog_pid(); $pid && &kill_logged('TERM', $pid) || return &text('restart_ekill', $pid, $!); sleep(2); if ($config{'start_cmd'}) { &system_logged("$config{'start_cmd'} >/dev/null 2>/dev/null </dev/null"); } else { &system_logged("cd / ; $config{'syslogd'} >/dev/null 2>/dev/null </dev/null &"); } } return undef; } # signal_syslog() # Tell the syslog server to re-open it's log files sub signal_syslog { if ($config{'signal_cmd'}) { &system_logged("$config{'signal_cmd'} >/dev/null 2>/dev/null </dev/null"); } else { # Use HUP signal local $pid = &get_syslog_pid(); if ($pid) { &kill_logged('HUP', $pid); } } } # all_log_files(file) # Given a filename, returns all rotated versions, ordered by oldest first sub all_log_files { $_[0] =~ /^(.*)\/([^\/]+)$/; local $dir = $1; local $base = $2; local ($f, @rv); opendir(DIR, &translate_filename($dir)); foreach $f (readdir(DIR)) { local $trans = &translate_filename("$dir/$f"); if ($f =~ /^\Q$base\E/ && -f $trans && $f !~ /\.offset$/) { push(@rv, "$dir/$f"); $mtime{"$dir/$f"} = [ stat($trans) ]; } } closedir(DIR); return sort { $mtime{$a}->[9] <=> $mtime{$b}->[9] } @rv; } # get_other_module_logs([module]) # Returns a list of logs supplied by other modules sub get_other_module_logs { local ($mod) = @_; local @rv; local %done; foreach my $minfo (&get_all_module_infos()) { next if ($mod && $minfo->{'dir'} ne $mod); next if (!$minfo->{'syslog'}); next if (!&foreign_installed($minfo->{'dir'})); local $mdir = &module_root_directory($minfo->{'dir'}); next if (!-r "$mdir/syslog_logs.pl"); &foreign_require($minfo->{'dir'}, "syslog_logs.pl"); local $j = 0; foreach my $l (&foreign_call($minfo->{'dir'}, "syslog_getlogs")) { local $fc = $l->{'file'} || $l->{'cmd'}; next if ($done{$fc}++); $l->{'minfo'} = $minfo; $l->{'mod'} = $minfo->{'dir'}; $l->{'mindex'} = $j++; push(@rv, $l); } } @rv = sort { $a->{'minfo'}->{'desc'} cmp $b->{'minfo'}->{'desc'} } @rv; local $i = 0; foreach my $l (@rv) { $l->{'index'} = $i++; } return @rv; } # catter_command(file) # Given a file that may be compressed, returns the command to output it in # plain text, or undef if impossible sub catter_command { local ($l) = @_; local $q = quotemeta($l); if ($l =~ /\.gz$/i) { return &has_command("gunzip") ? "gunzip -c $q" : undef; } elsif ($l =~ /\.Z$/i) { return &has_command("uncompress") ? "uncompress -c $q" : undef; } elsif ($l =~ /\.bz2$/i) { return &has_command("bunzip2") ? "bunzip2 -c $q" : undef; } elsif ($l =~ /\.xz$/i) { return &has_command("xz") ? "xz -d -c $q" : undef; } else { return "cat $q"; } } # extra_log_files() # Returns a list of extra log files available to the current Webmin user. No filtering # based on allowed directory is done though! sub extra_log_files { local @rv; foreach my $fd (split(/\t+/, $config{'extras'}), split(/\t+/, $access{'extras'})) { if ($fd =~ /^"(\S+)"\s+"(\S.*)"$/) { push(@rv, { 'file' => $1, 'desc' => $2 }); } elsif ($fd =~ /^"(\S+)"$/) { push(@rv, { 'file' => $1 }); } elsif ($fd =~ /^(\S+)\s+(\S.*)$/) { push(@rv, { 'file' => $1, 'desc' => $2 }); } else { push(@rv, { 'file' => $fd }); } } return @rv; } 1;
Close