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

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/wataxi.picotech.app/public_html/vendor/dacoto/laravel-setenv/src/Workers/   drwxr-xr-x
Free 28.35 GB of 117.98 GB (24.03%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

declare(strict_types=1);

namespace 
dacoto\SetEnv\Workers;

use 
dacoto\SetEnv\Contracts\SetEnvFormatter as SetEnvFormatterContract;
use 
dacoto\SetEnv\Exceptions\UnableReadFileException;

class 
SetEnvReader implements \dacoto\SetEnv\Contracts\SetEnvReader
{
    protected 
string $filePath;
    protected 
SetEnvFormatterContract $formatter;

    public function 
__construct(SetEnvFormatterContract $formatter)
    {
        
$this->formatter $formatter;
    }

    public function 
load(string $filePath): SetEnvReader
    
{
        
$this->filePath $filePath;
        return 
$this;
    }

    
/**
     * @throws UnableReadFileException
     */
    
public function content()
    {
        
$this->ensureFileIsReadable();
        return 
file_get_contents($this->filePath);
    }

    
/**
     * @throws UnableReadFileException
     */
    
protected function ensureFileIsReadable(): void
    
{
        if (!
is_readable($this->filePath) || !is_file($this->filePath)) {
            throw new 
UnableReadFileException(sprintf('Unable to read the file at %s.'$this->filePath));
        }
    }

    
/**
     * @throws UnableReadFileException
     */
    
public function lines(): array
    {
        
$content = [];
        
$lines $this->readLinesFromFile();

        foreach (
$lines as $row => $line) {
            
$data = [
                
'line' => $row 1,
                
'raw_data' => $line,
                
'parsed_data' => $this->formatter->parseLine($line)
            ];

            
$content[] = $data;
        }

        return 
$content;
    }

    
/**
     * @throws UnableReadFileException
     */
    
protected function readLinesFromFile()
    {
        
$this->ensureFileIsReadable();

        
$autodetect ini_get('auto_detect_line_endings');
        
ini_set('auto_detect_line_endings''1');
        
$lines file($this->filePathFILE_IGNORE_NEW_LINES);
        
ini_set('auto_detect_line_endings'$autodetect);

        return 
$lines;
    }

    
/**
     * @throws UnableReadFileException
     */
    
public function keys(): array
    {
        
$content = [];
        
$lines $this->readLinesFromFile();

        foreach (
$lines as $row => $line) {
            
$data $this->formatter->parseLine($line);

            if (
$data['type'] === 'setter') {
                
$content[$data['key']] = [
                    
'line' => $row 1,
                    
'export' => $data['export'],
                    
'value' => $data['value'],
                    
'comment' => $data['comment']
                ];
            }
        }

        return 
$content;
    }
}

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