!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/queuepro/vendor/spatie/flare-client-php/src/FlareMiddleware/   drwxrwxr-x
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:     AddGitInformation.php (1.92 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace Spatie\FlareClient\FlareMiddleware;

use 
Closure;
use 
Spatie\FlareClient\Report;
use 
Symfony\Component\Process\Process;

class 
AddGitInformation
{
    protected ?
string $baseDir null;

    public function 
handle(Report $reportClosure $next)
    {
        
$this->baseDir $this->getGitBaseDirectory();

        if (! 
$this->baseDir) {
            return 
$next($report);
        }

        
$report->group('git', [
            
'hash' => $this->hash(),
            
'message' => $this->message(),
            
'tag' => $this->tag(),
            
'remote' => $this->remote(),
            
'isDirty' => ! $this->isClean(),
        ]);

        return 
$next($report);
    }

    protected function 
hash(): ?string
    
{
        return 
$this->command("git log --pretty=format:'%H' -n 1") ?: null;
    }

    protected function 
message(): ?string
    
{
        return 
$this->command("git log --pretty=format:'%s' -n 1") ?: null;
    }

    protected function 
tag(): ?string
    
{
        return 
$this->command('git describe --tags --abbrev=0') ?: null;
    }

    protected function 
remote(): ?string
    
{
        return 
$this->command('git config --get remote.origin.url') ?: null;
    }

    protected function 
isClean(): bool
    
{
        return empty(
$this->command('git status -s'));
    }

    protected function 
getGitBaseDirectory(): ?string
    
{
        
/** @var Process $process */
        
$process Process::fromShellCommandline("echo $(git rev-parse --show-toplevel)");

        
$process->run();

        if (! 
$process->isSuccessful()) {
            return 
null;
        }

        
$directory trim($process->getOutput());

        if (! 
file_exists($directory)) {
            return 
null;
        }

        return 
$directory;
    }

    protected function 
command($command)
    {
        
$process Process::fromShellCommandline($command$this->baseDir);

        
$process->run();

        return 
trim($process->getOutput());
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

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