-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathattackauth.cpp
executable file
·39 lines (30 loc) · 982 Bytes
/
attackauth.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
#include "attackauth.h"
#include "GLOBALS.h"
attackAuth::attackAuth()
{
}
bool attackAuth::start(const QString &BSSID, QString MAC)
{
//if we launch many times since airodump attack auth, stop previous process
if (this->isRunning())
this->stop();
if (!utils::validMAC(BSSID)){
utils::mostrarError("Invalid BSSID");
return false;
}
if (!MAC.isEmpty()) {
if (!utils::validMAC(BSSID)){
utils::mostrarError("Invalid MAC");
return false;
}
else
MAC = " -h " + MAC; //add flag to mac
}
const QString command = AIREPLAY_COM +
" -1 30 -a " + BSSID +
MAC +
" -o " + QString::number(GLOBALS::AUTH_PACK_BURST) +
" -T " + QString::number(GLOBALS::AUTH_RETRIES) +
" " + GLOBALS::INTERFACE;
return startCommand(command);
}