!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.write_file.php (1.49 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage plugins
 */

/**
 * write out a file to disk
 *
 * @param string $filename
 * @param string $contents
 * @param boolean $create_dirs
 * @return boolean
 */
function smarty_core_write_file($params, &$smarty)
{
    
$_dirname dirname($params['filename']);

    if (
$params['create_dirs']) {
        
$_params = array('dir' => $_dirname);
        require_once(
SMARTY_CORE_DIR 'core.create_dir_structure.php');
        
smarty_core_create_dir_structure($_params$smarty);
    }

    
// write to tmp file, then rename it to avoid file locking race condition
    
$_tmp_file tempnam($_dirname'wrt');

    if (!(
$fd = @fopen($_tmp_file'wb'))) {
        
$_tmp_file $_dirname DIRECTORY_SEPARATOR uniqid('wrt');
        if (!(
$fd = @fopen($_tmp_file'wb'))) {
            
$smarty->trigger_error("problem writing temporary file '$_tmp_file'");
            return 
false;
        }
    }

    
fwrite($fd$params['contents']);
    
fclose($fd);

    if (
DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file$params['filename'])) {
        
// On platforms and filesystems that cannot overwrite with rename() 
        // delete the file before renaming it -- because windows always suffers
        // this, it is short-circuited to avoid the initial rename() attempt
        
@unlink($params['filename']);
        @
rename($_tmp_file$params['filename']);
    }
    @
chmod($params['filename'], $smarty->_file_perms);

    return 
true;
}

/* 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.0398 ]--