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


Viewing file:     class.wsdlcache.php (4.76 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php



/**
* caches instances of the wsdl class

* @author   Scott Nichol <snichol@computer.org>
* @author    Ingo Fischer <ingo@apollon.de>
* @version  $Id: class.wsdlcache.php,v 1.5 2005/05/20 17:58:17 snichol Exp $
* @access public 
*/
class wsdlcache {
    
/**
     *    @var resource
     *    @access private
     */
    
var $fplock;
    
/**
     *    @var integer
     *    @access private
     */
    
var $cache_lifetime;
    
/**
     *    @var string
     *    @access private
     */
    
var $cache_dir;
    
/**
     *    @var string
     *    @access public
     */
    
var $debug_str '';

    
/**
    * constructor
    *
    * @param string $cache_dir directory for cache-files
    * @param integer $cache_lifetime lifetime for caching-files in seconds or 0 for unlimited
    * @access public
    */
    
function wsdlcache($cache_dir='.'$cache_lifetime=0) {
        
$this->fplock = array();
        
$this->cache_dir $cache_dir != '' $cache_dir '.';
        
$this->cache_lifetime $cache_lifetime;
    }

    
/**
    * creates the filename used to cache a wsdl instance
    *
    * @param string $wsdl The URL of the wsdl instance
    * @return string The filename used to cache the instance
    * @access private
    */
    
function createFilename($wsdl) {
        return 
$this->cache_dir.'/wsdlcache-' md5($wsdl);
    }

    
/**
    * adds debug data to the class level debug string
    *
    * @param    string $string debug data
    * @access   private
    */
    
function debug($string){
        
$this->debug_str .= get_class($this).": $string\n";
    }

    
/**
    * gets a wsdl instance from the cache
    *
    * @param string $wsdl The URL of the wsdl instance
    * @return object wsdl The cached wsdl instance, null if the instance is not in the cache
    * @access public
    */
    
function get($wsdl) {
        
$filename $this->createFilename($wsdl);
        if (
$this->obtainMutex($filename"r")) {
            
// check for expired WSDL that must be removed from the cache
             
if ($this->cache_lifetime 0) {
                if (
file_exists($filename) && (time() - filemtime($filename) > $this->cache_lifetime)) {
                    
unlink($filename);
                    
$this->debug("Expired $wsdl ($filename) from cache");
                    
$this->releaseMutex($filename);
                    return 
null;
                  }
            }
            
// see what there is to return
            
$fp = @fopen($filename"r");
            if (
$fp) {
                
$s implode("", @file($filename));
                
fclose($fp);
                
$this->debug("Got $wsdl ($filename) from cache");
            } else {
                
$s null;
                
$this->debug("$wsdl ($filename) not in cache");
            }
            
$this->releaseMutex($filename);
            return (!
is_null($s)) ? unserialize($s) : null;
        } else {
            
$this->debug("Unable to obtain mutex for $filename in get");
        }
        return 
null;
    }

    
/**
    * obtains the local mutex
    *
    * @param string $filename The Filename of the Cache to lock
    * @param string $mode The open-mode ("r" or "w") or the file - affects lock-mode
    * @return boolean Lock successfully obtained ?!
    * @access private
    */
    
function obtainMutex($filename$mode) {
        if (isset(
$this->fplock[md5($filename)])) {
            
$this->debug("Lock for $filename already exists");
            return 
false;
        }
        
$this->fplock[md5($filename)] = fopen($filename.".lock""w");
        if (
$mode == "r") {
            return 
flock($this->fplock[md5($filename)], LOCK_SH);
        } else {
            return 
flock($this->fplock[md5($filename)], LOCK_EX);
        }
    }

    
/**
    * adds a wsdl instance to the cache
    *
    * @param object wsdl $wsdl_instance The wsdl instance to add
    * @return boolean WSDL successfully cached
    * @access public
    */
    
function put($wsdl_instance) {
        
$filename $this->createFilename($wsdl_instance->wsdl);
        
$s serialize($wsdl_instance);
        if (
$this->obtainMutex($filename"w")) {
            
$fp fopen($filename"w");
            
fputs($fp$s);
            
fclose($fp);
            
$this->debug("Put $wsdl_instance->wsdl ($filename) in cache");
            
$this->releaseMutex($filename);
            return 
true;
        } else {
            
$this->debug("Unable to obtain mutex for $filename in put");
        }
        return 
false;
    }

    
/**
    * releases the local mutex
    *
    * @param string $filename The Filename of the Cache to lock
    * @return boolean Lock successfully released
    * @access private
    */
    
function releaseMutex($filename) {
        
$ret flock($this->fplock[md5($filename)], LOCK_UN);
        
fclose($this->fplock[md5($filename)]);
        unset(
$this->fplock[md5($filename)]);
        if (! 
$ret) {
            
$this->debug("Not able to release lock for $filename");
        }
        return 
$ret;
    }

    
/**
    * removes a wsdl instance from the cache
    *
    * @param string $wsdl The URL of the wsdl instance
    * @return boolean Whether there was an instance to remove
    * @access public
    */
    
function remove($wsdl) {
        
$filename $this->createFilename($wsdl);
        
// ignore errors obtaining mutex
        
$this->obtainMutex($filename"w");
        
$ret unlink($filename);
        
$this->debug("Removed ($ret) $wsdl ($filename) from cache");
        
$this->releaseMutex($filename);
        return 
$ret;
    }
}
?>

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