[ Avaa Bypassed ]




Upload:

Command:

www-data@3.133.137.102: ~ $
#!/usr/bin/perl
# edit_host.cgi
# Show details of a managed host, and all the packages on it

require './cluster-software-lib.pl';
&foreign_require("servers", "servers-lib.pl");
&ReadParse();
&ui_print_header(undef, $text{'host_title'}, "", "edit_host");

@hosts = &list_software_hosts();
($host) = grep { $_->{'id'} eq $in{'id'} } @hosts;
$server = &foreign_call("servers", "get_server", $in{'id'});
@packages = @{$host->{'packages'}};

# Show host details
print "<table border width=100%>\n";
print "<tr $tb> <td><b>$text{'host_header'}</b></td> </tr>\n";
print "<tr $cb> <td><table width=100%>\n";

print "<tr> <td><b>$text{'host_name'}</b></td>\n";
if ($server->{'id'}) {
	$h = $server->{'realhost'} || $server->{'host'};
	printf "<td>". &ui_link("/servers/link.cgi/%s/","%s")."</td>\n",
		$server->{'id'}, $server->{'desc'} ? "$server->{'desc'} ($h:$server->{'port'})" : "$h:$server->{'port'}";
	}
else {
	print "<td><a href=/>$text{'this_server'}</a></td>\n";
	}

if ($server->{'id'}) {
	print "<td><b>$text{'host_type'}</b></td> <td>\n";
	foreach $t (@servers::server_types) {
		print $t->[1] if ($t->[0] eq $server->{'type'});
		}
	print "</td>\n";
	}
print "</tr>\n";

print "<tr> <td><b>$text{'host_count'}</b></td>\n";
printf "<td>%d</td>\n", scalar(@packages);

print "<td><b>$text{'host_os'}</b></td>\n";
print "<td>$host->{'real_os_type'} $host->{'real_os_version'}</td> </tr>\n";

print "<tr> <td><b>$text{'host_system'}</b></td>\n";
$system = $host->{'package_system'} || $software::config{'package_system'};
print "<td colspan=3>",uc($system),"</td>\n";

print "</tr>\n";

print "</table></td></tr></table>\n";

# Show delete and refresh buttons
print "<p></p><table width=100%><tr>\n";

print "<td><form action=delete_host.cgi>\n";
print "<input type=hidden name=id value=$in{'id'}>\n";
print "<input type=submit value='$text{'host_delete'}'>\n";
print "</form></td>\n";

print "<td align=right><form action=refresh.cgi>\n";
print "<input type=hidden name=id value=$in{'id'}>\n";
print "<input type=submit value='$text{'host_refresh'}'>\n";
print "</form></td>\n";

print "</tr></table>\n";

# Show tree of packages
$heir{""} = "";
foreach $c (sort { $a cmp $b } &unique(map { $_->{'class'} } @packages)) {
	if (!$c) { next; }
	@w = split(/\//, $c);
	$p = join('/', @w[0..$#w-1]);
	if (!defined($heir{$p})) {
		$pp = join('/', @w[0..$#w-2]);
		$heir{$pp} .= "$p\0";
		}
	$heir{$p} .= "$c\0";
	$hasclasses++;
	}

# get the current open list
%heiropen = map { $_, 1 } &get_heiropen($in{'id'});
$heiropen{""}++;

# traverse the hierarchy
$spacer = "&nbsp;"x3;
print &ui_hr();
print &ui_subheading($text{'host_installed'});
print "<table width=100%>\n";
&traverse("", 0);
print "</table>\n";
if ($hasclasses) {
	print "<p></p>";
	print &ui_link("closeall.cgi?id=$in{'id'}",$text{'host_close'}),"\n";
	print &ui_link("openall.cgi?id=$in{'id'}",$text{'host_open'}),"<p>\n";
	}

&ui_print_footer("", $text{'index_return'});

sub traverse
{
local($s, $act, $i);
print "<tr style='border-top: 1px solid #aaaaaa28'> <td>", $spacer x $_[1];
if ($_[0]) {
	print "<a name=\"$_[0]\"></a>\n";
	$act = $heiropen{$_[0]} ? "close" : "open";
	print "<a href=\"$act.cgi?id=$in{'id'}&what=",&urlize($_[0]),"\">";
	$_[0] =~ /([^\/]+)$/;
	print "<img border=0 src=images/$act.gif></a>&nbsp; $1</td>\n",
	}
else { print "<img src=images/close.gif> <i>$text{'host_all'}</i></td>\n"; }
print "<td><br></td> </tr>\n";
if ($heiropen{$_[0]}) {
	# print sub-folders followed by packages
	foreach $i (@packages) {
		if ($i->{'class'} eq $_[0]) {
			print "<tr style='border-top: 1px solid #aaaaaa28'> <td>", $spacer x ($_[1]+1);
			print "<img border=0 src=images/pack.gif></a>&nbsp;\n";
			print "<a href=\"edit_pack.cgi?package=",
			     &urlize($i->{'name'}),"\">$i->{'name'}</a></td>\n";
			print "<td>$i->{'desc'}</td>\n";
			print "</tr>\n";
			}
		}
	foreach $s (&unique(split(/\0+/, $heir{$_[0]}))) {
		&traverse($s, $_[1]+1);
		}
	}
}


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 1.01 KB 0644
add.cgi File 904 B 0755
close.cgi File 272 B 0755
closeall.cgi File 179 B 0755
cluster-software-lib.pl File 9.51 KB 0755
compare.cgi File 1.81 KB 0755
compare_form.cgi File 1.13 KB 0755
config File 25 B 0644
config.info File 108 B 0644
config.info.ca File 133 B 0644
config.info.cs File 82 B 0644
config.info.de File 125 B 0644
config.info.es File 90 B 0644
config.info.fr File 134 B 0644
config.info.hr File 0 B 0644
config.info.ms File 131 B 0644
config.info.nl File 130 B 0644
config.info.no File 129 B 0644
config.info.pl File 121 B 0644
defaultacl File 6 B 0644
delete_host.cgi File 254 B 0755
delete_pack.cgi File 3.15 KB 0755
delete_packs.cgi File 2.86 KB 0755
do_install.cgi File 7.11 KB 0755
do_install_serial.cgi File 3.55 KB 0755
edit_host.cgi File 3.84 KB 0755
edit_pack.cgi File 3.33 KB 0755
index.cgi File 4.87 KB 0755
install_pack.cgi File 4.82 KB 0755
list_pack.cgi File 2.28 KB 0755
module.info File 427 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 154 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 201 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 282 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 251 B 0644
module.info.ca File 155 B 0644
module.info.ca.auto File 31 B 0644
module.info.cs File 40 B 0644
module.info.cs.auto File 122 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 153 B 0644
module.info.de File 133 B 0644
module.info.de.auto File 25 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 263 B 0644
module.info.es File 39 B 0644
module.info.es.auto File 119 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 141 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 228 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 156 B 0644
module.info.fr File 41 B 0644
module.info.fr.auto File 139 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 186 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 155 B 0644
module.info.hu File 33 B 0644
module.info.hu.auto File 125 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 147 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 228 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 193 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 181 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 165 B 0644
module.info.ms File 119 B 0644
module.info.ms.auto File 25 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 158 B 0644
module.info.nl File 35 B 0644
module.info.nl.auto File 122 B 0644
module.info.no File 35 B 0644
module.info.no.auto File 115 B 0644
module.info.pl File 132 B 0644
module.info.pl.auto File 33 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 154 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 163 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 152 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 278 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 162 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 159 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 151 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 351 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 159 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 272 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 235 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 162 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 131 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 140 B 0644
open.cgi File 250 B 0755
openall.cgi File 427 B 0755
prefs.info File 28 B 0644
refresh.cgi File 1.61 KB 0755
search.cgi File 1.92 KB 0755