Linux ip-172-31-33-47 5.4.0-1045-aws #47~18.04.1-Ubuntu SMP Tue Apr 13 15:58:14 UTC 2021 x86_64
Apache/2.4.29 (Ubuntu)
: 172.31.33.47 | : 3.12.151.104
Cant Read [ /etc/named.conf ]
7.4.20
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
www /
html /
boaz /
vendor /
symfony /
http-client /
[ HOME SHELL ]
Name
Size
Permission
Action
Chunk
[ DIR ]
drwxrwxr-x
DataCollector
[ DIR ]
drwxrwxr-x
DependencyInjection
[ DIR ]
drwxrwxr-x
Exception
[ DIR ]
drwxrwxr-x
Internal
[ DIR ]
drwxrwxr-x
Response
[ DIR ]
drwxrwxr-x
AmpHttpClient.php
6.97
KB
-rw-rw-r--
CHANGELOG.md
1.12
KB
-rw-rw-r--
CachingHttpClient.php
5.24
KB
-rw-rw-r--
CurlHttpClient.php
21.62
KB
-rw-rw-r--
HttpClient.php
3.33
KB
-rw-rw-r--
HttpClientTrait.php
24.43
KB
-rw-rw-r--
HttpOptions.php
5.44
KB
-rw-rw-r--
HttplugClient.php
9.47
KB
-rw-rw-r--
LICENSE
1.04
KB
-rw-rw-r--
MockHttpClient.php
3.49
KB
-rw-rw-r--
NativeHttpClient.php
17.8
KB
-rw-rw-r--
NoPrivateNetworkHttpClient.php
3.68
KB
-rw-rw-r--
Psr18Client.php
8.05
KB
-rw-rw-r--
README.md
537
B
-rw-rw-r--
ScopingHttpClient.php
3.51
KB
-rw-rw-r--
TraceableHttpClient.php
2.84
KB
-rw-rw-r--
composer.json
1.52
KB
-rw-rw-r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : MockHttpClient.php
<?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; use Symfony\Component\HttpClient\Exception\TransportException; use Symfony\Component\HttpClient\Response\MockResponse; use Symfony\Component\HttpClient\Response\ResponseStream; use Symfony\Contracts\HttpClient\HttpClientInterface; use Symfony\Contracts\HttpClient\ResponseInterface; use Symfony\Contracts\HttpClient\ResponseStreamInterface; /** * A test-friendly HttpClient that doesn't make actual HTTP requests. * * @author Nicolas Grekas <p@tchwork.com> */ class MockHttpClient implements HttpClientInterface { use HttpClientTrait; private $responseFactory; private $baseUri; private $requestsCount = 0; /** * @param callable|callable[]|ResponseInterface|ResponseInterface[]|iterable|null $responseFactory */ public function __construct($responseFactory = null, string $baseUri = null) { if ($responseFactory instanceof ResponseInterface) { $responseFactory = [$responseFactory]; } if (!$responseFactory instanceof \Iterator && null !== $responseFactory && !\is_callable($responseFactory)) { $responseFactory = (static function () use ($responseFactory) { yield from $responseFactory; })(); } $this->responseFactory = $responseFactory; $this->baseUri = $baseUri; } /** * {@inheritdoc} */ public function request(string $method, string $url, array $options = []): ResponseInterface { [$url, $options] = $this->prepareRequest($method, $url, $options, ['base_uri' => $this->baseUri], true); $url = implode('', $url); if (null === $this->responseFactory) { $response = new MockResponse(); } elseif (\is_callable($this->responseFactory)) { $response = ($this->responseFactory)($method, $url, $options); } elseif (!$this->responseFactory->valid()) { throw new TransportException('The response factory iterator passed to MockHttpClient is empty.'); } else { $responseFactory = $this->responseFactory->current(); $response = \is_callable($responseFactory) ? $responseFactory($method, $url, $options) : $responseFactory; $this->responseFactory->next(); } ++$this->requestsCount; if (!$response instanceof ResponseInterface) { throw new TransportException(sprintf('The response factory passed to MockHttpClient must return/yield an instance of ResponseInterface, "%s" given.', \is_object($response) ? \get_class($response) : \gettype($response))); } return MockResponse::fromRequest($method, $url, $options, $response); } /** * {@inheritdoc} */ public function stream($responses, float $timeout = null): ResponseStreamInterface { if ($responses instanceof ResponseInterface) { $responses = [$responses]; } elseif (!is_iterable($responses)) { throw new \TypeError(sprintf('"%s()" expects parameter 1 to be an iterable of MockResponse objects, "%s" given.', __METHOD__, get_debug_type($responses))); } return new ResponseStream(MockResponse::stream($responses, $timeout)); } public function getRequestsCount(): int { return $this->requestsCount; } }
Close