⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.1
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
work
/
vendor
/
ua-parser
/
uap-php
/
src
/
Util
/
Edit File: Fetcher.php
<?php /** * ua-parser * * Copyright (c) 2011-2012 Dave Olsen, http://dmolsen.com * * Released under the MIT license */ namespace UAParser\Util; use Composer\CaBundle\CaBundle; use UAParser\Exception\FetcherException; class Fetcher { private $resourceUri = 'https://raw.githubusercontent.com/ua-parser/uap-core/master/regexes.yaml'; /** @var resource */ private $streamContext; public function __construct($streamContext = null) { if (is_resource($streamContext) && get_resource_type($streamContext) === 'stream-context') { $this->streamContext = $streamContext; } else { $this->streamContext = stream_context_create( [ 'ssl' => [ 'verify_peer' => true, 'verify_depth' => 10, 'cafile' => CaBundle::getSystemCaRootBundlePath(), static::getPeerNameKey() => 'www.github.com', 'disable_compression' => true, ] ] ); } } public function fetch() { $level = error_reporting(0); $result = file_get_contents($this->resourceUri, false, $this->streamContext); error_reporting($level); if ($result === false) { $error = error_get_last(); throw FetcherException::httpError($this->resourceUri, $error['message'] ?? 'Undefined error'); } return $result; } public static function getPeerNameKey(): string { return version_compare(PHP_VERSION, '5.6') === 1 ? 'peer_name' : 'CN_match'; } }
Simpan