[ Avaa Bypassed ]




Upload:

Command:

www-data@18.216.248.35: ~ $
#!/usr/bin/perl
# index.cgi
# List all LDAP users for editing

require './ldap-useradmin-lib.pl';
&ui_print_header(undef, $module_info{'desc'}, "", "intro", 1, 1);
&useradmin::load_theme_library();	# So that ui functions work
&ReadParse();

# Make sure the LDAP Perl module is installed, and if not offer to install
if (!$got_net_ldap) {
	local @needs;
	foreach $m ("Convert::ASN1", "Net::LDAP") {
		eval "use $m";
		push(@needs, $m) if ($@);
		}
	$missing = &html_escape(join(" ", @needs));
	print &text('index_eperl', "<tt>$missing</tt>",
		    "/cpan/download.cgi?source=3&cpan=$missing&mode=2&".
		    "return=/$module_name/&returndesc=".
		    &urlize($text{'index_return'})),"<p>\n";
	print "$text{'index_eperl2'}\n";
	print "<pre>$net_ldap_error</pre>\n";
	&ui_print_footer("/", $text{'index'});
	exit;
	}

# Try to login .. may fail
$ldap = &ldap_connect(1);
if (!ref($ldap)) {
	print &text('index_eldap', $ldap,
		    "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
	&ui_print_footer("/", $text{'index'});
	exit;
	}

# Make sure we can get the schema
$schema = $ldap->schema();
if (!$schema) {
	print &text('index_eschema', '../ldap-server/'),"<p>\n";
	&ui_print_footer("/", $text{'index'});
	exit;
	}

# Make sure the LDAP bases are set or available
if (!&get_user_base() || !&get_group_base()) {
	print &text('index_ebase',
		    "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
	&ui_print_footer("/", $text{'index'});
	exit;
	}

if ($config{'imap_host'}) {
	# Make sure the IMAP Perl module is installed, and if not offer
	# to install
	if (!$got_net_imap) {
		print &text('index_eperl', "<tt>Net::IMAP</tt>",
			  "/cpan/download.cgi?source=3&cpan=Net::IMAP&mode=2&".
			  "return=/$module_name/&returndesc=".
			  &urlize($text{'index_return'})),"<p>\n";
		print "$text{'index_eperl2'}\n";
		print "<pre>$net_imap_error</pre>\n";
		&ui_print_footer("/", $text{'index'});
		exit;
		}

	# Try to connect to the IMAP server
	$imap = &imap_connect(1);
	if (!ref($imap)) {
		print &text('index_eimap', $imap,
		    "@{[&get_webprefix()]}/config.cgi?$module_name"),"<p>\n";
		&ui_print_footer("/", $text{'index'});
		exit;
		}
	}

# If using MD5, make sure needed perl modules or programs are installed
if ($config{'md5'} == 1) {
	# Check if MD5 perl module is installed, and offer to install
	&foreign_require("useradmin", "user-lib.pl");
	if ($err = &useradmin::check_md5()) {
		print &text('index_emd5',
			    "../config.cgi?$module_name",
			    "<tt>$err</tt>",
			    "../cpan/download.cgi?source=3&cpan=Digest::MD5&mode=2&return=/$module_name/&returndesc=".&urlize($text{'index_return'})),"<p>\n";
		&ui_print_footer("/", $text{'index'});
		exit;
		}
	}
elsif ($config{'md5'} == 3 || $config{'md5'} == 4) {
	# Check if slappasswd is installed
	if (!&has_command($config{'slappasswd'})) {
		print &text('index_eslappasswd',
			    "../config.cgi?$module_name",
			    "<tt>$config{'slappasswd'}</tt>"),"<p>\n";
		&ui_print_footer("/", $text{'index'});
		exit;
		}
	}

# Count the number of users and groups
$base = &get_user_base();
$rv = $ldap->search(base => $base,
		    filter => &user_filter(),
		    sizelimit => $mconfig{'display_max'}+1);
$ucount = $rv->count;
$base = &get_group_base();
$rv = $ldap->search(base => $base,
		    filter => &group_filter(),
		    sizelimit => $mconfig{'display_max'}+1);
$gcount = $rv->count;

# Get the list of users and groups
if ($ucount <= $mconfig{'display_max'}) {
	@allulist = &list_users();
	@ulist = &useradmin::list_allowed_users(\%access, \@allulist);
	}
if ($gcount <= $mconfig{'display_max'}) {
	@allglist = &list_groups();
	@glist = &useradmin::list_allowed_groups(\%access, \@allglist);
	}

# Start of tabs, based on what can be edited
@tabs = ( );
if ($ucount || $access{'ucreate'}) {
        push(@tabs, [ "users", $text{'index_users'},
                      "index.cgi?mode=users" ]);
        $can_users = 1;
	}
if ($gcount || $access{'gcreate'}) {
        push(@tabs, [ "groups", $text{'index_groups'},
                      "index.cgi?mode=groups" ]);
        $can_groups = 1;
	}
print &ui_tabs_start(\@tabs, "mode", $in{'mode'} || $tabs[0]->[0], 1);

# Start of users tab
if ($can_users) {
        print &ui_tabs_start_tab("mode", "users");
        }

# Build links for adding users
@links = ( );
if ($access{'ucreate'}) {
	push(@links,
	     &ui_link("edit_user.cgi?new=1",$text{'index_uadd'}));
	}
if ($access{'batch'}) {
	push(@links, 
	     "<a href=\"batch_form.cgi\">$text{'index_batch'}</a>");
	}

$form = 0;
if ($ucount > $mconfig{'display_max'}) {
	# Show user search form
        print "<b>$text{'index_toomany'}</b><p>\n";
        print &ui_form_start("search_user.cgi");
        print &ui_table_start($text{'index_usheader'}, undef, 2);

        # Field to search
        print &ui_table_row($text{'index_find'},
                &ui_select("field", "uid",
                           [ [ "uid", $text{'user'} ],
                             [ "cn", $text{'real'} ],
                             [ "loginShell", $text{'shell'} ],
                             [ "homeDirectory", $text{'home'} ],
                             [ "uidNumber", $text{'uid'} ],
                             [ "gidNumber", $text{'gid'} ] ])." ".
                &ui_select("match", 1, $match_modes));

        # Text
        print &ui_table_row($text{'index_ftext'},
                &ui_textbox("what", undef, 50));

        print &ui_table_end();
        print &ui_form_end([ [ undef, $text{'find'} ] ]);
	$formno++;
	print &ui_links_row(\@links);
	}
elsif (@ulist) {
	# Show table of all users
	@ulist = &useradmin::sort_users(\@ulist, $mconfig{'sort_mode'});
	@left = grep { !/batch_form|export_form/ } @links;
	@right = grep { /batch_form|export_form/ } @links;
	&useradmin::users_table(\@ulist, $form++, 1, 0, \@left, \@right);
	}
elsif ($access{'ucreate'}) {
	# No users
	$base = &get_user_base();
	print "<b>",&text('index_unone', "<tt>$base</tt>"),"</b><p>\n";
	print &ui_links_row(\@links);
	}

# End of users tab
if ($can_users) {
        print &ui_tabs_end_tab("mode", "users");
        }

# Start of groups tab
if ($can_groups) {
        print &ui_tabs_start_tab("mode", "groups");
        }

# Create group links
@links = ( );
if ($access{'gcreate'}) {
	push(@links, &ui_link("edit_group.cgi?new=1",$text{'index_gadd'}));
	}

if ($gcount > $mconfig{'display_max'}) {
	# Show group search form
        print "<b>$text{'index_gtoomany'}</b><p>\n";
        print &ui_form_start("search_group.cgi");
        print &ui_table_start($text{'index_gsheader'}, undef, 2);

        # Field to search
        print &ui_table_row($text{'index_gfind'},
                &ui_select("field", "cn",
                           [ [ "cn", $text{'gedit_group'} ],
                             [ "memberUid", $text{'gedit_members'} ],
                             [ "gidNumber", $text{'gedit_gid'} ] ])." ".
                &ui_select("match", 1, $match_modes));

        # Text
        print &ui_table_row($text{'index_ftext'},
                &ui_textbox("what", undef, 50));

        print &ui_table_end();
        print &ui_form_end([ [ undef, $text{'find'} ] ]);
	print &ui_links_row(\@links);
	}
elsif (@glist) {
	# Show table of all groups
	@glist = &useradmin::sort_groups(\@glist, $mconfig{'sort_mode'});
	&useradmin::groups_table(\@glist, $form++, 0, \@links);
	}
elsif ($access{'gcreate'} || !@allglist) {
	# Show none message
	$base = &get_group_base();
	print "<b>",&text('index_gnone', "<tt>$base</tt>"),"</b><p>\n";
	print &ui_links_row(\@links);
	}

# End of groups tab
if ($can_groups) {
        print &ui_tabs_end_tab("mode", "groups");
        }
print &ui_tabs_end(1);

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


Filemanager

Name Type Size Permission Actions
help Folder 0755
images Folder 0755
lang Folder 0755
CHANGELOG File 6.18 KB 0644
acl_security.pl File 7.55 KB 0755
batch_exec.cgi File 15.72 KB 0755
batch_form.cgi File 2.49 KB 0755
cgi_args.pl File 501 B 0755
config File 388 B 0644
config-ALL-linux File 416 B 0644
config-coherent-linux File 385 B 0644
config-debian-linux File 406 B 0644
config-debian-linux-3.1 File 395 B 0644
config-debian-linux-4.0-ALL File 388 B 0644
config-debian-squirrelmail-linux File 560 B 0644
config-macos File 466 B 0644
config-mandrake-linux File 385 B 0644
config-openSUSE-Linux-15.0-ALL File 394 B 0644
config-pardus-linux File 397 B 0644
config-redhat-linux File 385 B 0644
config-sol-linux File 385 B 0644
config-suse-linux File 394 B 0644
config-syno-linux File 452 B 0644
config-trustix-linux File 394 B 0644
config-united-linux File 394 B 0644
config.info File 5.65 KB 0644
config.info.ca File 6 KB 0644
config.info.de File 6.47 KB 0644
config.info.es File 4.93 KB 0644
config.info.fr File 0 B 0644
config.info.nl File 5.99 KB 0644
config.info.no File 5.75 KB 0644
config.info.pt_BR File 6.06 KB 0644
cpan_modules.pl File 85 B 0755
defaultacl File 318 B 0644
edit_group.cgi File 4.17 KB 0755
edit_user.cgi File 14.83 KB 0755
index.cgi File 7.52 KB 0755
install_check.pl File 612 B 0755
ldap-useradmin-lib.pl File 33.58 KB 0755
log_parser.pl File 1.55 KB 0755
mass_delete_group.cgi File 2.04 KB 0755
mass_delete_user.cgi File 7.17 KB 0755
module.info File 261 B 0644
module.info.af File 0 B 0644
module.info.af.auto File 172 B 0644
module.info.ar File 0 B 0644
module.info.ar.auto File 234 B 0644
module.info.be File 0 B 0644
module.info.be.auto File 320 B 0644
module.info.bg File 0 B 0644
module.info.bg.auto File 270 B 0644
module.info.ca File 169 B 0644
module.info.cs File 35 B 0644
module.info.cs.auto File 126 B 0644
module.info.da File 0 B 0644
module.info.da.auto File 155 B 0644
module.info.de File 174 B 0644
module.info.el File 0 B 0644
module.info.el.auto File 347 B 0644
module.info.es File 31 B 0644
module.info.es.auto File 142 B 0644
module.info.eu File 0 B 0644
module.info.eu.auto File 186 B 0644
module.info.fa File 0 B 0644
module.info.fa.auto File 284 B 0644
module.info.fi File 0 B 0644
module.info.fi.auto File 185 B 0644
module.info.fr File 0 B 0644
module.info.fr.auto File 190 B 0644
module.info.he File 0 B 0644
module.info.he.auto File 194 B 0644
module.info.hr File 0 B 0644
module.info.hr.auto File 183 B 0644
module.info.hu File 0 B 0644
module.info.hu.auto File 193 B 0644
module.info.it File 0 B 0644
module.info.it.auto File 157 B 0644
module.info.ja File 0 B 0644
module.info.ja.auto File 205 B 0644
module.info.ko File 0 B 0644
module.info.ko.auto File 174 B 0644
module.info.lt File 0 B 0644
module.info.lt.auto File 184 B 0644
module.info.lv File 0 B 0644
module.info.lv.auto File 176 B 0644
module.info.ms File 172 B 0644
module.info.mt File 0 B 0644
module.info.mt.auto File 168 B 0644
module.info.nl File 35 B 0644
module.info.nl.auto File 142 B 0644
module.info.no File 32 B 0644
module.info.no.auto File 126 B 0644
module.info.pl File 0 B 0644
module.info.pl.auto File 186 B 0644
module.info.pt File 0 B 0644
module.info.pt.auto File 163 B 0644
module.info.pt_BR File 38 B 0644
module.info.pt_BR.auto File 134 B 0644
module.info.ro File 0 B 0644
module.info.ro.auto File 184 B 0644
module.info.ru File 0 B 0644
module.info.ru.auto File 279 B 0644
module.info.sk File 0 B 0644
module.info.sk.auto File 192 B 0644
module.info.sl File 0 B 0644
module.info.sl.auto File 185 B 0644
module.info.sv File 0 B 0644
module.info.sv.auto File 166 B 0644
module.info.th File 0 B 0644
module.info.th.auto File 303 B 0644
module.info.tr File 0 B 0644
module.info.tr.auto File 194 B 0644
module.info.uk File 0 B 0644
module.info.uk.auto File 289 B 0644
module.info.ur File 0 B 0644
module.info.ur.auto File 295 B 0644
module.info.vi File 0 B 0644
module.info.vi.auto File 206 B 0644
module.info.zh File 0 B 0644
module.info.zh.auto File 130 B 0644
module.info.zh_TW File 0 B 0644
module.info.zh_TW.auto File 136 B 0644
postinstall.pl File 224 B 0755
prefs.info File 50 B 0644
raw.cgi File 967 B 0755
save_group.cgi File 9.38 KB 0755
save_user.cgi File 24.6 KB 0755
search_group.cgi File 1.31 KB 0755
search_user.cgi File 1.46 KB 0755