!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/var/www/html/site/ipanel/js/tiny_mce/plugins/ibrowser/scripts/   drwxr-xr-x
Free 9.14 GB of 93.48 GB (9.77%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     random.php (3.44 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
//////////////////////////////////////////////////////////////
///  phpThumb() by James Heinrich <info@silisoftware.com>   //
//        available at http://phpthumb.sourceforge.net     ///
//////////////////////////////////////////////////////////////
///                                                         //
// phpThumb.demo.random.php                                 //
// James Heinrich <info@silisoftware.com>                   //
//                                                          //
// Display a random image from a specified directory.       //
// Run with no parameters for usage instructions.           //
//                                                          //
//////////////////////////////////////////////////////////////

function SelectRandomImage($dirname='.'$portrait=true$landscape=true$square=true) {
    
// return a random image filename from $dirname
    // the last 3 parameters determine what aspect ratio of images
    // may be returned
    
$possibleimages = array();
    if (
$dh opendir($dirname)) {
        while (
$file readdir($dh)) {
            if (
is_file($dirname.'/'.$file) && eregi('\.(jpg|jpeg|gif|png|tiff|bmp)$'$file)) {
                if (
$gis = @GetImageSize($dirname.'/'.$file)) {
                    if (
$portrait && ($gis[0] < $gis[1])) {
                        
// portrait
                        
$possibleimages[] = $file;
                    } elseif (
$landscape && ($gis[0] > $gis[1])) {
                        
// landscape
                        
$possibleimages[] = $file;
                    } elseif (
$square) {
                        
// square
                        
$possibleimages[] = $file;
                    }
                }
            }
        }
        
closedir($dh);
    }
    if (empty(
$possibleimages)) {
        return 
false;
    }
    if (
phpversion() < '4.2.0') {
        
mt_srand(time());
    }
    
$randkey mt_rand(0count($possibleimages) - 1);
    return 
realpath($dirname.'/'.$possibleimages[$randkey]);
}

if (@
$_REQUEST['dir']) {
    if (
is_dir($_REQUEST['dir'])) {

        if (!@
$_REQUEST['o']) {
            
$_REQUEST['o'] = 'PLS';
        }
        
$_REQUEST['o'] = strtoupper($_REQUEST['o']);
        
$portrait  = (strpos(@$_REQUEST['o'], 'P') !== false);
        
$landscape = (strpos(@$_REQUEST['o'], 'L') !== false);
        
$square    = (strpos(@$_REQUEST['o'], 'S') !== false);
        
$randomSRC SelectRandomImage($_REQUEST['dir'], $portrait$landscape$square);
        if (
strtoupper(substr(PHP_OS03)) == 'WIN') {
            
$randomSRC str_replace('\\''/'eregi_replace('^'.realpath(@$_SERVER['DOCUMENT_ROOT']), ''realpath($randomSRC)));
        } else {
            
$randomSRC str_replace(realpath(@$_SERVER['DOCUMENT_ROOT']), ''realpath($randomSRC));
        }

        
$otherParams = array();
        foreach (
$_GET as $key => $value) {
            if ((
$key == 'dir') || ($key == 'o')) {
                continue;
            }
            if (
is_array($value)) {
                foreach (
$value as $vkey => $vvalue) {
                    
$otherParams[] = urlencode($key).'['.urlencode($vkey).']='.urlencode($vvalue);
                }
            } else {
                
$otherParams[] = urlencode($key).'='.urlencode($value);
            }
        }
        
header('Location: ./phpThumb/phpThumb.php?src='.urlencode($randomSRC).'&'.implode('&'$otherParams));
        exit;

    } else {
        die(
$_REQUEST['dir'].' is not a directory');
    }

} else {

    echo 
'<html><body>Usage: <b>'.basename($_SERVER['PHP_SELF']).'?dir=<i>&lt;directory&gt;</i>&amp;<i>&lt;phpThumb parameters&gt;</i></b>&amp;o=<i>(P|L|S)</i><br><br>Examples:<ul>';
    echo 
'<li>'.basename($_SERVER['PHP_SELF']).'?./images/&o=L <i>(landscape images only)</i></li>';
    echo 
'<li>'.basename($_SERVER['PHP_SELF']).'?./images/&o=PS <i>(portrait or square images only)</i></li>';
    echo 
'</ul></body></html>';

}

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0042 ]--