Fix small bug and automate parallel brute forcing
This commit is contained in:
+3
-2
@@ -123,6 +123,7 @@ async function bruteForceAttack(username, charset, maxLen, instanceId, totalInst
|
|||||||
if (tested % 1000 === 0) {
|
if (tested % 1000 === 0) {
|
||||||
process.stdout.write(`\rBrute-Force Versuche: ${tested}`);
|
process.stdout.write(`\rBrute-Force Versuche: ${tested}`);
|
||||||
}
|
}
|
||||||
|
process.stdout.write(`\rTrying candidate: ${candidate}`);
|
||||||
}
|
}
|
||||||
console.log(`\nBrute Force abgeschlossen: ${tested} Kombinationen getestet`);
|
console.log(`\nBrute Force abgeschlossen: ${tested} Kombinationen getestet`);
|
||||||
}
|
}
|
||||||
@@ -197,8 +198,8 @@ if (!USERNAME) {
|
|||||||
await tryWithRainbowTable(USERNAME, rainbowTable);
|
await tryWithRainbowTable(USERNAME, rainbowTable);
|
||||||
} else if (MODE === 'bruteforce') {
|
} else if (MODE === 'bruteforce') {
|
||||||
console.log(`Instance: ${instanceId + 1}/${totalInstances}`);
|
console.log(`Instance: ${instanceId + 1}/${totalInstances}`);
|
||||||
const charset = '0123456789abcdefghijklmnopqrstuvwxyz'.split('');
|
const charset = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()_+-=[]{}|;:,.<>?'.split('');
|
||||||
const maxLen = 6;
|
const maxLen = 20;
|
||||||
await bruteForceAttack(USERNAME, charset, maxLen, instanceId, totalInstances);
|
await bruteForceAttack(USERNAME, charset, maxLen, instanceId, totalInstances);
|
||||||
} else {
|
} else {
|
||||||
console.error(`Unbekannter Mode: ${MODE}`);
|
console.error(`Unbekannter Mode: ${MODE}`);
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
$WorkingDir = "C:\Users\frederik\WebstormProjects\BruteForce\attacks" #
|
||||||
|
|
||||||
|
for ($i = 0; $i -lt 10; $i++) {
|
||||||
|
$cmd = "Set-Location -Path `"$WorkingDir`"; node crack3.js test bruteforce $i 10"
|
||||||
|
Start-Process powershell -ArgumentList "-NoExit", "-Command", $cmd
|
||||||
|
Start-Sleep -Milliseconds 100
|
||||||
|
}
|
||||||
+1
-1
@@ -11,7 +11,7 @@ app.post('/login', (req, res) => {
|
|||||||
const user = users.find(u => u.username === username && u.password === password);
|
const user = users.find(u => u.username === username && u.password === password);
|
||||||
if (user) {
|
if (user) {
|
||||||
res.status(200);
|
res.status(200);
|
||||||
res.send('Login erfolgreich');
|
res.json({ ok: true, message: 'Login erfolgreich' });
|
||||||
} else {
|
} else {
|
||||||
res.status(401).send('Falscher Benutzername oder Passwort');
|
res.status(401).send('Falscher Benutzername oder Passwort');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,10 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"username": "test",
|
"username": "test",
|
||||||
"password": "test"
|
"password": "12"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"username": "lower",
|
"username": "admin",
|
||||||
"password": "lol"
|
"password": "admin"
|
||||||
},
|
|
||||||
{
|
|
||||||
"username": "Gaylord",
|
|
||||||
"password": "Lol_123"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user