⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
usermin
/
htaccess
/
View File Name :
show.cgi
#!/usr/bin/perl # show.cgi # Show directives from a virtualhost, directory or .htaccess require './htaccess-lib.pl'; &ReadParse(); if (defined($in{'idx'})) { # files within .htaccess file $hconf = &get_htaccess_config($in{'file'}); $d = $hconf->[$in{'idx'}]; $conf = $d->{'members'}; $title = &text('htfile_header', &dir_name($d), "
$in{'file'}
"); $edit = "edit_files.cgi"; $return = "htaccess_index.cgi"; $editable = "directory"; $rmsg = $text{'htindex_return'}; } else { # .htaccess file $conf = &get_htaccess_config($in{'file'}); $title = &text('htindex_header', "
$in{'file'}
"); $edit = "edit_htaccess.cgi"; $return = "htaccess_index.cgi"; $editable = 'htaccess'; $rmsg = $text{'htindex_return'}; $dir = "files_index.cgi"; } &ui_print_header($title, $text{'show_title'}, ""); foreach $h ('virt', 'idx', 'file') { if (defined($in{$h})) { $s .= "
\n"; push(@args, "$h=$in{$h}"); } } $args = join('&', @args); for($i=0; $i<$directive_type_count; $i++) { foreach $e (&editable_directives($i, $editable)) { foreach $n (split(/\s+/, $e->{'name'})) { $edit{lc($n)} = $e; push(@elist, { 'name' => $n, 'edit' => $e }); } } } @elist = sort { $a->{'name'} cmp $b->{'name'} } @elist; print "
\n"; print "
"; &show_directives($conf, 0); print "
\n"; print "
\n"; if ($in{'virt'} || $in{'file'} || defined($in{'idx'})) { print "
\n"; print $s; print "
\n"; print "
\n"; } else { print "
\n"; } print "
\n"; print $s; print "
\n"; print "
\n"; foreach $e (@elist) { print "
", $e->{'name'},"\n"; } print "
\n"; print "
\n"; &ui_print_footer("$return?$args", $rmsg); # show_directives(list, indent) sub show_directives { local ($list, $ind) = @_; local $idx; for($idx=0; $idx<@$list; $idx++) { local $d = $list->[$idx]; next if ($d->{'name'} eq "dummy"); $t = $edit{lc($d->{'name'})}; if ($d->{'type'}) { # Recurse into section local ($ed1, $ed2); print " " x $ind; if ($d->{'name'} eq "VirtualHost") { next; } elsif ($d->{'name'} =~ /Location|Files|Directory/) { $ed1 = "
"; $ed2 = "
"; } print $ed1,"<",$d->{'name'}," ",$d->{'value'}, ">",$ed2,"\n"; &show_directives($d->{'members'}, $ind+1); print " " x $ind; print "</",$d->{'name'},">\n"; } elsif ($_[1] || !$access_types{$t->{'type'}}) { # Directives in section are not editable &print_line($d, [ $d->{'name'}," ",$d->{'value'} ], $ind); } else { next if (!$t); &print_line($d, [ $d->{'name'}," ",$d->{'value'} ], $ind, "$edit?$args&type=$t->{'type'}"); } } }