Add brute-force attack script and adjust backend login response handling

This commit is contained in:
2025-09-24 11:41:28 +02:00
parent 0899e30c04
commit 13121faa63
2 changed files with 88 additions and 0 deletions
+1
View File
@@ -10,6 +10,7 @@ app.post('/login', (req, res) => {
const {username, password} = req.body;
const user = users.find(u => u.username === username && u.password === password);
if (user) {
res.status(200);
res.send('Login erfolgreich');
} else {
res.status(401).send('Falscher Benutzername oder Passwort');