!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/justinrainbow/json-schema/src/JsonSchema/Uri/Retrievers/   drwxrwxr-x
Free 15.63 GB of 61.93 GB (25.24%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/*
 * This file is part of the JsonSchema package.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace JsonSchema\Uri\Retrievers;

use 
JsonSchema\Exception\ResourceNotFoundException;
use 
JsonSchema\Validator;

/**
 * Tries to retrieve JSON schemas from a URI using file_get_contents()
 * 
 * @author Sander Coolen <sander@jibber.nl> 
 */
class FileGetContents extends AbstractRetriever
{
    protected 
$messageBody;
    
    
/**
     * {@inheritDoc}
     * @see \JsonSchema\Uri\Retrievers\UriRetrieverInterface::retrieve()
     */
    
public function retrieve($uri)
    {
        
$context stream_context_create(array(
            
'http' => array(
                
'method' => 'GET',
                
'header' => "Accept: " Validator::SCHEMA_MEDIA_TYPE
            
)));

        
set_error_handler(function() use ($uri) {
            throw new 
ResourceNotFoundException('JSON schema not found at ' $uri);
        });
        
$response file_get_contents($uri);
        
restore_error_handler();

        if (
false === $response) {
            throw new 
ResourceNotFoundException('JSON schema not found at ' $uri);
        }
        if (
$response == ''
            
&& substr($uri07) == 'file://' && substr($uri, -1) == '/'
        
) {
            throw new 
ResourceNotFoundException('JSON schema not found at ' $uri);
        }

        
$this->messageBody $response;
        if (! empty(
$http_response_header)) {
            
$this->fetchContentType($http_response_header);
        } else {
            
// Could be a "file://" url or something else - fake up the response
            
$this->contentType null;
        }
        
        return 
$this->messageBody;
    }
    
    
/**
     * @param array $headers HTTP Response Headers
     * @return boolean Whether the Content-Type header was found or not
     */
    
private function fetchContentType(array $headers)
    {
        foreach (
$headers as $header) {
            if (
$this->contentType self::getContentTypeMatchInHeader($header)) {
                return 
true;
            }
        }
        
        return 
false;
    }
    
    
/**
     * @param string $header
     * @return string|null
     */
    
protected static function getContentTypeMatchInHeader($header)
    {
        if (
preg_match("/Content-Type:(\V*)/ims"$header$match)) {
            return 
trim($match[1]);
        }
    }
}

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