-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
41 lines (38 loc) · 1.23 KB
/
script.js
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
function startPasswordBruteForce() {
const password = document.getElementById('password').value;
const output = document.getElementById('output');
output.innerHTML = 'Starting password brute force...';
fetch('http://127.0.0.1:5000/bruteforce', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ password: password })
})
.then(response => response.json())
.then(data => {
output.innerHTML = data.result;
})
.catch(error => {
output.innerHTML = 'Error: ' + error;
});
}
function startDirectoryBruteForce() {
const password = document.getElementById('password').value;
const output = document.getElementById('output');
output.innerHTML = 'Starting directory brute force...';
fetch('http://127.0.0.1:5000/dir_bruteforce', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ password: password })
})
.then(response => response.json())
.then(data => {
output.innerHTML = data.result;
})
.catch(error => {
output.innerHTML = 'Error: ' + error;
});
}