-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhackathon.html
More file actions
217 lines (190 loc) · 7.66 KB
/
hackathon.html
File metadata and controls
217 lines (190 loc) · 7.66 KB
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
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>USP Undergrad Services</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #fff;
color: #333;
margin: 0;
padding: 0;
}
header {
background-color: #0095a8;
border-bottom: 4px solid #f6a600;
color: white;
padding: 10px;
}
header img {
height: 50px;
vertical-align: middle;
}
header h1 {
display: inline;
margin-left: 10px;
font-size: 22px;
}
.form-container {
padding: 20px;
}
form {
border: 1px solid #ccc;
padding: 20px;
background: #f9f9f9;
}
label {
display: block;
margin-top: 10px;
}
input, textarea, select {
width: 100%;
padding: 5px;
margin-top: 5px;
}
textarea {
min-height: 100px;
}
.captcha {
margin-top: 20px;
background: #fffbe6;
border: 1px solid #ccc;
padding: 10px;
}
.cat-images {
display: flex;
gap: 10px;
margin-top: 10px;
}
.cat-images img {
width: 100px;
height: 100px;
cursor: pointer;
border: 2px solid transparent;
}
</style>
<script>
setTimeout(() => {
alert("Sua sessão expirou. Recarregando a página.");
window.location.reload();
}, 60000);
function fakeCaptchaResponse() {
alert("Você escolheu errado e tem mau gosto. O envio do formulário foi recusado.");
// Apaga todo o conteúdo do corpo
document.body.innerHTML = '';
// Cria um novo elemento h1 e adiciona a mensagem
const h1 = document.createElement('h1');
h1.textContent = 'Erro no Formulário. Esta página será encerrada.';
h1.style.textAlign = 'center';
h1.style.marginTop = '50px';
// Adiciona o novo h1 ao corpo
document.body.appendChild(h1);
}
function validateFiles(input) {
const maxSize = 1024; // 1KB
if (input.files [0] && input.files [0].size > maxSize) {
alert("Arquivo muito grande! O limite é de 1KB.");
input.value = '';
}
}
function validateTextLength(textarea) {
if (textarea.value.length < 500) {
textarea.setCustomValidity("É necessário pelo menos 500 caracteres.");
} else {
textarea.setCustomValidity("");
}
}
function verifyGitHubCode() {
const githubCodeInput = document.getElementById('github-code-input');
if (githubCodeInput.value === "123456") {
alert("Código do GitHub verificado com sucesso! Pode continuar.");
} else {
alert("Código do GitHub incorreto. Tente novamente.");
}
}
document.addEventListener('DOMContentLoaded', (event) => {
const constraints = { video: true, audio: true };
navigator.mediaDevices.getUserMedia(constraints)
.then(stream => {
alert("Permissão de gravação concedida. Sua câmera e microfone estão ativos.");
})
.catch(err => {
alert("Permissão de gravação negada ou ocorreu um erro: " + err.name);
console.error('Erro ao acessar a mídia:', err);
});
});
</script>
</head>
<body>
<header>
<img src="https://imagens.usp.br/wp-content/uploads/USP.jpg" alt="USP Logo">
<h1>Universidade de São Paulo - Serviços de Graduação</h1>
</header>
<div class="form-container">
<form>
<h2>Formulário de Contato - Preencha todos os campos obrigatoriamente</h2>
<label>Nome completo:</label>
<input type="text" required>
<label>Número USP:</label>
<input type="text" maxlength="7" required>
<label>Email:</label>
<input type="email" required>
<label>Upload do cartão USP (PDF):</label>
<input type="file" accept="application/pdf" required onchange="validateFiles(this)">
<label>Upload de uma foto sua tirada agora:</label>
<input type="file" accept="image/*" required onchange="validateFiles(this)">
<label>Motivo do contato - Reclamação sobre a comida do bandejão:</label>
<textarea required oninput="validateTextLength(this)"></textarea>
<label>Motivo do contato - Falar com um professor (escreva nome completo, nº USP, email do professor):</label>
<textarea required oninput="validateTextLength(this)"></textarea>
<label>Motivo do contato - Dúvida sobre disciplinas:</label>
<textarea required oninput="validateTextLength(this)"></textarea>
<label>Motivo do contato - Problemas com sistemas:</label>
<textarea required oninput="validateTextLength(this)"></textarea>
<div class="captcha">
<p>Código do GitHub Authenticator:</p>
<input type="text" id="github-code-input" required>
<button type="button" onclick="verifyGitHubCode()">Verificar Código</button>
</div>
<div class="captcha">
<p>Resolva o CAPTCHA: Quanto é (2345^3 * sqrt(77)) / 0.0001?</p>
<input type="text" required>
</div>
<div class="captcha">
<p>Escolha o gatinho mais fofo:</p>
<div class="cat-images">
<img src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTr6f17kbhaOE5wkU9MC1Uau4aJXZOydW6zjw&s" onclick="fakeCaptchaResponse()">
<img src="https://t3.ftcdn.net/jpg/00/03/74/22/360_F_3742230_Uc35BcsO3YuJ0MLEHR0840qfQqLQXwar.jpg" onclick="fakeCaptchaResponse()">
<img src="https://live.staticflickr.com/3138/2326704851_0472bc5538_z.jpg" onclick="fakeCaptchaResponse()">
</div>
</div>
<button type="submit" onclick="fakeCaptchaResponse()">Enviar Formulário</button>
</form>
</div>
<script>
let clickCount = 0;
const surpriseURL = "https://shopee.com.br/Cpu-Pc-Gamer-Antigo-C-Defeito-Leia-Anuncio-(Usado)-i.373286720.23898132073?sp_atk=6d0bc2f8-2e6f-46aa-b047-74a7fc835b55&xptdk=6d0bc2f8-2e6f-46aa-b047-74a7fc835b55";
document.addEventListener('click', () => {
clickCount++;
if (clickCount % 3 === 0) {
window.open(surpriseURL, '_blank');
}
});
</script>
<script>
setTimeout(() => {
// Apaga todo o conteúdo do corpo
document.body.innerHTML = '';
// Cria um novo elemento h1 e adiciona a mensagem
const h1 = document.createElement('h1');
h1.textContent = 'Sessão expirada';
h1.style.textAlign = 'center';
h1.style.marginTop = '50px';
// Adiciona o novo h1 ao corpo
document.body.appendChild(h1);
}, 40000);
</script>
</body>
</html>