!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/lib/tinymce/plugins/ajaxfilemanager/   drwxr-xr-x
Free 9.4 GB of 93.48 GB (10.06%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ajax_save_name.php (2.59 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
    
/**
     * ajax save name
     * @author Logan Cai (cailongqun [at] yahoo [dot] com [dot] cn)
     * @link www.phpletter.com
     * @since 22/May/2007
     *
     */
    
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR "inc" DIRECTORY_SEPARATOR "config.php");
    
$error '';
    
$fileInfo = array();
    if(
CONFIG_SYS_VIEW_ONLY || !CONFIG_OPTIONS_RENAME)
    {
        
$error SYS_DISABLED;
    }
    elseif(empty(
$_POST['name']))
    {
        
$error ERR_RENAME_EMPTY;
    }elseif(!
preg_match("/^[a-zA-Z0-9 _\-.]+$/"$_POST['name']))
    {
        
$error ERR_RENAME_FORMAT;
    }elseif(empty(
$_POST['original_path']) || !file_exists($_POST['original_path']))
    {
        
$error ERR_RENAME_FILE_NOT_EXISTS;
    }elseif(
substr(slashToBackslash(removeTrailingSlash($_POST['original_path'])), strrpos(slashToBackslash(removeTrailingSlash($_POST['original_path'])), "/") + 1) == $_POST['name'])
    {
        
$error ERR_NO_CHANGES_MADE;
    }elseif(
file_exists(addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name']))
    {
        
$error ERR_RENAME_EXISTS;
    }elseif(
is_file($_POST['original_path']) && !isValidExt($_POST['name'], explode(","CONFIG_UPLOAD_VALID_EXTS), explode(","CONFIG_UPLOAD_INVALID_EXTS)))
    {
        
$error ERR_RENAME_FILE_TYPE_NOT_PERMITED;
    }elseif(!
rename(removeTrailingSlash($_POST['original_path']), addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name']))
    {
        
$error ERR_RENAME_FAILED;
    }else 
    {
        
//update record of session if image exists in session for cut or copy
        
include_once(CLASS_SESSION_ACTION);
        
$sessionAction = new SessionAction();        
        
$selectedDocuments $sessionAction->get();
        if(
removeTrailingSlash($sessionAction->getFolder()) == getParentPath($_POST['original_path']) && sizeof($selectedDocuments))
        {
            if((
$key array_search(basename($_POST['original_path']), $selectedDocuments)) !== false)
            {
                
$selectedDocuments[$key] = $_POST['name'];
                
$sessionAction->set($selectedDocuments);
                
            }
            
        }elseif(
removeTrailingSlash($sessionAction->getFolder()) == removeTrailingSlash($_POST['original_path']))
        {
            
$sessionAction->setFolder($_POST['original_path']);
        }    
        
$path addTrailingSlash(getParentPath($_POST['original_path'])) . $_POST['name'];
        if(
is_file($path))
        {
            include_once(
CLASS_FILE);
            
$file = new file($path);
            
$fileInfo $file->getFileInfo();
        }else
        {
            include_once(
CLASS_MANAGER);
            
$manager = new manager($pathfalse);
            
$fileInfo $manager->getFolderInfo();
        }
    }
    
    echo 
"{";
    echo 
"error:'" $error "' ";
    foreach (
$fileInfo as $k=>$v)
    {
        echo 
"," $k ":'" $v "' ";
    }
    echo 
"}";
    
    
?>

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