-
Notifications
You must be signed in to change notification settings - Fork 0
/
RmxhZ3tNYXVkLU1hcml0X2lzXzIxX2phYXJfb3VkfQ==.html
176 lines (155 loc) · 5.64 KB
/
RmxhZ3tNYXVkLU1hcml0X2lzXzIxX2phYXJfb3VkfQ==.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
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<style>
body {
font-family: 'Courier New', Courier, monospace;
background-color: black;
color: #b3ff00;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
overflow: hidden;
position: relative;
}
.container {
background-color: rgba(42, 42, 42, 0.9);
border-radius: 12px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
padding: 20px;
text-align: center;
max-width: 350px;
z-index: 1;
}
.container h1,
.container h2 {
margin-bottom: 20px;
}
form {
margin-top: 20px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: 700;
color: #b3ff00;
text-align: left;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 8px;
margin-bottom: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
background-color: #333;
color: #b3ff00;
}
button {
width: 100%;
padding: 10px;
background-color: #b3ff00;
color: #2a2a2a;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #99cc00;
}
p#message {
margin-top: 20px;
text-align: center;
font-weight: 700;
color: #dc3545;
}
.hide {
display: none;
}
.background {
position: absolute;
width: 100%;
height: 100%;
z-index: 0;
overflow: hidden;
font-size: 20px;
white-space: nowrap;
filter: blur(5px);
}
.letter {
position: absolute;
top: -50px;
color: rgba(179, 255, 0, 0.7);
text-shadow: 0 0 10px rgba(179, 255, 0, 0.7);
animation: drop linear infinite;
}
@keyframes drop {
0% { transform: translateY(0); }
100% { transform: translateY(100vh); }
}
</style>
</head>
<body>
<div class="background"></div>
<div class="container">
<h2>Opdracht 3:</h2>
<h1>Login</h1>
<h2>Het is belangrijk dat je een sterk wachtwoord kiest, anders is deze namelijk makkelijk te raden.</h2>
<form id="loginForm" onsubmit="return false;">
<label for="username">Gebruikersnaam:</label>
<input type="text" id="username" value="coderdojo" readonly><br>
<label for="password">Wachtwoord:</label>
<input type="password" id="password" placeholder="Voer hier je wachtwoord in"><br>
<button type="button" onclick="checkPassword()">Login</button>
</form>
<p id="message"></p>
<p id="commonPasswords" class="hide">Veelvoorkomende wachtwoorden: welkom, wachtwoord, 123456, qwerty, welkom123, admin, voetbal, welcome, monkey, abc123, 123456789</p>
<button class="hide" id="hintButton" onclick="showHint()">Hint</button>
</div>
<script>
var incorrectAttempts = 0;
function checkPassword() {
const username = document.getElementById('username').value;
const password = document.getElementById('password').value;
const commonPasswords = ["welkom", "wachtwoord", "123456", "qwerty", "welkom123", "admin", "voetbal", "welcome", "monkey", "abc123", "123456789"];
const iets = 'RmxhZ3tHZWVuX3N0YW5kYWFyZF93YWNodHdvb3JkX21lZXJ9';
if (username === 'coderdojo' && commonPasswords.includes(password)) {
document.getElementById('message').innerHTML = "<a style='decoration: none; color: #dc3545;' href='" + iets + ".html'>" + atob(iets) + "</a>";
} else {
incorrectAttempts++;
document.getElementById('message').innerText = 'Onjuist wachtwoord. Probeer het opnieuw.';
if (incorrectAttempts >= 7) {
document.getElementById('commonPasswords').classList.remove('hide');
document.getElementById('hintButton').classList.remove('hide');
}
}
}
function showHint() {
alert(atob('UHJvYmVlciBlZW4gdmFuIGRlIHZlZWx2b29ya29tZW5kZSB3YWNodHdvb3JkZW4='));
}
function generateLetters() {
const letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
const background = document.querySelector('.background');
const numberOfLetters = 100;
for (let i = 0; i < numberOfLetters; i++) {
const letter = document.createElement('div');
letter.classList.add('letter');
letter.textContent = letters.charAt(Math.floor(Math.random() * letters.length));
letter.style.left = Math.random() * 100 + 'vw';
letter.style.fontSize = Math.random() * 20 + 20 + 'px';
letter.style.animationDuration = Math.random() * 3 + 2 + 's';
letter.style.animationDelay = Math.random() * 5 + 's';
background.appendChild(letter);
}
}
generateLetters();
</script>
</body>
</html>