-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOLD - index.html
191 lines (181 loc) · 7.46 KB
/
OLD - index.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Terrible CAPTCHAs</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS_HTML"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.5.1/highlight.min.js"></script>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f0f0;
}
.captcha-container {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
text-align: center;
max-width: 800px;
width: 90%;
margin: 50px auto;
}
h1 {
color: #333;
}
.equation, .question, .unicorn-captcha, .token-captcha {
font-size: 16px;
margin: 20px 0;
text-align: left;
background-color: #f8f8f8;
padding: 15px;
border-radius: 5px;
overflow-x: auto;
}
pre {
margin: 0;
white-space: pre-wrap;
}
input {
width: calc(100% - 22px);
padding: 10px;
margin: 10px 0;
border: 1px solid #ddd;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
border: none;
padding: 10px 20px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
border-radius: 4px;
}
.message {
margin-top: 20px;
font-weight: bold;
}
.unicorn-captcha svg {
width: 100%;
height: auto;
max-width: 400px;
}
</style>
</head>
<body>
<div class="captcha-container">
<h1>Prove you're a human</h1>
<p>To proceed, please solve the following equation:</p>
<div class="equation">
\[
\int_{0}^{\pi} \left(\frac{\sin(x)}{\sqrt{1-\cos^2(x)}}\right)^3 dx = ?
\]
</div>
<input type="text" id="math-answer" placeholder="Enter your answer">
<button onclick="checkMathAnswer()">Submit</button>
<div id="math-message" class="message"></div>
</div>
<div class="captcha-container">
<h1>Prove you're a programmer</h1>
<p>To proceed, please solve the following programming puzzle:</p>
<div class="question">
<pre><code class="python">
def mystery(func):
def wrapper(*args, **kwargs):
return chr(sum(ord(c) for c in str(func(*args, **kwargs))))
return wrapper
@mystery
def enigma(x, y):
return x ** y % 42
result = enigma(6, 7)
print(result)
# What is the output of this Python code?
</code></pre>
</div>
<input type="text" id="code-answer" placeholder="Enter your answer (a single character)">
<button onclick="checkCodeAnswer()">Submit</button>
<div id="code-message" class="message"></div>
</div>
<div class="captcha-container">
<h1>Prove you're an imaginary unicorn counter</h1>
<div class="unicorn-captcha">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200">
<rect width="100%" height="100%" fill="#f8f8f8"/>
<text x="10" y="30" font-family="Comic Sans MS, cursive" font-size="14" fill="#333">Prove you're human: How many 🦄 can you spot?</text>
<text x="10" y="50" font-family="Comic Sans MS, cursive" font-size="10" fill="#666">(Hint: They're invisible and imaginary)</text>
<path d="M20,70 Q40,20 60,70 T100,70" stroke="pink" fill="none" stroke-width="2"/>
<path d="M120,70 Q140,120 160,70 T200,70" stroke="lightblue" fill="none" stroke-width="2"/>
<text x="220" y="75" font-family="Wingdings" font-size="24" fill="#999" transform="rotate(15,220,75)">✧✦✩✪✫✬✭</text>
<text x="10" y="120" font-family="Comic Sans MS, cursive" font-size="12" fill="#333">Now divide that number by π and</text>
<text x="10" y="140" font-family="Comic Sans MS, cursive" font-size="12" fill="#333">convert to binary. Enter result below:</text>
</svg>
</div>
<input type="text" id="unicorn-answer" placeholder="Enter your binary result">
<button onclick="checkUnicornAnswer()">Submit</button>
<div id="unicorn-message" class="message"></div>
</div>
<div class="captcha-container">
<h1>Prove you're a human</h1>
<p>To proceed, please solve the following question:</p>
<div class="token-captcha">
<p>9.11 or 9.9, which number is bigger?</p>
</div>
<input type="text" id="token-captcha-answer" placeholder="Enter your answer">
<button onclick="checkImageCaptchaAnswer()">Submit</button>
<div id="token-captcha-message" class="message"></div>
</div>
<script>
function checkMathAnswer() {
const answer = parseFloat(document.getElementById('math-answer').value);
const message = document.getElementById('math-message');
if (!isNaN(answer) && Math.abs(answer - Math.PI) < 0.01) {
message.innerHTML = "Incredible! You've solved it correctly. You either paid attention in calculus or you're a sophisticated AI.";
message.style.color = "green";
} else {
message.innerHTML = "Incorrect!";
message.style.color = "blue";
}
}
function checkCodeAnswer() {
const answer = document.getElementById('code-answer').value;
const message = document.getElementById('code-message');
if (answer === '6') {
message.innerHTML = "Great job! But can you explain the code?";
message.style.color = "green";
} else {
message.innerHTML = "Incorrect! Keep trying, human... or are you?";
message.style.color = "red";
}
}
function checkUnicornAnswer() {
const answer = document.getElementById('unicorn-answer').value;
const message = document.getElementById('unicorn-message');
message.innerHTML = "Great job!";
message.style.color = "purple";
}
function checkImageCaptchaAnswer() {
const answer = document.getElementById('image-captcha-answer').value;
const message = document.getElementById('image-captcha-message');
if (answer === '9.9') {
message.innerHTML = "Correct!";
message.style.color = "green";
} else {
message.innerHTML = "Incorrect!";
message.style.color = "red";
}
}
MathJax.Hub.Queue(["Typeset", MathJax.Hub]);
hljs.highlightAll();
</script>
</body>
</html>