-
Notifications
You must be signed in to change notification settings - Fork 0
/
attackaircrack.cpp
executable file
·52 lines (36 loc) · 1.21 KB
/
attackaircrack.cpp
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
#include "attackaircrack.h"
attackAircrack::attackAircrack()
{
}
bool attackAircrack::start(const QString &BSSID)
{
//if we launch many times since airodump attack auth, stop previous process
if (isRunning())
stop();
if (!utils::validMAC(BSSID)){
utils::mostrarError("Invalid BSSID");
return false;
}
//obtaining files
QString files;
int left = 0, right = 1;
do {
if (QFile::exists(CAPTURE_FOLDER + BSSID +"-"+QString::number(left)+QString::number(right)+".cap")) {
files += BSSID + "-"+QString::number(left)+QString::number(right)+".cap" + " ";
if (left == 9 && right == 9) {
utils::mostrarWarning(utils::htmlRojo("Maximum .cap files readed: 99. From X-99.cap to ahead we could not read data"));
}
}
right++;
if (right == 10) {
right = 0;
left++;
}
} while (left != 10); //100 max
const QString command = "../" + AIRCRACK_COM +
" -b " + BSSID +
" -f" + QString::number(GLOBALS::BRUTEFORCE_FACTOR) +
+ " " + files;
process->setWorkingDirectory(CAPTURE_FOLDER);
return startCommand(command);
}