[ Avaa Bypassed ]




Upload:

Command:

www-data@18.216.248.35: ~ $
#!/usr/bin/perl
# list_grants.cgi
# Display all granted privileges

require './postgresql-lib.pl';
$access{'users'} || &error($text{'grant_ecannot'});
&ui_print_header(undef, $text{'grant_title'}, "", "list_grants");
&ReadParse();

# Check for down databases
@str = &table_structure($config{'basedb'}, "pg_catalog.pg_database");
foreach $f (@str) {
	$hasconn++ if ($f->{'field'} eq 'datallowconn');
	}
if ($hasconn) {
	$rv = &execute_sql_safe($config{'basedb'}, "select datname,datallowconn from pg_database");
	foreach $r (@{$rv->{'data'}}) {
		$dbup{$r->[0]} = ($r->[1] =~ /^(t|1)/i);
		}
	}

# Build a list of tables
@dblist = &list_databases();
foreach $d (@dblist) {
	next if (!$dbup{$d} && $hasconn);
	if (&supports_schemas($d)) {
		$s = &execute_sql_safe($d, "select relname,relacl,pg_namespace.nspname,reltype,relkind,relhasrules,\'$d\' from pg_class, pg_namespace where relnamespace = pg_namespace.oid and (relkind = \'r\' OR relkind = \'S\') and relname !~ \'^pg_\' order by relname");
		}
	else {
		$s = &execute_sql_safe($d, "select relname,relacl,\'public\',reltype,relkind,relhasrules,\'$d\' from pg_class where (relkind = \'r\' OR relkind = \'S\') and relname !~ \'^pg_\' order by relname");
		}
	push(@tables, @{$s->{'data'}});
	}

if ($in{'search'}) {
	# Limit to those matching search
	@tables = grep { $_->[0] =~ /\Q$in{'search'}\E/i ||
			 $_->[6] =~ /\Q$in{'search'}\E/i } @tables;
	print "<table width=100%><tr>\n";
	print "<td> <b>",&text('grant_showing',
		"<tt>$in{'search'}</tt>"),"</b></td>\n";
	print "<td align=right><a href='list_grants.cgi'>",
		"$text{'view_searchreset'}</a></td>\n";
	print "</tr></table>\n";
	}

if (@tables > $max_dbs && !$in{'search'}) {
	# If too many, show a search form
	print &ui_form_start("list_grants.cgi");
	print $text{'grant_toomany'},"\n";
	print &ui_textbox("search", undef, 20),"\n";
	print &ui_submit($text{'index_search'}),"<br>\n";
	print &ui_form_end();
	}
elsif (@tables) {
	# Show the results
	@tds = ( "width=5" );
	print &ui_form_start("delete_grants.cgi", "post");
	print &ui_hidden("search", $in{'search'});
	@rowlinks = ( &select_all_link("d"),
		      &select_invert_link("d") );
	print &ui_links_row(\@rowlinks);
	print &ui_columns_start([ "",
				  $text{'grant_tvi'},
				  $text{'grant_type'},
				  $text{'grant_db'},
				  $text{'grant_users'} ], 100, 0, \@tds);
	foreach $g (@tables) {
		$type = $g->[4] eq 'r' && $g->[5] eq 't' ? 'v' : $g->[4];
		$tname = $g->[2] eq "public" ? $g->[0] : $g->[2].".".$g->[0];
		$d = $g->[6];
		local @cols;
		push(@cols, "<a href='edit_grant.cgi?db=$d&table=$g->[0]&".
		      "ns=$g->[2]&type=$type&search=".&urlize($in{'search'}).
		      "'>".&html_escape($tname)."</a>");
		push(@cols, $text{"grant_$type"});
		push(@cols, &html_escape($d));
		my @gr = &extract_grants($g->[1]);
		local $gstr;
		foreach $gr (@gr) {
			$gstr .= "&nbsp;|&nbsp;" if ($gr ne $gr[0]);
			if ($gr->[0] eq "") {
				$gstr .= $text{'grant_public'};
				}
			elsif ($gr->[0] =~ /^group\s+(\S+)/) {
				$gstr .= &text('grant_group',
					"<tt>".&html_escape($1)."</tt>");
				}
			else {
				$gstr .= "<tt>".&html_escape($gr->[0])."</tt>";
				}
			}
		push(@cols, $gstr);
		print &ui_checked_columns_row(\@cols, \@tds, "d",
			join("/", $d, $g->[0], $g->[2], $type));
		}
	print &ui_columns_end();
	print &ui_links_row(\@rowlinks);
	print &ui_form_end([ [ "delete", $text{'grant_delete'} ] ]);
	}
else {
	print "<b>$text{'grant_none'}</b><p>\n";
	}

&ui_print_footer("", $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