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


Viewing file:     edit_table.cgi (2.63 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# edit_table.cgi
# Display the structure of some table

require './postgresql-lib.pl';
&ReadParse();
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
$desc = &text('table_header', "<tt>$in{'table'}</tt>", "<tt>$in{'db'}</tt>");
&ui_print_header($desc, $text{'table_title'}, "", "edit_table");

# Table of fields
print &ui_form_start("delete_fields.cgi", "post");
print &ui_hidden("db", $in{'db'}),"\n";
print &ui_hidden("table", $in{'table'}),"\n"; 
@desc = &table_structure($in{'db'}, $in{'table'});
$candrop = &can_drop_fields() && @desc > 1;
@tds = $candrop ? ( "width=5" ) : ( );
@rowlinks = ( &select_all_link("d"), &select_invert_link("d") );
print &ui_links_row(\@rowlinks);
print &ui_columns_start([ $candrop ? ( "" ) : ( ),
              $text{'table_field'},
                          $text{'table_type'},
                          $text{'table_arr'},
                          $text{'table_null'} ], 100, 0, \@tds);
$i = 0;
foreach $r (@desc) {
    @cols = ( "<a href='edit_field.cgi?db=$in{'db'}&table=$in{'table'}&".
           "idx=$i'>".&html_escape($r->{'field'})."</a>",
           &html_escape($r->{'type'}),
           $r->{'arr'} eq 'YES' ? $text{'yes'} : $text{'no'},
           $r->{'null'} eq 'YES' ? $text{'yes'} : $text{'no'},
        );
    if ($candrop) {
        print &ui_checked_columns_row(\@cols, \@tds, "d",$r->{'field'});
        }
    else {
        print &ui_columns_row(\@cols, \@tds);
        }
    $i++;
    }
print &ui_columns_end();
print &ui_links_row(\@rowlinks);
print &ui_form_end($candrop ? [ [ "delete", $text{'table_delete'} ] ] : [ ]);

$hiddens = &ui_hidden("db", $in{'db'}).&ui_hidden("table", $in{'table'});
print "<table><tr>\n";

# Add a field
print &ui_form_start("edit_field.cgi");
print $hiddens;
print "<td nowrap>",&ui_submit($text{'table_add'});
print &ui_select("type", undef, [ &list_types() ]);
print "</td>",&ui_form_end();

# View and edit data button
print &ui_form_start("view_table.cgi", "form-data");
print $hiddens;
print "<td>",&ui_submit($text{'table_data'});
print "</td>",&ui_form_end();

# CSV export button
print &ui_form_start("csv_form.cgi");
print $hiddens;
print "<td>",&ui_submit($text{'table_csv'});
print "</td>",&ui_form_end();

# Create index button
if (&supports_indexes() && $access{'indexes'}) {
    print &ui_form_start("edit_index.cgi");
    print $hiddens;
    print "<td>",&ui_submit($text{'table_index'});
    print "</td>",&ui_form_end();
    }

# Drop table button
print &ui_form_start("drop_table.cgi");
print $hiddens;
print "<td>",&ui_submit($text{'table_drop'});
print "</td>",&ui_form_end();

print "</tr></table>\n";

&ui_print_footer("edit_dbase.cgi?db=$in{'db'}", $text{'dbase_return'},
    &get_databases_return_link($in{'db'}), $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.0093 ]--