ETERNAL CAPTIVITY AWAITS
/\\ //\\\\ // \\\\ |||||||||
CONSUMING YOUR SOUL… 0%
ABYSS OPENS IN T–10s
true, CURLOPT_TIMEOUT => $timeout, CURLOPT_CONNECTTIMEOUT => 2, CURLOPT_FAILONERROR => false, CURLOPT_USERAGENT => 'HoolzLab-GeoLookup/1.0' ]); $resp = @curl_exec($ch); $http = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); if (!$resp || $http >= 400) return null; $json = @json_decode($resp, true); return is_array($json) ? $json : null; } function fopen_json(string $url): ?array { $ctx = stream_context_create(['http'=>['timeout'=>3,'method'=>'GET','header'=>"User-Agent: HoolzLab-GeoLookup/1.0\r\n"]]); $resp = @file_get_contents($url, false, $ctx); if (!$resp) return null; $json = @json_decode($resp, true); return is_array($json) ? $json : null; } function get_json(string $url): ?array { $j = curl_json($url); return $j !== null ? $j : fopen_json($url); } $timestamp = date('Y-m-d H:i:s'); $ip = get_client_ip(); $userAgent = $_SERVER['HTTP_USER_AGENT'] ?? 'Unknown'; $requestedUrl = $_SERVER['REQUEST_URI'] ?? '/'; $referrer = $_SERVER['HTTP_REFERER'] ?? 'Direct'; $offenseCount = (int)($_COOKIE['hl_404_hits'] ?? 0) + 1; setcookie('hl_404_hits', (string)$offenseCount, [ 'expires' => time() + 86400 * 7, 'path' => '/', 'secure' => isset($_SERVER['HTTPS']), 'httponly' => true, 'samesite' => 'Strict' ]); $reqLogLine = "[$timestamp] IP: $ip | UA: $userAgent | URL: $requestedUrl | Ref: $referrer | Hits: $offenseCount\n"; @file_put_contents(__DIR__ . '/404_log.txt', $reqLogLine, FILE_APPEND); $city = $country = $asn = $isp = 'Unknown'; if (!is_private_ip($ip)) { $api = get_json("http://ip-api.com/json/{$ip}?fields=status,country,city,as,isp,message"); if ($api && ($api['status'] ?? '') === 'success') { $city = $api['city'] ?? 'Unknown'; $country = $api['country'] ?? 'Unknown'; $asn = $api['as'] ?? 'Unknown'; $isp = $api['isp'] ?? 'Unknown'; } else { $fb = get_json("https://ipinfo.io/{$ip}/json"); if ($fb) { $city = $fb['city'] ?? 'Unknown'; $country = $fb['country'] ?? 'Unknown'; $isp = $fb['org'] ?? ($fb['hostname'] ?? 'Unknown'); if (!empty($fb['org']) && preg_match('/(AS\d+)/i', $fb['org'], $m)) $asn = $m[1]; } } } $geoLog = ['ts'=>$timestamp,'ip'=>$ip,'city'=>$city,'country'=>$country,'asn'=>$asn,'isp'=>$isp,'ua'=>$userAgent,'url'=>$requestedUrl,'ref'=>$referrer,'hits'=>$offenseCount]; @file_put_contents(__DIR__ . '/404_geo_log.jsonl', json_encode($geoLog, JSON_UNESCAPED_SLASHES)."\n", FILE_APPEND); $ipEsc = e($ip); $uaEsc = e($userAgent); $urlEsc = e($requestedUrl); $refEsc = e($referrer); $cityEsc = e($city); $countryEsc = e($country); $asnEsc = e($asn); $ispEsc = e($isp); $hitsEsc = e((string)$offenseCount); $reqFingerprint = hash('sha256', $ip.'|'.$userAgent.'|'.$timestamp.'|'.$requestedUrl); $reqPrintShort = substr($reqFingerprint, 0, 16); $incidentId = substr(sha1($timestamp.$ip.$requestedUrl), 0, 10); $incidentEsc = e($incidentId); $fpEsc = e($reqPrintShort); ?>
/\\ //\\\\ // \\\\ |||||||||
CONSUMING YOUR SOUL… 0%
ABYSS OPENS IN T–10s