Exploit databaseDownload repository ZIP
GH-25ed919a3c63ff26fc49a3fe47dc7565
datackmy/fallingskies-cve-2023-35885
Sources for CVE-2023-35885
4 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files1
datackmy/fallingskies-cve-2023-35885Revision cb3449d9acca
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
src/Site/Parser/DomainName.php
PHP · 3,334 bytes<?php
namespace App\Site\Parser; use GuzzleHttp\Psr7\Request; use GuzzleHttp\Client as HttpClient; use Psr\Cache\CacheItemPoolInterface as CachePool; use App\Util\Retry; use Pdp\Rules; use Pdp\Domain; use Pdp\ResolvedDomain; class DomainName { public const PUBLIC_SUFFIX_LIST_URI = "\x68\x74\164\x70\x73\x3a\x2f\57\160\165\142\154\x69\x63\x73\165\x66\146\x69\x78\56\x6f\162\147\57\x6c\x69\163\164\57\160\165\x62\x6c\151\143\137\x73\x75\x66\x66\151\170\137\154\x69\x73\x74\x2e\x64\141\x74"; public const TOP_LEVEL_DOMAIN_LIST_URI = "\150\164\164\x70\163\x3a\x2f\57\144\141\164\141\56\x69\x61\156\x61\x2e\157\162\x67\57\124\x4c\104\x2f\164\154\x64\x73\55\141\x6c\160\150\x61\x2d\x62\171\x2d\x64\x6f\155\141\x69\156\x2e\164\x78\x74"; public const HTTP_CLIENT_TIMEOUT = 10; private CachePool $cachePool; private ?HttpClient $httpClient = null; public function __construct(CachePool $cachePool) { $this->cachePool = $cachePool; } public function resolveDomainName(string $domainName) : ?ResolvedDomain { goto Cf3f2; A5755: $resolvedDomain = $publicSuffixList->resolve(Domain::fromIDNA2008($domainName)); goto E92dd; E92dd: return $resolvedDomain; goto e4aa8; Cf3f2: $publicSuffixList = $this->getPublicSuffixList(); goto A5755; e4aa8: } private function getPublicSuffixList() : Rules { goto f35fd; C317f: $publicSuffixListCacheItem->set($publicSuffixList); goto F8919; b2216: F0d46: goto ebfce; F8919: $this->cachePool->save($publicSuffixListCacheItem); goto Ca319; Db019: $publicSuffixList = Rules::fromString($publicSuffixList); goto cf2fa; bd685: Fd2a9: goto A0d09; b55fd: goto Fd2a9; goto b914f; b914f: Bf059: goto Bf17e; e5a7b: $response = $this->retry(function () use($httpClient, $request) { $response = $httpClient->send($request); return $response; }); goto d37b1; f5999: if (!(false === empty($publicSuffixList))) { goto F0d46; } goto Db019; ab9a2: $publicSuffixList = trim((string) $response->getBody()); goto f5999; Ca319: D0df0: goto b2216; e7391: $request = new Request("\107\105\124", self::PUBLIC_SUFFIX_LIST_URI); goto e5a7b; d5937: if (!(200 == $responseStatusCode)) { goto Ffaf6; } goto ab9a2; F74e4: $publicSuffixListCacheItem->expiresAfter(604800); goto C317f; d37b1: $responseStatusCode = $response->getStatusCode(); goto d5937; F7cbc: $httpClient = $this->getHttpClient(); goto e7391; cf2fa: if (!(true === isset($publicSuffixList) && $publicSuffixList instanceof Rules)) { goto D0df0; } goto F74e4; Bf17e: $publicSuffixList = $publicSuffixListCacheItem->get(); goto bd685; ebfce: Ffaf6: goto b55fd; A7f6a: if (true === $publicSuffixListCacheItem->isHit()) { goto Bf059; } goto F7cbc; A0d09: return $publicSuffixList; goto eeedf; f35fd: $publicSuffixListCacheItem = $this->cachePool->getItem("\x70\x75\142\x6c\151\x63\x5f\x73\165\146\x66\x69\x78\x5f\x6c\151\x73\x74"); goto A7f6a; eeedf: } private function getHttpClient() : HttpClient { goto A0b49; A0b49: if (!(true === is_null($this->httpClient))) { goto D4e80; } goto Ea23c; ccb8f: return $this->httpClient; goto fa798; Df743: D4e80: goto ccb8f; Ea23c: $config = ["\x74\151\155\x65\157\165\x74" => self::HTTP_CLIENT_TIMEOUT, "\166\x65\x72\151\x66\x79" => false]; goto Ba1a0; Ba1a0: $this->httpClient = new HttpClient($config); goto Df743; fa798: } private function retry(callable $fn, $retries = 1, $delay = 3) { return Retry::retry($fn, $retries, $delay); } }