OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
oauth
/
vendor
/
guzzlehttp
/
psr7
/
src
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/30/2021 11:53:24 AM
rwxr-xr-x
📄
AppendStream.php
5.77 KB
09/30/2021 11:53:19 AM
rw-r--r--
📄
BufferStream.php
3.1 KB
09/30/2021 11:53:16 AM
rw-r--r--
📄
CachingStream.php
4.31 KB
09/30/2021 11:53:11 AM
rw-r--r--
📄
DroppingStream.php
1.12 KB
09/30/2021 11:53:15 AM
rw-r--r--
📄
FnStream.php
4.31 KB
09/30/2021 11:53:09 AM
rw-r--r--
📄
Header.php
2.04 KB
09/30/2021 11:53:15 AM
rw-r--r--
📄
HttpFactory.php
3.02 KB
09/30/2021 11:53:16 AM
rw-r--r--
📄
InflateStream.php
1.3 KB
09/30/2021 11:53:13 AM
rw-r--r--
📄
LazyOpenStream.php
899 bytes
09/30/2021 11:53:15 AM
rw-r--r--
📄
LimitStream.php
4.14 KB
09/30/2021 11:53:20 AM
rw-r--r--
📄
Message.php
8.01 KB
09/30/2021 11:53:21 AM
rw-r--r--
📄
MessageTrait.php
6.46 KB
09/30/2021 11:53:10 AM
rw-r--r--
📄
MimeType.php
4.2 KB
09/30/2021 11:53:11 AM
rw-r--r--
📄
MultipartStream.php
4.67 KB
09/30/2021 11:53:21 AM
rw-r--r--
📄
NoSeekStream.php
470 bytes
09/30/2021 11:53:12 AM
rw-r--r--
📄
PumpStream.php
4.43 KB
09/30/2021 11:53:11 AM
rw-r--r--
📄
Query.php
3.55 KB
09/30/2021 11:53:18 AM
rw-r--r--
📄
Request.php
3.81 KB
09/30/2021 11:53:14 AM
rw-r--r--
📄
Response.php
4.79 KB
09/30/2021 11:53:12 AM
rw-r--r--
📄
Rfc7230.php
665 bytes
09/30/2021 11:53:22 AM
rw-r--r--
📄
ServerRequest.php
9.23 KB
09/30/2021 11:53:20 AM
rw-r--r--
📄
Stream.php
7.05 KB
09/30/2021 11:53:14 AM
rw-r--r--
📄
StreamDecoratorTrait.php
3.22 KB
09/30/2021 11:53:17 AM
rw-r--r--
📄
StreamWrapper.php
4.01 KB
09/30/2021 11:53:13 AM
rw-r--r--
📄
UploadedFile.php
4.75 KB
09/30/2021 11:53:18 AM
rw-r--r--
📄
Uri.php
21.3 KB
09/30/2021 11:53:17 AM
rw-r--r--
📄
UriNormalizer.php
8.22 KB
09/30/2021 11:53:10 AM
rw-r--r--
📄
UriResolver.php
8.36 KB
09/30/2021 11:53:19 AM
rw-r--r--
📄
Utils.php
13.9 KB
09/30/2021 11:53:18 AM
rw-r--r--
Editing: StreamWrapper.php
Close
<?php declare(strict_types=1); namespace GuzzleHttp\Psr7; use Psr\Http\Message\StreamInterface; /** * Converts Guzzle streams into PHP stream resources. * * @see https://www.php.net/streamwrapper */ final class StreamWrapper { /** @var resource */ public $context; /** @var StreamInterface */ private $stream; /** @var string r, r+, or w */ private $mode; /** * Returns a resource representing the stream. * * @param StreamInterface $stream The stream to get a resource for * * @return resource * * @throws \InvalidArgumentException if stream is not readable or writable */ public static function getResource(StreamInterface $stream) { self::register(); if ($stream->isReadable()) { $mode = $stream->isWritable() ? 'r+' : 'r'; } elseif ($stream->isWritable()) { $mode = 'w'; } else { throw new \InvalidArgumentException('The stream must be readable, ' . 'writable, or both.'); } return fopen('guzzle://stream', $mode, false, self::createStreamContext($stream)); } /** * Creates a stream context that can be used to open a stream as a php stream resource. * * @return resource */ public static function createStreamContext(StreamInterface $stream) { return stream_context_create([ 'guzzle' => ['stream' => $stream] ]); } /** * Registers the stream wrapper if needed */ public static function register(): void { if (!in_array('guzzle', stream_get_wrappers())) { stream_wrapper_register('guzzle', __CLASS__); } } public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool { $options = stream_context_get_options($this->context); if (!isset($options['guzzle']['stream'])) { return false; } $this->mode = $mode; $this->stream = $options['guzzle']['stream']; return true; } public function stream_read(int $count): string { return $this->stream->read($count); } public function stream_write(string $data): int { return $this->stream->write($data); } public function stream_tell(): int { return $this->stream->tell(); } public function stream_eof(): bool { return $this->stream->eof(); } public function stream_seek(int $offset, int $whence): bool { $this->stream->seek($offset, $whence); return true; } /** * @return resource|false */ public function stream_cast(int $cast_as) { $stream = clone($this->stream); $resource = $stream->detach(); return $resource ?? false; } /** * @return array<int|string, int> */ public function stream_stat(): array { static $modeMap = [ 'r' => 33060, 'rb' => 33060, 'r+' => 33206, 'w' => 33188, 'wb' => 33188 ]; return [ 'dev' => 0, 'ino' => 0, 'mode' => $modeMap[$this->mode], 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => $this->stream->getSize() ?: 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0 ]; } /** * @return array<int|string, int> */ public function url_stat(string $path, int $flags): array { return [ 'dev' => 0, 'ino' => 0, 'mode' => 0, 'nlink' => 0, 'uid' => 0, 'gid' => 0, 'rdev' => 0, 'size' => 0, 'atime' => 0, 'mtime' => 0, 'ctime' => 0, 'blksize' => 0, 'blocks' => 0 ]; } }