-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpassword.html
More file actions
326 lines (297 loc) · 12.2 KB
/
password.html
File metadata and controls
326 lines (297 loc) · 12.2 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
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
<!DOCTYPE html>
<!-- saved from url=(0047)https://cooltool-online.github.io/password.html -->
<html lang="de"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ULTIMATE PASSWORD CRACKER SIMULATION</title>
<style>
body {
font-family: monospace;
background-color: #000;
color: #00ff00;
margin: 0;
overflow: hidden; /* Verhindert Scrollbalken durch den Matrix-Effekt */
}
.matrix {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
pointer-events: none; /* Ermöglicht Interaktion mit Elementen darunter */
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
border: 1px solid #00ff00;
position: relative; /* Für z-index, falls nötig */
background-color: rgba(0, 0, 0, 0.8); /* Leicht transparente Hintergrundfarbe */
}
h1, label, button, #output, #timer {
color: #00ff00;
}
input[type="password"] {
background-color: #222;
color: #00ff00;
border: 1px solid #00ff00;
padding: 10px;
margin-bottom: 10px;
width: 100%;
box-sizing: border-box;
}
button {
background-color: #333;
border: 1px solid #00ff00;
padding: 10px 20px;
cursor: pointer;
}
#output {
margin-top: 20px;
white-space: pre-wrap;
}
#timer {
margin-top: 10px;
font-weight: bold;
}
.password-generator {
margin-top: 20px;
padding: 15px;
border: 1px solid #00ff00;
background-color: #111;
color: #00ff00;
}
.password-generator label {
display: block;
margin-bottom: 5px;
}
.password-generator input[type="number"] {
background-color: #222;
color: #00ff00;
border: 1px solid #00ff00;
padding: 8px;
width: 80px;
box-sizing: border-box;
margin-right: 10px;
}
.password-generator button {
padding: 8px 15px;
}
.password-generator input[type="text"] {
background-color: #222;
color: #00ff00;
border: 1px solid #00ff00;
padding: 8px;
width: 100%;
box-sizing: border-box;
margin-top: 10px;
font-family: monospace;
}
</style>
</head>
<body>
<div class="matrix"><canvas width="1144" height="777"></canvas></div>
<div class="container">
<h1>ULTIMATE PASSWORD CRACKER SIMULATION</h1>
<label for="password">Password:</label>
<input type="password" id="password" placeholder="Enter password here">
<button onclick="startCrack()">Initiate Cracking Sequence</button>
<div id="output"></div>
<div id="timer"></div>
</div>
<div class="password-generator">
<h2>Password Generator</h2>
<label for="passwordLength">Length:</label>
<input type="number" id="passwordLength" value="12" min="1" max="100">
<button onclick="generatePassword()">Generate</button>
<label for="generatedPassword">Generated Password:</label>
<input type="text" id="generatedPassword" readonly="">
</div>
<script>
const matrixDiv = document.querySelector('.matrix');
const outputDiv = document.getElementById('output');
const timerDiv = document.getElementById('timer');
const passwordInput = document.getElementById('password');
const wordlist = ["password", "123456", "qwerty", "admin", "guest", "secret", "user", "test", "hello", "world", "filderstadt", "badenwürttemberg"];
let startTime;
let endTime;
let passwordToCrack;
let isCracking = false;
const allowedChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+=-`~[]{}\\|:;'\",./<>?";
const maxCrackTimeMs = 25 * 60 * 1000; // 25 Minuten in Millisekunden
let attempts = 0;
let intervalId;
function log(message) {
outputDiv.innerHTML = message + "\n";
outputDiv.scrollTop = outputDiv.scrollHeight;
}
function simulateWordlist(password) {
return new Promise(resolve => {
for (const word of wordlist) {
if (word === password) {
resolve("Wordlist");
return;
}
}
resolve(null); // Wordlist exhausted
});
}
function generateCombination(length, index) {
let result = '';
const base = allowedChars.length;
for (let i = length - 1; i >= 0; i--) {
const remainder = Math.floor(index / Math.pow(base, i)) % base;
result = allowedChars[remainder] + result;
}
return result.padStart(length, allowedChars[0]);
}
function simulateBruteForce(password) {
return new Promise(resolve => {
let length = 1;
let currentIndex = 0;
startTime = new Date().getTime();
intervalId = setInterval(() => {
if (!isCracking || (new Date().getTime() - startTime) > maxCrackTimeMs) {
clearInterval(intervalId);
resolve(null);
return;
}
const attempt = generateCombination(length, currentIndex);
attempts++;
if (attempt === password) {
clearInterval(intervalId);
resolve("Brute-Force");
return;
}
currentIndex++;
const maxIndexForLength = Math.pow(allowedChars.length, length);
if (currentIndex >= maxIndexForLength) {
length++;
currentIndex = 0;
}
}, 0);
});
}
function estimateTime(passwordLength, charSetSize, attemptsMade, timeElapsedMs) {
const totalCombinations = Math.pow(charSetSize, passwordLength);
const attemptsPerMs = attemptsMade / timeElapsedMs;
const remainingAttempts = totalCombinations - attemptsMade;
const estimatedRemainingMs = remainingAttempts / attemptsPerMs;
if (estimatedRemainingMs < 60000) {
return `approximately ${(estimatedRemainingMs / 1000).toFixed(2)} seconds`;
} else if (estimatedRemainingMs < 3600000) {
return `approximately ${(estimatedRemainingMs / 60000).toFixed(2)} minutes`;
} else if (estimatedRemainingMs < 86400000) {
return `approximately ${(estimatedRemainingMs / 3600000).toFixed(2)} hours`;
} else if (estimatedRemainingMs < 31536000000) {
return `approximately ${(estimatedRemainingMs / 86400000).toFixed(2)} days`;
} else {
return `an astronomically long time`;
}
}
async function startCrack() {
if (isCracking) return;
outputDiv.innerHTML = "";
timerDiv.innerHTML = "";
passwordToCrack = passwordInput.value;
if (!passwordToCrack) {
log("Please enter a password.");
return;
}
isCracking = true;
log("Initiating password cracking sequence...");
attempts = 0;
startTime = new Date().getTime();
const wordlistResult = await simulateWordlist(passwordToCrack);
if (wordlistResult) {
endTime = new Date().getTime();
const timeTakenSec = (endTime - startTime) / 1000;
log(`\nPASSWORD FOUND: Cracked with ${wordlistResult}!`);
timerDiv.innerHTML = `Time taken: ${timeTakenSec.toFixed(2)} seconds`;
isCracking = false;
return;
}
log("\nWordlist exhausted. Initiating brute-force...");
const bruteForceResult = await simulateBruteForce(passwordToCrack);
isCracking = false;
endTime = new Date().getTime();
const timeTakenMs = endTime - startTime;
const timeTakenSec = timeTakenMs / 1000;
if (bruteForceResult) {
log(`\nPASSWORD FOUND: Cracked with ${bruteForceResult}!`);
timerDiv.innerHTML = `Time taken: ${timeTakenSec.toFixed(2)} seconds`;
} else {
log("\nMaximum cracking time (25 minutes) reached.");
const estimatedTime = estimateTime(
passwordToCrack.length,
allowedChars.length,
attempts,
timeTakenMs
);
log(`Estimated time to crack: ${estimatedTime}`);
timerDiv.innerHTML = `Time elapsed: ${Math.floor(timeTakenSec / 60)} minutes and ${(timeTakenSec % 60).toFixed(2)} seconds`;
}
}
function generatePassword() {
const length = parseInt(document.getElementById('passwordLength').value);
if (isNaN(length) || length < 1 || length > 100) {
alert("Please enter a password length between 1 and 100.");
return;
}
let password = "";
for (let i = 0; i < length; i++) {
const randomIndex = Math.floor(Math.random() * allowedChars.length);
password += allowedChars[randomIndex];
}
document.getElementById('generatedPassword').value = password;
passwordInput.value = password; // Optional: Fülle das Passwortfeld automatisch
}
// Matrix Effekt
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
let width = window.innerWidth;
let height = window.innerHeight;
canvas.width = width;
canvas.height = height;
matrixDiv.appendChild(canvas);
const katakana = 'アァカサタナハマヤャラワガザダバパィイキシチニヒミリヰギジヂビピウゥクスツヌフムユュルグズブヅプエェケセテネヘメレヱゲゼデベペオォコソトノホモヨョロヲゴゾドボポヴッン';
const latin = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
const nums = '0123456789';
const alphabet = katakana + latin + nums;
const fontSize = 16;
const columns = width / fontSize;
const drops = [];
for (let i = 0; i < columns; i++) {
drops[i] = 1;
}
function drawMatrix() {
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
ctx.fillRect(0, 0, width, height);
ctx.fillStyle = '#00ff00';
ctx.font = fontSize + 'px monospace';
for (let i = 0; i < drops.length; i++) {
const text = alphabet[Math.floor(Math.random() * alphabet.length)];
ctx.fillText(text, i * fontSize, drops[i] * fontSize);
if (drops[i] * fontSize > height && Math.random() > 0.975) {
drops[i] = 0;
}
drops[i]++;
}
}
function resizeCanvas() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
columns = width / fontSize;
drops.length = columns; // Anpassung der Array-Länge
for (let i = 0; i < columns; i++) {
if (drops[i] === undefined) {
drops[i] = 1;
}
}
}
setInterval(drawMatrix, 30);
window.addEventListener('resize', resizeCanvas);
</script>
</body></html>