!c99Shell v. 1.0 pre-release build #16!

Software: Apache/2.2.3 (CentOS). PHP/5.1.6 

uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44
EDT 2010 i686
 

uid=48(apache) gid=48(apache) groups=48(apache) 

Safe-mode: OFF (not secure)

/usr/libexec/webmin/bind8/   drwxr-xr-x
Free 53.79 GB of 127.8 GB (42.09%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     find_zones.cgi (3.7 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# find_zones.cgi
# Display zones matching some search

require './bind8-lib.pl';
&ReadParse();

if (&have_dnssec_tools_support()) {
    # Parse the rollrec file to determine zone status
    &lock_file($config{"dnssectools_rollrec"});
    rollrec_lock();
    rollrec_read($config{"dnssectools_rollrec"});
}

@zones = &list_zone_names();
foreach $z (@zones) {
    $v = $z->{'name'};
    next if ($z->{'type'} eq 'view' ||
         $v eq "." || !&can_edit_zone($z) ||
         &arpa_to_ip($v) !~ /\Q$in{'search'}\E/i);
    $t = $z->{'type'};
    if ($z->{'view'}) {
        push(@zlinks, "edit_$t.cgi?zone=$z->{'name'}".
                  "&view=$z->{'viewindex'}");
        push(@ztitles, &ip6int_to_net(&arpa_to_ip($v))." ".
               &text('index_view', "<tt>$z->{'view'}</tt>"));
        push(@zdels, $z->{'index'}." ".$z->{'view'});
        }
    else {
        push(@zlinks, "edit_$t.cgi?zone=$z->{'name'}");
        push(@ztitles, &ip6int_to_net(&arpa_to_ip($v)));
        push(@zdels, $z->{'index'});
        }
    push(@zicons, "images/$t.gif");
    push(@ztypes, $text{"index_$t"});
    if (&have_dnssec_tools_support()) {
        my $rrr = rollrec_fullrec($v);
        if ($rrr) {
            if($rrr->{'kskphase'} > 0) {
                if($rrr->{'kskphase'} == 6) {
                    push(@zstatus, $text{"dt_status_waitfords"});
                } else {
                    push(@zstatus, $text{"dt_status_inKSKroll"});
                }
            } elsif($rrr->{'zskphase'} > 0) {
                push(@zstatus, $text{"dt_status_inZSKroll"});
            } else {
                push(@zstatus, $text{"dt_status_signed"});
            }
        } else {
            push(@zstatus, $text{"dt_status_unsigned"});
        }
    }

    $len++;
    }

if (&have_dnssec_tools_support()) {
    rollrec_close();
    rollrec_unlock();
    &unlock_file($config{"dnssectools_rollrec"});
}


if (@zlinks == 1) {
    &redirect($zlinks[0]);
    exit;
    }

&ui_print_header(undef, $text{'find_title'}, "");
print &text('find_match', "<tt>".&html_escape($in{'search'})."</tt>"),"<p>\n";

if ($len) {
    # sort list of zones
    @zorder = sort { $ztitles[$a] cmp $ztitles[$b] } (0 .. $len-1);
    @zlinks = map { $zlinks[$_] } @zorder;
    @ztitles = map { $ztitles[$_] } @zorder;
    @zicons = map { $zicons[$_] } @zorder;
    @ztypes = map { $ztypes[$_] } @zorder;
    @zdels = map { $zdels[$_] } @zorder;
    @zstatus = map { $zstatus[$_] } @zorder;

    if ($config{'show_list'}) {
        # display as list
        $mid = int((@zlinks+1)/2);
        print &ui_form_start("mass_delete.cgi", "post");
        @links = ( &select_all_link("d", 0),
               &select_invert_link("d", 0) );
        print &ui_links_row(\@links);
        @grid = ( );
        if (&have_dnssec_tools_support()) {
        push(@grid, &zones_table([ @zlinks[0 .. $mid-1] ],
                      [ @ztitles[0 .. $mid-1] ],
                      [ @ztypes[0 .. $mid-1] ],
                                      [ @zdels[0 .. $mid-1] ],
                                      [ @zstatus[0 .. $mid-1] ] ));
        } else {
            push(@grid, &zones_table([ @zlinks[0 .. $mid-1] ],
                      [ @ztitles[0 .. $mid-1] ],
                      [ @ztypes[0 .. $mid-1] ],
                                      [ @zdels[0 .. $mid-1] ] ));
        }
        if ($mid < @zlinks) {
            if (&have_dnssec_tools_support()) {
            push(@grid, &zones_table([ @zlinks[$mid .. $#zlinks] ],
                         [ @ztitles[$mid .. $#ztitles] ],
                         [ @ztypes[$mid .. $#ztypes] ],
                                             [ @zdels[$mid .. $#zdels] ],
                                             [ @status[$mid .. $#zstatus] ]));
            } else {
            push(@grid, &zones_table([ @zlinks[$mid .. $#zlinks] ],
                         [ @ztitles[$mid .. $#ztitles] ],
                         [ @ztypes[$mid .. $#ztypes] ],
                                             [ @zdels[$mid .. $#zdels] ] ));
            }
            }
        print &ui_grid_table(\@grid, 2, 100,
                     [ "width=50%", "width=50%" ]);
        print &ui_links_row(\@links);
        print &ui_form_end([ [ "delete", $text{'index_massdelete'} ],
                     [ "update", $text{'index_massupdate'} ],
                     [ "create", $text{'index_masscreate'} ] ]);
        }
    else {
        # display as icons
        &icons_table(\@zlinks, \@ztitles, \@zicons);
        }
    }
else {
    print "<b>$text{'find_none'}</b><p>\n";
    }

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



:: Command execute ::

Enter:
 
Select:
 

:: Shadow's tricks :D ::

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

:: Preddy's tricks :D ::

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0117 ]--