2015-04-14 11:58:33 +00:00
|
|
|
#ifndef MAINSTARTER_H
|
|
|
|
#define MAINSTARTER_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include "externData.h"
|
|
|
|
#include "mainResources.h"
|
|
|
|
#include "Threader.h"
|
|
|
|
#include "FileUpdater.h"
|
|
|
|
|
|
|
|
class MainStarter {
|
|
|
|
private: char dnsTarget[256];
|
|
|
|
int ipsstart[4], ipsend[4];
|
|
|
|
unsigned int **ipsstartfl = NULL, **ipsendfl = NULL;
|
|
|
|
unsigned long ip1, ip2;
|
|
|
|
int gflIndex = 0;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void startIPScan();
|
|
|
|
void startDNSScan();
|
|
|
|
void startImportScan();
|
|
|
|
int loadPorts(const char *data, char delim);
|
|
|
|
int loadTargets(const char *data);
|
|
|
|
|
|
|
|
public:
|
|
|
|
static std::vector<int> portVector;
|
|
|
|
static int flCounter;
|
2015-04-16 11:51:51 +00:00
|
|
|
static bool savingBackUpFile;
|
2015-04-14 11:58:33 +00:00
|
|
|
|
|
|
|
public:
|
2015-04-18 22:30:55 +00:00
|
|
|
MainStarter()
|
2015-04-14 11:58:33 +00:00
|
|
|
{
|
|
|
|
horLineFlag = false;
|
|
|
|
PieAnomC1 = 0, PieWF = 0, PieBA = 0, PieSusp = 0, PieLowl = 0, PieSSH = 0;
|
2015-04-16 11:51:51 +00:00
|
|
|
AnomC1 = 0, baCount = 0, filtered = 0, Overl = 0, Lowl = 0, Alive = 0, Activity = 0, saved = 0, Susp = 0,
|
|
|
|
WF = 0;
|
2015-04-14 11:58:33 +00:00
|
|
|
BrutingThrds = 0;
|
|
|
|
found = 0;
|
|
|
|
gTargets = 0;
|
|
|
|
cons = 0;
|
|
|
|
found = 0;
|
|
|
|
indexIP = 0;
|
|
|
|
flCounter = 0;
|
|
|
|
gflIndex = 0;
|
|
|
|
|
|
|
|
ZeroMemory(ipsstart, sizeof(ipsstart));
|
|
|
|
ZeroMemory(ipsend, sizeof(ipsend));
|
|
|
|
}
|
|
|
|
~MainStarter(){
|
|
|
|
FileUpdater::FUClear();
|
|
|
|
Threader::cleanUp();
|
|
|
|
curl_global_cleanup();
|
|
|
|
|
2015-04-16 11:51:51 +00:00
|
|
|
while (savingBackUpFile) Sleep(100);
|
2015-04-14 11:58:33 +00:00
|
|
|
|
2015-04-16 11:51:51 +00:00
|
|
|
FileUpdater::negativeVector.clear();
|
2015-04-14 11:58:33 +00:00
|
|
|
if (loginLst != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < MaxLogin; ++i) delete[]loginLst[i];
|
|
|
|
delete[]loginLst;
|
|
|
|
loginLst = NULL;
|
|
|
|
};
|
|
|
|
if (passLst != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < MaxPass; ++i) delete[]passLst[i];
|
|
|
|
delete[]passLst;
|
|
|
|
passLst = NULL;
|
|
|
|
};
|
|
|
|
if (wfPassLst != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < MaxWFPass; ++i) delete[]wfPassLst[i];
|
|
|
|
delete[]wfPassLst;
|
|
|
|
wfPassLst = NULL;
|
|
|
|
};
|
|
|
|
if (wfLoginLst != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < MaxWFLogin; ++i) delete[]wfLoginLst[i];
|
|
|
|
delete[]wfLoginLst;
|
|
|
|
wfLoginLst = NULL;
|
|
|
|
};
|
|
|
|
if (sshlpLst != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < MaxSSHPass; ++i) delete[]sshlpLst[i];
|
|
|
|
delete[]sshlpLst;
|
|
|
|
sshlpLst = NULL;
|
|
|
|
};
|
|
|
|
if (ipsstartfl != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < flCounter; ++i) delete[]ipsstartfl[i];
|
|
|
|
delete[]ipsstartfl;
|
|
|
|
ipsstartfl = NULL;
|
|
|
|
};
|
|
|
|
if (ipsendfl != NULL)
|
|
|
|
{
|
|
|
|
for (int i = 0; i < flCounter; ++i) delete[]ipsendfl[i];
|
|
|
|
delete[]ipsendfl;
|
|
|
|
ipsendfl = NULL;
|
|
|
|
};
|
2015-04-23 05:23:02 +00:00
|
|
|
|
|
|
|
unBlockButtons();
|
2015-04-14 11:58:33 +00:00
|
|
|
}
|
|
|
|
|
2015-04-23 05:23:02 +00:00
|
|
|
void unBlockButtons();
|
2015-04-14 11:58:33 +00:00
|
|
|
void runAuxiliaryThreads();
|
|
|
|
void saver();
|
|
|
|
void saveBackupToFile();
|
2015-04-18 22:30:55 +00:00
|
|
|
int fileLoader(const char *fileName);
|
|
|
|
void start(const char* targets, const char* ports);
|
2015-04-14 11:58:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // MAINSTARTER_H
|