-
Notifications
You must be signed in to change notification settings - Fork 0
/
SW9kan5TaXJoYmdkd2JsdmJ5aGhvYndob29ocWJ9aGqA.html
203 lines (180 loc) · 6.39 KB
/
SW9kan5TaXJoYmdkd2JsdmJ5aGhvYndob29ocWJ9aGqA.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
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html lang="nl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Brute Force CTF</title>
<style>
/* Algemene styling */
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 styling */
.container {
max-width: 400px;
width: 100%;
background: rgba(0, 0, 0, 0.8);
border-radius: 12px;
padding: 30px;
box-shadow: 0 15px 25px rgba(0, 255, 0, 0.1);
text-align: center;
animation: fadeIn 1s ease;
z-index: 1;
}
/* Fade-in animatie */
@keyframes fadeIn {
from { opacity: 0; transform: scale(0.9); }
to { opacity: 1; transform: scale(1); }
}
/* Header styling */
h1 {
font-size: 1.8em;
color: #b3ff00;
font-weight: bold;
margin-bottom: 15px;
}
/* Paragraaf styling */
p {
color: #b3ff00;
font-size: 0.95em;
line-height: 1.5;
margin-bottom: 20px;
}
/* Inputvelden styling */
input[type="text"],
input[type="password"] {
width: calc(100% - 24px);
padding: 12px;
margin-bottom: 20px;
border-radius: 6px;
border: 1px solid #4caf50;
background-color: #2a2a2a;
color: #b3ff00;
transition: box-shadow 0.3s;
}
input[type="text"]:focus,
input[type="password"]:focus {
outline: none;
box-shadow: 0 0 5px rgba(179, 255, 0, 0.5);
border-color: #b3ff00;
}
/* Knop styling */
button {
width: 100%;
padding: 12px;
border: none;
border-radius: 6px;
background-color: #b3ff00;
color: #2a2a2a;
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s, transform 0.1s;
box-shadow: 0 5px 12px rgba(179, 255, 0, 0.2);
}
button:hover {
background-color: #99cc00;
transform: translateY(-2px);
}
/* Bericht styling */
#message {
padding: 15px;
border-radius: 6px;
background-color: #2a2a2a;
color: #b3ff00;
margin-top: 20px;
font-weight: bold;
box-shadow: 0 4px 8px rgba(179, 255, 0, 0.1);
}
/* Achtergrond met vallende neon letters */
.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 7:</h2>
<h1>Brute Force</h1>
<p>We gaan een klein spel spelen om te begrijpen wat brute force betekent.</p>
<p>Brute force is als je alles probeert in te typen totdat je iets vindt dat werkt. Denk aan het proberen van alle mogelijke combinaties totdat je de juiste vindt.</p>
<p>Waarom gebruiken hackers brute force?</p>
<p>Hackers gebruiken brute force omdat het een manier is om wachtwoorden of geheime codes te kraken.</p>
<p>Probeer iets in het onderstaande veld in te voeren:</p>
<form id="inputForm">
<input type="text" id="inputField" placeholder="Gebruikersnaam" value="Coderdojo">
<input type="password" id="passwordInput" placeholder="Wachtwoord">
<button type="button" onclick="checkInput()">Inloggen</button>
<button type="button" id="hintButton" onclick="showHint()" disabled>Hint</button>
</form>
<div id="message"></div>
</div>
<script>
var a = 0, b = "RmxhZ3tNZWVyX2Rhbl8xMDBfdGVrZW5zfQ==", c = "R2VkdWxkIGlzIGVlbiBzY2hvbmUgemFhaw==";
function d(e) { return atob(e); }
function checkInput() {
var f = document.getElementById("inputField").value.trim(),
g = document.getElementById("passwordInput").value.trim(),
h = document.getElementById("message");
h.innerHTML = "";
if (g.length > 40) {
h.innerHTML = "Inloggen gelukt! <a style='decoration: none; color: #b3ff00;' href='" + b + ".html'>" + d(b) + "</a>";
} else {
h.innerText = "Fout wachtwoord. Probeer het opnieuw.";
}
a++;
if (a === 7) {
document.getElementById("hintButton").removeAttribute("disabled");
}
}
function showHint() {
alert("Hint: " + d(c));
}
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>