[ Avaa Bypassed ]




Upload:

Command:

www-data@18.188.66.142: ~ $
#!/usr/bin/perl
# Save the LDAP server to connect to

require './ldap-client-lib.pl';
&error_setup($text{'server_err'});
&ReadParse();

&lock_file(&get_ldap_config_file());
@secrets = split(/\t+/, $config{'secret'});
foreach $secret (@secrets) {
	&lock_file($secret);
	}
$conf = &get_config();
$uri = &find_svalue("uri", $conf);

# Validate and save inputs
if ($uri) {
	# Save uri directive
	for($i=0; defined($host = $in{'uhost_'.$i}); $i++) {
		next if (!$host);
		$port = $in{'uport_'.$i.'_def'} ? undef : $in{'uport_'.$i};
		$proto = $in{'uproto_'.$i};
		!defined($port) ||
		    $port =~ /^\d+$/ && $port > 0 && $port < 65536 ||
		    &error(&text('server_euport', $host));
		$uri = $proto."://".$host.($port ? ":$port" : "");
		$uri .= "/" if ($proto eq "ldap" || $proto eq "ldaps");
		push(@uris, $uri);
		}
	@uris || &error($text{'server_euri'});
	&save_directive($conf, "uri", join(" ", @uris));
	}
else {
	# Set host and port directives
	@hosts = split(/\s+/, $in{'host'});
	foreach $h (@hosts) {
		&to_ipaddress($h) || &to_ip6address($h) ||
			&error(&text('server_ehost', $h));
		}
	@hosts || &error($text{'server_ehosts'});
	&save_directive($conf, "host", join(" ", @hosts));

	# Save server port
	if ($in{'port_def'}) {
		&save_directive($conf, "port", undef);
		}
	else {
		$in{'port'} =~ /^\d+$/ &&
		    $in{'port'} > 0 && $in{'port'} < 65536 ||
			&error($text{'server_eport'});
		&save_directive($conf, "port", $in{'port'});
		}
	}

# Save LDAP protocol version
&save_directive($conf, "ldap_version", $in{'version'} || undef);

# Save time limit
if ($in{'timelimit_def'}) {
	&save_directive($conf, "bind_timelimit", undef);
	}
else {
	$in{'timelimit'} =~ /^\d+$/ || &error($text{'server_etimelimit'});
	&save_directive($conf, "bind_timelimit", $in{'timelimit'});
	}

# Save non-root login
if ($in{'binddn_def'}) {
	&save_directive($conf, "binddn", undef);
	}
else {
	$in{'binddn'} =~ /\S/ || &error($text{'server_ebinddn'});
	&save_directive($conf, "binddn", $in{'binddn'});
	}

# Save non-root password
if ($in{'bindpw_def'}) {
	&save_directive($conf, "bindpw", undef);
	}
else {
	$in{'bindpw'} =~ /\S/ || &error($text{'server_ebindpw'});
	&save_directive($conf, "bindpw", $in{'bindpw'});
	}

# Save root login
my $rootdir = &find_svalue("rootpwmoddn", $conf, 2) ?
		"rootpwmoddn" : "rootbinddn";
if ($in{'rootbinddn_def'}) {
	&save_directive($conf, $rootdir, undef);
	}
else {
	$in{'rootbinddn'} =~ /\S/ || &error($text{'server_erootbinddn'});
	&save_directive($conf, $rootdir, $in{'rootbinddn'});
	}

# Save root password
$in{'rootbindpw_def'} || $in{'rootbindpw'} =~ /\S/ ||
	&error($text{'server_erootbindpw'});
if (&find_svalue("rootpwmoddn", $conf), 2) {
	# New format can put the password in the config file
	&save_directive($conf, "rootpwmodpw",
		$in{'rootbindpw_def'} ? undef : $in{'rootbindpw'});
	}
else {
	# Old format uses a separate secret file
	if ($in{'rootbindpw_def'}) {
		&save_rootbinddn_secret(undef);
		}
	else {
		&save_rootbinddn_secret($in{'rootbindpw'});
		}
	}

# SSL mode
&save_directive($conf, "ssl", $in{'ssl'} || undef);

# Check server SSL cert
&save_directive($conf, "tls_checkpeer", $in{'peer'} || undef);

# CA cert file for server
if ($in{'cacert_def'}) {
	&save_directive($conf, "tls_cacertfile", undef);
	}
else {
	$in{'cacert'} =~ /^\// && -r $in{'cacert'} && !-d $in{'cacert'} ||
		&error($text{'server_ecacert'});
	&save_directive($conf, "tls_cacertfile", $in{'cacert'});
	}

# Write out config
&flush_file_lines();
&unlock_file(&get_ldap_config_file());
foreach $secret (@secrets) {
	&unlock_file($secret);
	}

&webmin_log("server");
&redirect("");


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 1.1 KB 0644
atboot.cgi File 483 B 0755
browser.cgi File 2.29 KB 0755
check.cgi File 2.93 KB 0755
config-ALL-linux File 79 B 0644
config-AlmaLinux-6.0-ALL File 66 B 0644
config-CentOS-Linux-6.0-ALL File 66 B 0644
config-CentOS-Stream-Linux-8.0-ALL File 66 B 0644
config-CloudLinux-8.0-ALL File 66 B 0644
config-Oracle-Linux-8.0-ALL File 66 B 0644
config-Redhat-Enterprise-Linux-6.0-ALL File 66 B 0644
config-Rocky-Linux-6.0-ALL File 66 B 0644
config-Scientific-Linux-6.0-ALL File 66 B 0644
config-debian-linux-3.1 File 100 B 0644
config-debian-linux-4.0-5.9 File 65 B 0644
config-debian-linux-6.0-6.9 File 128 B 0644
config-debian-linux-7.0-ALL File 65 B 0644
config-pardus-linux File 74 B 0644
config-redhat-linux-13.0-ALL File 89 B 0644
config.info File 556 B 0644
config.info.ca File 732 B 0644
config.info.de File 593 B 0644
config.info.nl File 473 B 0644
config.info.no File 528 B 0644
config.info.pt_BR File 599 B 0644
cpan_modules.pl File 82 B 0755
edit_base.cgi File 2.47 KB 0755
edit_pam.cgi File 1.36 KB 0755
edit_server.cgi File 3.27 KB 0755
edit_switch.cgi File 1.74 KB 0755
fixpam.cgi File 364 B 0755
index.cgi File 2.36 KB 0755
install_check.pl File 334 B 0755
ldap-client-lib.pl File 11.53 KB 0755
list_switches.cgi File 772 B 0755
log_parser.pl File 461 B 0755
module.info File 158 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 96 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 122 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 144 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 161 B 0644
module.info.ca File 97 B 0644
module.info.cs File 0 B 0644
module.info.cs.auto File 105 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 97 B 0644
module.info.de File 99 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 148 B 0644
module.info.es File 0 B 0644
module.info.es.auto File 99 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 106 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 159 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 110 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 120 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 126 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 99 B 0644
module.info.hu File 0 B 0644
module.info.hu.auto File 117 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 95 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 144 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 128 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 108 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 99 B 0644
module.info.ms File 103 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 107 B 0644
module.info.nl File 20 B 0644
module.info.nl.auto File 83 B 0644
module.info.no File 20 B 0644
module.info.no.auto File 80 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 95 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 101 B 0644
module.info.pt_BR File 24 B 0644
module.info.pt_BR.auto File 83 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 105 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 170 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 108 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 102 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 104 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 204 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 123 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 146 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 189 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 145 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 84 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 90 B 0644
popup_browser.cgi File 2.73 KB 0755
restart.cgi File 329 B 0755
save_base.cgi File 1.86 KB 0755
save_pam.cgi File 1.31 KB 0755
save_server.cgi File 3.53 KB 0755
save_switch.cgi File 932 B 0755
start.cgi File 282 B 0755
stop.cgi File 254 B 0755
switch-lib.pl File 3.08 KB 0755