!C99Shell v. 2.1 [PHP 8 Update] [02.02.2022]!

Software: Apache/2.4.53 (Unix) OpenSSL/1.1.1o PHP/7.4.29 mod_perl/2.0.12 Perl/v5.34.1. PHP/7.4.29 

uname -a: Linux vps-2738122-x 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 

uid=1(daemon) gid=1(daemon) grupos=1(daemon) 

Safe-mode: OFF (not secure)

/opt/apex_led/php/vendor/siu/security-multitool/library/SecurityMultiTool/Http/   drwxrwxr-x
Free 15.64 GB of 61.93 GB (25.25%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     Headers.php (4.02 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace SecurityMultiTool\Http;

use 
SecurityMultiTool\Http\Header;
use 
SecurityMultiTool\Common;
use 
SecurityMultiTool\Exception;

class 
Headers implements \CountableCommon\OptionsInterface
{

    protected 
$options = array();

    protected 
$headers = array();

    public function 
__construct(array $options null)
    {
        if (!
is_null($options)) {
            
$this->setOptions($options);
        }
    }

    public function 
send($replace false)
    {
        
ksort($this->headers, \SORT_STRING);
        foreach (
$this->headers as $value) {
            
$value->send($replace);
        }
    }

    public function 
getHeaders()
    {
        return 
$this->headers;
    }

    public function 
toArray()
    {
        
$headers = array();
        foreach (
$this->headers as $value) {
            
$headers $value->getHeader();
        }
        
asort($headers, \SORT_STRING);
        return 
$headers;
    }

    public function 
toString()
    {
        
$string '';
        
$headers $this->toArray();
        foreach (
$headers as $header) {
            
$string .= sprintf('%s\r\n'$header);
        }
        return 
$string;
    }

    public function 
__toString()
    {
        return 
$this->toString();
    }

    public function 
count()
    {
        return 
count($this->headers);
    }

    public function 
setOptions(array $options)
    {
        foreach (
$options as $key => $value) {
            
$this->setOption($key$value);
        }
    }

    public function 
setOption($key$options)
    {
        switch (
$key) {
            case 
'strict_transport_security':
            case 
'sts':
                try {
                    if (!isset(
$this->headers['strict_transport_security'])) {
                        
$this->headers['strict_transport_security']
                            = new 
Header\StrictTransportSecurity($options);
                    } else {
                        foreach (
$options as $key => $value) {
                            
$this->headers['strict_transport_security']
                                ->
setOption($key$value);
                        }
                    }
                } catch (\
Exception $e) {
                    throw 
$e;
                }
                break;

            case 
'csrf_token':
            case 
'csrf':
                try {
                    if (!isset(
$this->headers['csrf_token'])) {
                        
$this->headers['csrf_token']
                            = new 
Header\CsrfToken($options);
                    } else {
                        foreach (
$options as $key => $value) {
                            
$this->headers['csrf_token']
                                ->
setOption($key$value);
                        }
                    }
                } catch (\
Exception $e) {
                    throw 
$e;
                }
                break;
            
            default:
                throw new 
Exception\InvalidArgumentException(
                    
'Header type not recognised in options: ' $key
                
);
                break;
        }
    }

    public function 
getOption($key)
    {
        switch (
$key) {
            case 
'strict_transport_security':
            case 
'sts':
                return 
$this->headers['strict_transport_security']->getOptions();
                break;

            case 
'csrf_token':
            case 
'csrf':
                return 
$this->headers['csrf_token']->getOptions();
                break;
            
            default:
                return 
null;
                break;
        }
    }

    public function 
getOptions()
    {
        
$return = array();
        
ksort($this->headers, \SORT_STRING);
        foreach (
$this->headers as $key => $value) {
            
$return[$key] = $value->getOptions();
        }
        return 
$return;
    }

    public function 
addHeader(Header\HeaderInterface $header)
    {
        
$class get_class($header);
        
$parts explode('\\'$class);
        
$name strtolower(array_shift($parts));
        
$this->headers[$name] = $header;
        return 
$this;
    }

}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

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

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

--[ c99shell v. 2.1 [PHP 8 Update] [02.02.2022] maintained byC99Shell Github | Generation time: 0.3895 ]--