Little structure changes

This commit is contained in:
cora32 2014-10-26 18:05:51 +03:00
parent e12f25da06
commit a3d9acdcb9
21 changed files with 206 additions and 318 deletions

View File

@ -1,4 +1,5 @@
#include "ActivityDrawerTh_HorNet.h" #include "ActivityDrawerTh_HorNet.h"
#include "externData.h"
void ActivityDrawerTh_HorNet::doEmitDrawActivityLine(QString data) void ActivityDrawerTh_HorNet::doEmitDrawActivityLine(QString data)
{ {

View File

@ -2,6 +2,9 @@
#include "CheckKey_Th.h" #include "CheckKey_Th.h"
#include "CheckProxy_Th.h" #include "CheckProxy_Th.h"
#include "STh.h" #include "STh.h"
#include "externData.h"
#include "externFunctions.h"
int emitIfOK = -1; int emitIfOK = -1;
int KeyCheckerMain() int KeyCheckerMain()
{ {
@ -204,9 +207,9 @@ int KeyCheckerMain()
else if(strstr(msg, "400 Bad Request") != NULL) else if(strstr(msg, "400 Bad Request") != NULL)
{ {
#pragma region QTGUI_Area #pragma region QTGUI_Area
QString errorDef = GetNSErrorDefinition(msg, "notify"); QString errorDef = GetNSErrorDefinition(msg, "notify");
if(errorDef == "Invalid access key") stt->doEmitionYellowFoundData("[NS-Track] [Key is unauthorized] A valid key is required."); if(errorDef == "Invalid access key") stt->doEmitionYellowFoundData("[NS-Track] [Key is unauthorized] A valid key is required.");
else stt->doEmitionYellowFoundData("[NS-Track] -FAIL! [400 Bad Request : " + GetNSErrorDefinition(msg, "notify") + "]"); else stt->doEmitionYellowFoundData("[NS-Track] -FAIL! [400 Bad Request : " + GetNSErrorDefinition(msg, "notify") + "]");
#pragma endregion #pragma endregion
closesocket(sock); closesocket(sock);
return -1; return -1;

View File

@ -1,4 +1,5 @@
#include "CheckProxy_Th.h" #include "CheckProxy_Th.h"
#include "externData.h"
void CheckProxy_Th::doEmitChangeRedIRCData(QString str) void CheckProxy_Th::doEmitChangeRedIRCData(QString str)
{ {
@ -23,7 +24,6 @@ void CheckProxy_Th::doEmitChangeRawIRCDataOut(QString str)
void CheckProxyLogic() void CheckProxyLogic()
{ {
destroychPThFlag = false;
QString str1 = ui->ircProxyPort->text(); QString str1 = ui->ircProxyPort->text();
QString str2 = ui->ircProxy->text(); QString str2 = ui->ircProxy->text();
strcpy(ircProxy, str2.toUtf8().data()); strcpy(ircProxy, str2.toUtf8().data());

View File

@ -1,5 +1,6 @@
#include "DrawerTh_ME2Scanner.h" #include "DrawerTh_ME2Scanner.h"
#include "STh.h" #include "STh.h"
#include "externData.h"
void DrawerTh_ME2Scanner::doEmitDrawTextPlacers() void DrawerTh_ME2Scanner::doEmitDrawTextPlacers()
{ {

View File

@ -1,6 +1,9 @@
#pragma once #pragma once
#include "DrawerTh_QoSScanner.h" #include "DrawerTh_QoSScanner.h"
#include "STh.h" #include "STh.h"
#include "externData.h"
int tMax;
void DrawerTh_QoSScanner::run() void DrawerTh_QoSScanner::run()
{ {

View File

@ -1,4 +1,5 @@
#include "DrawerTh_VoiceScanner.h" #include "DrawerTh_VoiceScanner.h"
#include "externData.h"
void DrawerTh_VoiceScanner::doEmitAddLine() void DrawerTh_VoiceScanner::doEmitAddLine()
{ {

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include "IRCPinger_Th.h" #include "IRCPinger_Th.h"
#include "externData.h"
void IRCPinger_Th::doEmitChangeRedIRCData(QString str) void IRCPinger_Th::doEmitChangeRedIRCData(QString str)
{ {

4
STh.h
View File

@ -4,6 +4,9 @@
#pragma once #pragma once
#include "nesca_3.h" #include "nesca_3.h"
#include "resource.h" #include "resource.h"
#include "externFunctions.h"
extern int tMax;
class STh : public QThread class STh : public QThread
{ {
@ -41,7 +44,6 @@ public: signals: void showRedVersion();
public: signals: void startScanIP(); public: signals: void startScanIP();
public: signals: void startScanDNS(); public: signals: void startScanDNS();
public: signals: void startScanImport(); public: signals: void startScanImport();
public: signals: void signalDataSaved(bool); public: signals: void signalDataSaved(bool);
public: signals: void changeGreenBAData(QString); public: signals: void changeGreenBAData(QString);
public: signals: void changeRedBAData(QString); public: signals: void changeRedBAData(QString);

View File

@ -3,6 +3,8 @@
#include <libssh/libssh.h> #include <libssh/libssh.h>
#include <sstream> #include <sstream>
#include <openssl/md5.h> #include <openssl/md5.h>
#include "externFunctions.h"
#include "externData.h"
#pragma once #pragma once
#if defined(Q_OS_WIN32) #if defined(Q_OS_WIN32)
@ -12,7 +14,6 @@
#endif #endif
int gMaxBrutingThreads = 200; int gMaxBrutingThreads = 200;
volatile bool BConnLocked = false;
void BConInc() void BConInc()
{ {
__asm __asm
@ -34,7 +35,6 @@ void BConDec()
stt->doEmitionChangeBA(QString::number(BrutingThrds)); stt->doEmitionChangeBA(QString::number(BrutingThrds));
#pragma endregion #pragma endregion
}; };
bool SSHConnLocked = false;
void SSHConInc() void SSHConInc()
{ {
__asm __asm
@ -113,7 +113,7 @@ int recvWT(
} }
return(n) ; /* trouble */ return(n) ; /* trouble */
} }
string toLowerStr(const char *str) std::string toLowerStr(const char *str)
{ {
int tsz = strlen(str); int tsz = strlen(str);
if(tsz == 1) if(tsz == 1)
@ -133,7 +133,7 @@ string toLowerStr(const char *str)
memset(strr + tsz, '\0', 1); memset(strr + tsz, '\0', 1);
string tstr = strr; std::string tstr = strr;
delete []strr; delete []strr;
return tstr; return tstr;
}; };
@ -410,7 +410,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
else if(host=gethostbyname (ip)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0]; else if(host=gethostbyname (ip)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
else else
{ {
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -419,7 +419,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
else if(host=gethostbyname (ip)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0]; else if(host=gethostbyname (ip)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
else else
{ {
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -445,7 +445,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
#pragma endregion #pragma endregion
if(strlen(headerMsg) == 0) if(strlen(headerMsg) == 0)
{ {
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -463,7 +463,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
closesocket(sock); closesocket(sock);
strcpy(lps.other, "[400 Bad Request]"); strcpy(lps.other, "[400 Bad Request]");
OnLiner = 0; isActive = 0;
return lps; return lps;
} }
else if(strstri(headerMsg, "404 Not") != NULL else if(strstri(headerMsg, "404 Not") != NULL
@ -485,7 +485,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
closesocket(sock); closesocket(sock);
strcpy(lps.other, QString("[404 Not Found (" + QString(path) + ")]").toLocal8Bit().data()); strcpy(lps.other, QString("[404 Not Found (" + QString(path) + ")]").toLocal8Bit().data());
OnLiner = 0; isActive = 0;
return lps; return lps;
}; };
} }
@ -511,7 +511,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
strcpy(lps.login, "NULL"); strcpy(lps.login, "NULL");
strcpy(lps.pass, "NULL"); strcpy(lps.pass, "NULL");
OnLiner = 0; isActive = 0;
return lps; return lps;
}; };
}; };
@ -520,7 +520,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
closesocket(sock); closesocket(sock);
#pragma endregion #pragma endregion
OnLiner = 1; isActive = 1;
char tPass[256] = {0}; char tPass[256] = {0};
char curLogin[256] = {0}; char curLogin[256] = {0};
char curPass[256] = {0}; char curPass[256] = {0};
@ -542,7 +542,8 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
char realm[512] = {0}; char realm[512] = {0};
char opaque[512] = {0}; char opaque[512] = {0};
char qop[64] = {0}; char qop[64] = {0};
string encoded = ""; std::string encoded = "";
for(int i = 0; i < MaxLogin; i++) for(int i = 0; i < MaxLogin; i++)
{ {
if(globalScanFlag == false) break; if(globalScanFlag == false) break;
@ -679,7 +680,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
shutdown(sock, SD_BOTH); shutdown(sock, SD_BOTH);
closesocket(sock); closesocket(sock);
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
} }
@ -695,7 +696,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
shutdown(sock, SD_BOTH); shutdown(sock, SD_BOTH);
closesocket(sock); closesocket(sock);
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -752,7 +753,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
#pragma region QTGUI_Area #pragma region QTGUI_Area
stt->doEmitionRedFoundData("[-] 404 - Wrong path detected. (" + QString(ip) + ":" + QString::number(port) + QString(path) + ")"); stt->doEmitionRedFoundData("[-] 404 - Wrong path detected. (" + QString(ip) + ":" + QString::number(port) + QString(path) + ")");
#pragma endregion #pragma endregion
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
} }
@ -776,7 +777,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
strcpy(pass, ip); strcpy(pass, ip);
strcat(pass, " - Password found: "); strcat(pass, " - Password found: ");
strcat(pass, tPass); strcat(pass, tPass);
OnLiner = 0; isActive = 0;
stt->doEmition_BAGreenData("[+] " + QString(pass)); stt->doEmition_BAGreenData("[+] " + QString(pass));
strcpy(lps.login, curLogin); strcpy(lps.login, curLogin);
strcpy(lps.pass, curPass); strcpy(lps.pass, curPass);
@ -789,7 +790,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
strcpy(pass, ip); strcpy(pass, ip);
strcat(pass, " - Password found: "); strcat(pass, " - Password found: ");
strcat(pass, tPass); strcat(pass, tPass);
OnLiner = 0; isActive = 0;
char *pt1 = strstr(recvBuff, " "); char *pt1 = strstr(recvBuff, " ");
if(pt1 != NULL) if(pt1 != NULL)
{ {
@ -820,7 +821,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
}; };
}; };
#pragma endregion #pragma endregion
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -900,7 +901,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
loginFailedFlag = 0; loginFailedFlag = 0;
}; };
OnLiner = 1; isActive = 1;
if(connectionResult != SOCKET_ERROR) if(connectionResult != SOCKET_ERROR)
{ {
@ -921,7 +922,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
{ {
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
stt->doEmition_BARedData("[*] Unknown protocol (451 Error) - " + QString(ip)); stt->doEmition_BARedData("[*] Unknown protocol (451 Error) - " + QString(ip));
strcpy(lps.other, "Unknown protocol (451 Error)"); strcpy(lps.other, "Unknown protocol (451 Error)");
return lps; return lps;
@ -931,7 +932,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
{ {
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
#pragma region QTGUI_Area #pragma region QTGUI_Area
stt->doEmition_BAGreenData("[*] Anonymous access detected - " + QString(ip)); stt->doEmition_BAGreenData("[*] Anonymous access detected - " + QString(ip));
#pragma endregion #pragma endregion
@ -947,7 +948,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
#pragma region QTGUI_Area #pragma region QTGUI_Area
stt->doEmition_BARedData("[-] 550 (No connections allowed) - Ban detected. Dropping " + QString(ip)); stt->doEmition_BARedData("[-] 550 (No connections allowed) - Ban detected. Dropping " + QString(ip));
@ -962,7 +963,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
stt->doEmition_BARedData("[-] 500 (Sorry, no such command) " + QString(ip)); stt->doEmition_BARedData("[-] 500 (Sorry, no such command) " + QString(ip));
strcpy(lps.other, "[500 Sorry, no such command]"); strcpy(lps.other, "[500 Sorry, no such command]");
return lps; return lps;
@ -1061,7 +1062,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -1129,7 +1130,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
strcpy(lps.login, loginLst[i]); strcpy(lps.login, loginLst[i]);
strcpy(lps.pass, passLst[j]); strcpy(lps.pass, passLst[j]);
strcpy(lps.other, "ROUTER"); strcpy(lps.other, "ROUTER");
OnLiner = 0; isActive = 0;
return lps; return lps;
}; };
@ -1180,7 +1181,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(newSockFTP, SD_BOTH); shutdown(newSockFTP, SD_BOTH);
closesocket(newSockFTP); closesocket(newSockFTP);
closedSocket = 1; closedSocket = 1;
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
} }
@ -1219,7 +1220,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
return lps; return lps;
} }
else else
@ -1231,7 +1232,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
return lps; return lps;
}; };
}; };
@ -1264,7 +1265,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -1279,7 +1280,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
}; };
shutdown(sockFTP, SD_BOTH); shutdown(sockFTP, SD_BOTH);
closesocket(sockFTP); closesocket(sockFTP);
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -1665,7 +1666,6 @@ int Connector::_EstablishConnection(char *ip, int port, char *requesth, conSTR *
++offlines; ++offlines;
char temp[128] = {0}; char temp[128] = {0};
int err = iError; int err = iError;
GlobalWSAErr = err;
if(err == 10055) if(err == 10055)
{ {
strcpy(temp, "-Connection pool depleted- "); strcpy(temp, "-Connection pool depleted- ");
@ -1818,14 +1818,14 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
if(strstri(CSTR.lowerBuff, "501 not implemented") != NULL) if(strstri(CSTR.lowerBuff, "501 not implemented") != NULL)
{ {
stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 501 Not Implemented."); stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 501 Not Implemented.");
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
if(strstri(CSTR.lowerBuff, "404 not found") != NULL) if(strstri(CSTR.lowerBuff, "404 not found") != NULL)
{ {
stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 404 Not Found."); stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 404 Not Found.");
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -1857,7 +1857,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
{ {
ZeroMemory(request, sizeof(request)); ZeroMemory(request, sizeof(request));
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -1870,7 +1870,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
strcat(pass, wfLoginLst[i]); strcat(pass, wfLoginLst[i]);
strcat(pass, ":"); strcat(pass, ":");
strcat(pass, wfPassLst[j]); strcat(pass, wfPassLst[j]);
OnLiner = 0; isActive = 0;
#pragma region QTGUI_Area #pragma region QTGUI_Area
stt->doEmition_BAGreenData("[+] " + QString(pass)); stt->doEmition_BAGreenData("[+] " + QString(pass));
#pragma endregion #pragma endregion
@ -1883,7 +1883,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
{ {
ZeroMemory(request, sizeof(request)); ZeroMemory(request, sizeof(request));
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -1944,14 +1944,14 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
if(strstri(CSTR.lowerBuff, "501 not implemented") != NULL) if(strstri(CSTR.lowerBuff, "501 not implemented") != NULL)
{ {
stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 501 Not Implemented."); stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 501 Not Implemented.");
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
if(strstri(CSTR.lowerBuff, "404 not found") != NULL) if(strstri(CSTR.lowerBuff, "404 not found") != NULL)
{ {
stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 404 Not Found."); stt->doEmitionRedFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: 404 Not Found.");
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -1982,7 +1982,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
ZeroMemory(request, sizeof(request)); ZeroMemory(request, sizeof(request));
ZeroMemory(argData, sizeof(argData)); ZeroMemory(argData, sizeof(argData));
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -1995,7 +1995,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
strcat(pass, wfLoginLst[i]); strcat(pass, wfLoginLst[i]);
strcat(pass, ":"); strcat(pass, ":");
strcat(pass, wfPassLst[j]); strcat(pass, wfPassLst[j]);
OnLiner = 0; isActive = 0;
#pragma region QTGUI_Area #pragma region QTGUI_Area
stt->doEmition_BAGreenData("[+] " + QString(pass)); stt->doEmition_BAGreenData("[+] " + QString(pass));
#pragma endregion #pragma endregion
@ -2009,7 +2009,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
ZeroMemory(request, sizeof(request)); ZeroMemory(request, sizeof(request));
ZeroMemory(argData, sizeof(argData)); ZeroMemory(argData, sizeof(argData));
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -2029,7 +2029,7 @@ lopaStr _WFBrut(char *cookie, char *ip, int port, char *methodVal, char *actionV
ZeroMemory(request, sizeof(request)); ZeroMemory(request, sizeof(request));
ZeroMemory(argData, sizeof(argData)); ZeroMemory(argData, sizeof(argData));
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
@ -2143,7 +2143,7 @@ int _EstablishSSHConnection(char *host, int port, conSTR *CSTR, char *banner)
char login[32] = {0}; char login[32] = {0};
char pass[32] = {0}; char pass[32] = {0};
char temp[64] = {0}; char temp[64] = {0};
OnLiner = 1; isActive = 1;
SSHConInc(); SSHConInc();
int sz = 0; int sz = 0;
char *ptr1 = 0; char *ptr1 = 0;
@ -2163,19 +2163,19 @@ int _EstablishSSHConnection(char *host, int port, conSTR *CSTR, char *banner)
if(res == 0) if(res == 0)
{ {
SSHConDec(); SSHConDec();
OnLiner = 0; isActive = 0;
return 0; return 0;
} }
else if(res == -2) else if(res == -2)
{ {
SSHConDec(); SSHConDec();
OnLiner = 0; isActive = 0;
return -2; return -2;
}; };
Sleep(500); Sleep(500);
}; };
SSHConDec(); SSHConDec();
OnLiner = 0; isActive = 0;
return -1; return -1;
}; };
#pragma endregion #pragma endregion
@ -2285,7 +2285,7 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC)
char login[128] = {0}; char login[128] = {0};
char pass[128] = {0}; char pass[128] = {0};
char request[1024] = {0}; char request[1024] = {0};
OnLiner = 1; isActive = 1;
int passCounter = 1; int passCounter = 1;
std::vector<char*> negVector; std::vector<char*> negVector;
@ -2320,7 +2320,7 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC)
else else
{ {
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!"); stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
@ -2407,21 +2407,21 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC)
if(res == 1) if(res == 1)
{ {
OnLiner = 0; isActive = 0;
strcpy(lps.login, loginLst[i]); strcpy(lps.login, loginLst[i]);
strcpy(lps.pass, passLst[j]); strcpy(lps.pass, passLst[j]);
return lps; return lps;
} }
else if(res == -1) else if(res == -1)
{ {
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };
++passCounter; ++passCounter;
}; };
}; };
OnLiner = 0; isActive = 0;
strcpy(lps.login, "UNKNOWN"); strcpy(lps.login, "UNKNOWN");
return lps; return lps;
}; };

31
externData.h Normal file
View File

@ -0,0 +1,31 @@
#define RECV_MAX_SIZE 350000
#define REQUEST_MAX_SIZE 4096
#define SD_BOTH 2
#define PORTSET "80,81,88,8080,8081,60001,60002,8008,8888,554,9000,441,4111,6667,3536,22,21"
#define IRC_CHAN "iskopasi_lab03"
extern QJsonArray *jsonArr;
extern unsigned long long gTargetsOverall, Activity;
extern char top_level_domain[128];
extern volatile int BA, cons, BrutingThrds, gThreads;
extern char **loginLst, **passLst, **wfLoginLst, **wfPassLst, **sshlpLst, **GlobalNegatives;
extern bool trackerOK, __savingBackUpFile, globalScanFlag, MapWidgetOpened,
widgetIsHidden, OnlineMsgSentFlag, utfIRCFlag, HTMLDebugMode, gNegDebugMode,
gDebugMode, horLineFlag, gPingNScan;
extern int found, indexIP, gMode,
MaxPass, MaxLogin, MaxWFLogin, MaxWFPass, MaxSSHPass,
GlobalNegativeSize, isActive, gMaxBrutingThreads,
gTimeOut, PieAnomC1, PieSusp, PieBA, PieLowl, PieWF, PieSSH,
gThreadDelay, AnomC1, Filt, Overl, Lowl, Alive, saved,
Susp, WF, offlines, ssh, globalPinger, gPingTimeout, nickFlag, offlineFlag;
extern char trcSrv[256], trcScr[256], trcProxy[128], trcPersKey[32],
ircServer[32], ircPort[32], ircProxy[64], ircProxyPort[8], ircNick[32],
trcPort[32], trcSrvPortLine[32], saveStartIP[128], saveEndIP[128],
gRange[128], gFirstDom[128], gPorts[65536], endIP2[128],
gVER[16];
struct pl{
int loginCounter;
int passCounter;
};

16
externFunctions.h Normal file
View File

@ -0,0 +1,16 @@
extern std::string toLowerStr(const char *str);
extern int recvS(int lSock, char *recvBuffT, int len, int mode);
extern int sendS(int lSock, char *msg, int len, int mode);
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage);
extern void UserNickInit(SOCKET lSock);
extern void GetNicks();
extern int startScan(char* argv);
extern void BConInc();
extern void BConDec();
extern QString GetNSErrorDefinition(char *str, char *defin);
extern void _SaveBackupToFile();
extern char* __cdecl strstri(char *_Str, const char *_SubStr);
extern char* _getAttribute(char *str, char *attrib);
extern char *_findFirstOcc(char *str, char *delim);
extern int _SSHLobby(char *ip, int port, conSTR *CSTR);
extern void nCleanup();

View File

@ -1,13 +1,15 @@
#pragma once #pragma once
#include "STh.h" #include "STh.h"
#include "resource.h" #include "resource.h"
#include "externFunctions.h"
#include "externData.h"
char* __cdecl strstri(char *_Str, const char *_SubStr) char* __cdecl strstri(char *_Str, const char *_SubStr)
{ {
if(_Str != NULL) if(_Str != NULL)
{ {
string _lowStr = toLowerStr(_Str); std::string _lowStr = toLowerStr(_Str);
string _lowSubStr = toLowerStr(_SubStr); std::string _lowSubStr = toLowerStr(_SubStr);
const char *resChar = strstr(_lowStr.c_str(), _lowSubStr.c_str()); const char *resChar = strstr(_lowStr.c_str(), _lowSubStr.c_str());
int offset = resChar - _lowStr.c_str(); int offset = resChar - _lowStr.c_str();
if(offset < 0) return NULL; if(offset < 0) return NULL;
@ -986,9 +988,9 @@ void _getFormVal(char *data, char *result, char *key, char *path = NULL)
}; };
static const std::string arrUser[] = {"user", "usr", "username", "login", "lgn", "account", "acc", "param1", "param3", "id", "A1", "uname", "mail", "name"}; static const std::string arrUser[] = {"user", "usr", "username", "login", "lgn", "account", "acc", "param1", "param3", "id", "A1", "uname", "mail", "name"};
vector<std::string> vecUser (arrUser, arrUser + sizeof(arrUser) / sizeof(arrUser[0]) ); std::vector<std::string> vecUser (arrUser, arrUser + sizeof(arrUser) / sizeof(arrUser[0]) );
static const std::string arrPass[] = {"pass", "pw", "password", "code", "param2", "param4", "secret", "login_p", "A2", "admin_pw", "pws", "secretkey"}; static const std::string arrPass[] = {"pass", "pw", "password", "code", "param2", "param4", "secret", "login_p", "A2", "admin_pw", "pws", "secretkey"};
vector<std::string> vecPass (arrPass, arrPass + sizeof(arrPass) / sizeof(arrPass[0]) ); std::vector<std::string> vecPass (arrPass, arrPass + sizeof(arrPass) / sizeof(arrPass[0]) );
char *_getAttribute(char *str, char *attrib) char *_getAttribute(char *str, char *attrib)
{ {
@ -1062,7 +1064,7 @@ void _specWFBrute(char *ip, int port, char *hl, char *buff, int flag, char *path
}; };
return; return;
}; };
OnLiner = 1; isActive = 1;
char b[16] = {0}; char b[16] = {0};
char methodVal[128] = {0}; char methodVal[128] = {0};
@ -1220,7 +1222,7 @@ void _specWFBrute(char *ip, int port, char *hl, char *buff, int flag, char *path
///putInFile(flag, ip, tport, recd, title, hl, cp); ///putInFile(flag, ip, tport, recd, title, hl, cp);
}; };
}; };
OnLiner = 0; isActive = 0;
}; };
void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag, char *comment, char *tclass, char *cp, int recd, char *SPEC) void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag, char *comment, char *tclass, char *cp, int recd, char *SPEC)
{ {
@ -1244,7 +1246,7 @@ void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag,
}; };
void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int flag, char *path, char *comment, char *tclass, char *cp, int recd, char *data) void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int flag, char *path, char *comment, char *tclass, char *cp, int recd, char *data)
{ {
OnLiner = 1; isActive = 1;
lopaStr lps; lopaStr lps;
ZeroMemory(lps.login, sizeof(lps.login)); ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass)); ZeroMemory(lps.pass, sizeof(lps.pass));
@ -1515,12 +1517,11 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr); if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr);
if(flag == -1 || flag == 6 || strstr(finalstr, "[IGNR_ADDR]") != NULL) return -1; if(flag == -1 || flag == 6 || strstr(finalstr, "[IGNR_ADDR]") != NULL) return -1;
fillerFlag = 1;
#pragma region Fillers #pragma region Fillers
if(flag == 16) if(flag == 16)
{ {
Connector con; Connector con;
OnLiner = 1; isActive = 1;
char log[2048] = {0}; char log[2048] = {0};
char logEmit[2048] = {0}; char logEmit[2048] = {0};
@ -1763,7 +1764,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
char temp[64] = {0}; char temp[64] = {0};
char log[512] = {0}; char log[512] = {0};
Connector con; Connector con;
OnLiner = 1; isActive = 1;
++AnomC1; ++AnomC1;
strcpy(log, "[HFS]:<font color=\"#ff6600\">"); strcpy(log, "[HFS]:<font color=\"#ff6600\">");
@ -1806,7 +1807,6 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
putInFile(flag, ip, port, recd, finalstr, hl, cp); putInFile(flag, ip, port, recd, finalstr, hl, cp);
}; };
#pragma endregion #pragma endregion
fillerFlag = 0;
return flag; return flag;
}; };

View File

@ -1,4 +1,5 @@
#include "msgcheckerthread.h" #include "msgcheckerthread.h"
#include "externData.h"
void MSGCheckerThread::doEmitionShowNewMsg(QString str) void MSGCheckerThread::doEmitionShowNewMsg(QString str)
{ {

View File

@ -27,6 +27,8 @@
#include <qdesktopservices.h> #include <qdesktopservices.h>
#include <qmessagebox.h> #include <qmessagebox.h>
#include "progressbardrawer.h" #include "progressbardrawer.h"
#include "externFunctions.h"
#include "externData.h"
QDate date = QDate::currentDate(); QDate date = QDate::currentDate();
int ver = 100*(100*(date.year()%100) + date.month()) + date.day(); int ver = 100*(100*(date.year()%100) + date.month()) + date.day();
@ -100,7 +102,6 @@ bool connectedToIRC = false;
bool globalScanFlag; bool globalScanFlag;
float QoSStep = 1; float QoSStep = 1;
int MaxDataVal = 1; int MaxDataVal = 1;
int tMax = 0;
QGraphicsScene *sceneGrid; QGraphicsScene *sceneGrid;
QGraphicsScene *sceneGrid2; QGraphicsScene *sceneGrid2;
QGraphicsScene *sceneGraph; QGraphicsScene *sceneGraph;
@ -163,7 +164,6 @@ bool BALogSwitched = false;
bool widgetIsHidden = false; bool widgetIsHidden = false;
bool blinkFlag = false; bool blinkFlag = false;
bool printDelimiter = false; bool printDelimiter = false;
bool destroychPThFlag = false;
bool IRCLogToggled = true; bool IRCLogToggled = true;
int PhraseIndex = 0; int PhraseIndex = 0;
QList<QString> PhraseLog; QList<QString> PhraseLog;
@ -208,7 +208,6 @@ void setSceneArea()
ui->pbgv->setScene(pbScene); ui->pbgv->setScene(pbScene);
ui->jobRangeVisual->setScene(jobRangeVisualScene); ui->jobRangeVisual->setScene(jobRangeVisualScene);
ui->graphicLog->setSceneRect(0, 0, ui->graphicLog->width(), ui->graphicLog->height()); ui->graphicLog->setSceneRect(0, 0, ui->graphicLog->width(), ui->graphicLog->height());
ui->graphicLog_2->setSceneRect(0, 0, ui->graphicLog_2->width(), ui->graphicLog_2->height()); ui->graphicLog_2->setSceneRect(0, 0, ui->graphicLog_2->width(), ui->graphicLog_2->height());
ui->graphicDelim->setSceneRect(0, 0, ui->graphicDelim->width(), ui->graphicDelim->height()); ui->graphicDelim->setSceneRect(0, 0, ui->graphicDelim->width(), ui->graphicDelim->height());
@ -3344,21 +3343,20 @@ void _startMsgCheck()
_startVerCheck(); _startVerCheck();
_startMsgCheck(); _startMsgCheck();
//for(int i = 0; i < 480; ++i+=) //float step = 0;
float step = 0; //QPen iprvPenRegular(QColor(51, 51, 51, 100));
QPen iprvPenRegular(QColor(51, 51, 51, 100)); //QPen iprvPen(QColor(51, 51, 51, 100));
QPen iprvPen(QColor(51, 51, 51, 100)); //while(step < 480)
while(step < 480) //{
{ // jobRangeVisualScene->addLine(step, 0, step, 41, iprvPenRegular);
jobRangeVisualScene->addLine(step, 0, step, 41, iprvPenRegular); // step += 30;
step += 30; //};
}; //QPen iprvPenComplete(QColor(51, 51, 51, 100));
QPen iprvPenComplete(QColor(51, 51, 51, 100)); //while(step < 480)
while(step < 480) //{
{ // jobRangeVisualScene->addLine(step, 0, step, 41, iprvPen);
jobRangeVisualScene->addLine(step, 0, step, 41, iprvPen); // step += 30;
step += 30; //};
};
}; };
void nesca_3::playFcknSound() void nesca_3::playFcknSound()
{ {
@ -3511,61 +3509,10 @@ void nesca_3::STTTerminate()
globalScanFlag = false; globalScanFlag = false;
stt->terminate(); stt->terminate();
while(__savingBackUpFile) Sleep(100); while(__savingBackUpFile) Sleep(100);
if(loginLst != NULL)
{ nCleanup();
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(GlobalNegatives != NULL)
{
for(int i = 0; i < GlobalNegativeSize; i++) delete []GlobalNegatives[i];
delete []GlobalNegatives;
GlobalNegatives = 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 < importFileSize; ++i) delete []ipsstartfl[i];
delete []ipsstartfl;
ipsstartfl = NULL;
};
if(ipsendfl != NULL)
{
for(int i = 0; i < importFileSize; ++i) delete []ipsendfl[i];
delete []ipsendfl;
ipsendfl = NULL;
};
if(starterIP != NULL)
{
for(int i = 0; i < importFileSize; ++i) delete []starterIP[i];
delete []starterIP;
starterIP = NULL;
};
ui->tabMainWidget->setTabEnabled(0, true); ui->tabMainWidget->setTabEnabled(0, true);
ui->tabMainWidget->setTabEnabled(1, true); ui->tabMainWidget->setTabEnabled(1, true);
ui->tabMainWidget->setTabEnabled(2, true); ui->tabMainWidget->setTabEnabled(2, true);
@ -3576,7 +3523,6 @@ void nesca_3::STTTerminate()
BrutingThrds = 0; BrutingThrds = 0;
cons = 0; cons = 0;
setButtonStyleArea(); setButtonStyleArea();
ui->lineEditStartIPDNS->setText("");
ui->startScanButton_3->setText("Start"); ui->startScanButton_3->setText("Start");
ui->startScanButton_4->setText("Start"); ui->startScanButton_4->setText("Start");
ui->importButton->setText("Import&&Scan"); ui->importButton->setText("Import&&Scan");

View File

@ -21,15 +21,21 @@
#include <libssh\libssh.h> #include <libssh\libssh.h>
extern Ui::nesca_3Class *ui; extern Ui::nesca_3Class *ui;
extern bool widgetIsHidden; extern bool widgetIsHidden, IRCLogToggled, BALogSwitched, blinkFlag, disableBlink, debugFileOK, QOSWait,
extern bool IRCLogToggled; connectedToIRC, ME2ScanFlag, QoSScanFlag, VoiceScanFlag, PieStatFlag, proxyEnabledFlag,
extern bool BALogSwitched; smBit_8, smBit_7, smBit_6, smBit_5, smBit_4, smBit_3, smBit_2, smBit_1, printDelimiter;
extern void ShowMsgPopup(QString str); extern float QoSStep;
extern bool blinkFlag; extern int MaxDataVal;
extern bool disableBlink; extern char endIP2[128], inputStr[256];
extern bool debugFileOK; extern SOCKET lSock;
extern QVector<int> vAlivLst, vAnomLst, vWFLst, vSuspLst, vLowlLst, vBALst, vSSHLst, vOvrlLst, actLst;
extern QVector<QPointF> vect;
extern QList<int> lstOfLabels;
extern QSystemTrayIcon *tray; extern QSystemTrayIcon *tray;
extern bool QOSWait;
extern void ShowMsgPopup(QString str);
class nesca_3 : public QMainWindow class nesca_3 : public QMainWindow
{ {
Q_OBJECT Q_OBJECT
@ -144,7 +150,6 @@ protected:
private: private:
QPoint dragPosition; QPoint dragPosition;
}; };
class PieStatView : public QGraphicsView class PieStatView : public QGraphicsView
{ {
Q_OBJECT Q_OBJECT
@ -153,7 +158,6 @@ public:
public: public:
void contextMenuEvent(QContextMenuEvent *event); void contextMenuEvent(QContextMenuEvent *event);
}; };
class PopupMsgWidget : public QWidget class PopupMsgWidget : public QWidget
{ {
Q_OBJECT Q_OBJECT

View File

@ -1,33 +1,37 @@
#pragma once #pragma once
#include "STh.h" #include "STh.h"
#include "resource.h" #include "resource.h"
#include "externData.h"
#include "externFunctions.h"
typedef struct ST{
char argv[MAX_ADDR_LEN];
}sockstruct;
QJsonArray *jsonArr = new QJsonArray();
bool __savingBackUpFile = false; bool __savingBackUpFile = false;
bool horLineFlag = false; bool horLineFlag = false;
QJsonArray *jsonArr = new QJsonArray();
static int portArr[65536] = {0}; static int portArr[65536] = {0};
int gThreadDelay = 10; int gThreadDelay = 10;
int gC = 0; int gC = 0;
int gTimeOut = 3; int gTimeOut = 3;
int PieAnomC1 = 0, PieBA = 0, PieSusp = 0, PieLowl = 0, PieWF = 0, PieSSH = 0; int PieAnomC1 = 0, PieBA = 0, PieSusp = 0, PieLowl = 0, PieWF = 0, PieSSH = 0;
int AnomC1 = 0, Filt = 0, Overl = 0, Lowl = 0, Alive = 0, saved = 0, Susp = 0, WF = 0, offlines = 0, ssh = 0; int AnomC1 = 0, Filt = 0, Overl = 0, Lowl = 0, Alive = 0, saved = 0, Susp = 0, WF = 0, offlines = 0, ssh = 0;
int GlobalWSAErr = 0;
int GlobalNegativeSize = 0; int GlobalNegativeSize = 0;
int ovrlIPs = 0, ipCounter = 0; int ipCounter = 0;
int mode; int mode;
int found = 0, fillerFlag = 0, indexIP = 1; int found = 0, indexIP = 1;
int gMaxSize = 65536;
int gMode; int gMode;
int OnLiner = 0; int isActive = 0;
int MaxPass = 0, MaxLogin = 0, MaxTags = 0, MaxWFLogin = 0, MaxWFPass = 0, MaxSSHPass = 0; int MaxPass = 0, MaxLogin = 0, MaxTags = 0, MaxWFLogin = 0, MaxWFPass = 0, MaxSSHPass = 0;
int ipsstart[4], ipsend[4], int ipsstart[4], ipsend[4],
startNum, endNum, overallPorts, flCounter, octet[4]; overallPorts, flCounter, octet[4];
unsigned char **ipsstartfl = NULL, **ipsendfl = NULL, **starterIP = NULL; unsigned char **ipsstartfl = NULL, **ipsendfl = NULL, **starterIP = NULL;
unsigned int importFileSize = 0; unsigned int importFileSize = 0;
int gPingTimeout = 2000; int gPingTimeout = 2000;
double ips = 0; double ips = 0;
char top_level_domain[128] = {0}; char top_level_domain[128] = {0};
char startM[64] = {0}, endM[64] = {0};
char endIP2[128] = {0}; char endIP2[128] = {0};
char **GlobalNegatives = 0; char **GlobalNegatives = 0;
char **loginLst, **passLst; char **loginLst, **passLst;
@ -47,7 +51,6 @@ char metaETA[256] = {0};
char metaOffline[256] = {0}; char metaOffline[256] = {0};
bool ErrLogFirstTime = true; bool ErrLogFirstTime = true;
bool gPingNScan = false; bool gPingNScan = false;
volatile bool ConnLocked = false;
unsigned long long gTargets = 0, gTargetsOverall = 1, targets, Activity = 0; unsigned long long gTargets = 0, gTargetsOverall = 1, targets, Activity = 0;
volatile int gThreads; volatile int gThreads;
volatile int cons = 0; volatile int cons = 0;
@ -381,7 +384,7 @@ void *_timer()
{ {
char dbuffer[32] = {0}, timeLeft[64] = {0}, b[32] = {0}; char dbuffer[32] = {0}, timeLeft[64] = {0}, b[32] = {0};
int ticks = 0; int ticks = 0;
ovrlIPs = 0; int ovrlIPs = 0;
ips = 1; ips = 1;
Sleep(50); Sleep(50);
while(globalScanFlag) while(globalScanFlag)
@ -1226,9 +1229,8 @@ void ReadUTF8(FILE* nFile, char *cp)
}; };
} }
#ifdef WIN32 #ifdef WIN32
string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage) std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage)
{ {
string res;
int wsize = MultiByteToWideChar(srcCodePage, 0, src, -1, 0, 0); int wsize = MultiByteToWideChar(srcCodePage, 0, src, -1, 0, 0);
LPWSTR wbuf = (LPWSTR)new char[wsize * sizeof(WCHAR)]; LPWSTR wbuf = (LPWSTR)new char[wsize * sizeof(WCHAR)];
MultiByteToWideChar(srcCodePage, 0, src, -1, wbuf, wsize); MultiByteToWideChar(srcCodePage, 0, src, -1, wbuf, wsize);
@ -1236,6 +1238,8 @@ string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage)
char * buf = (char *)new char[size]; char * buf = (char *)new char[size];
WideCharToMultiByte(dstCodePage, 0, wbuf, -1, buf, size, 0, 0); WideCharToMultiByte(dstCodePage, 0, wbuf, -1, buf, size, 0, 0);
delete [] wbuf; delete [] wbuf;
std::string res;
res.append(buf); res.append(buf);
delete [] buf; delete [] buf;
return res; return res;
@ -2505,7 +2509,7 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads));
if(flCounter == 0) if(flCounter == 0)
{ {
stt->doEmitionRedFoundData("Empty IP list."); stt->doEmitionRedFoundData("Empty IP list.");
OnLiner = 0; isActive = 0;
globalScanFlag = false; globalScanFlag = false;
stt->doEmitionKillSttThread(); stt->doEmitionKillSttThread();
@ -2643,8 +2647,18 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads));
stt->doEmitionChangeStatus("Stopping..."); stt->doEmitionChangeStatus("Stopping...");
#pragma endregion #pragma endregion
while(cons > 0 || OnLiner == 1 || jsonArr->size() > 0) Sleep(2000); while(cons > 0 || isActive == 1 || jsonArr->size() > 0) Sleep(2000);
nCleanup();
#pragma region QTGUI_Area
stt->doEmitionGreenFoundData("Done. Saved: " + QString::number(saved) + "; Alive: " + QString::number(found) + ".");
stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(found));
stt->doEmitionChangeStatus("Idle");
stt->doEmitionKillSttThread();
#pragma endregion
};
void nCleanup(){
if(loginLst != NULL) if(loginLst != NULL)
{ {
for(int i = 0; i < MaxLogin; ++i) delete []loginLst[i]; for(int i = 0; i < MaxLogin; ++i) delete []loginLst[i];
@ -2703,10 +2717,4 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads));
delete []starterIP; delete []starterIP;
starterIP = NULL; starterIP = NULL;
}; };
#pragma region QTGUI_Area }
stt->doEmitionGreenFoundData("Done. Saved: " + QString::number(saved) + "; Alive: " + QString::number(found) + ".");
stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(found));
stt->doEmitionChangeStatus("Idle");
stt->doEmitionKillSttThread();
#pragma endregion
};

View File

@ -1,5 +1,7 @@
#include "oIRC_Th.h" #include "oIRC_Th.h"
#include <QtMultimedia\qsound.h> #include <QtMultimedia\qsound.h>
#include "externData.h"
#include "externFunctions.h"
int iWantToConnect = false; int iWantToConnect = false;

View File

@ -1,4 +1,5 @@
#include "piestat.h" #include "piestat.h"
#include "externData.h"
void PieStat::doEmitUpdatePie() void PieStat::doEmitUpdatePie()
{ {

View File

@ -1,4 +1,6 @@
#include "progressbardrawer.h" #include "progressbardrawer.h"
#include "externData.h"
void ProgressbarDrawer::update() void ProgressbarDrawer::update()
{ {
emit pbTh->upd(); emit pbTh->upd();

View File

@ -1,6 +1,6 @@
//#if defined(WIN32) #pragma once
#pragma once
#include "base64.h" #include "base64.h"
#if defined(Q_OS_WIN32) #if defined(Q_OS_WIN32)
#pragma once #pragma once
#include "iostream" #include "iostream"
@ -49,133 +49,8 @@ typedef int BOOL;
#define MAX_ADDR_LEN 128 #define MAX_ADDR_LEN 128
#define TITLE_MAX_SIZE 512 #define TITLE_MAX_SIZE 512
#define RECV_MAX_SIZE 350000
#define REQUEST_MAX_SIZE 4096
#define COOKIE_MAX_SIZE 1024 #define COOKIE_MAX_SIZE 1024
#define SD_BOTH 2
#define PORTSET "80,81,88,8080,8081,60001,60002,8008,8888,554,9000,441,4111,6667,3536,22,21"
#define IRC_CHAN "iskopasi_lab03"
using namespace std;
extern bool gGlobalTrackLocked;
extern SOCKET lSock;
extern char gVER[16];
extern QVector<int> vAlivLst;
extern QVector<int> vAnomLst;
extern QVector<int> vWFLst;
extern QVector<int> vSuspLst;
extern QVector<int> vLowlLst;
extern QVector<int> vBALst;
extern QVector<int> vSSHLst;
extern QVector<int> vOvrlLst;
extern QVector<QPointF> vect;
extern bool printDelimiter;
extern QJsonArray *jsonArr;
extern bool gPingNScan;
extern bool smBit_1;
extern bool smBit_2;
extern bool smBit_3;
extern bool smBit_4;
extern bool smBit_5;
extern bool smBit_6;
extern bool smBit_7;
extern bool smBit_8;
extern bool horLineFlag;
extern bool gDebugMode;
extern bool gNegDebugMode;
extern bool HTMLDebugMode;
extern bool utfIRCFlag;
extern QVector<int> actLst;
extern char inputStr[256];
extern bool proxyEnabledFlag;
extern int nickFlag;
extern int offlineFlag;
extern bool OnlineMsgSentFlag;
extern int globalPinger;
extern int gPingTimeout;
extern bool destroychPThFlag;
extern string toLowerStr(const char *str);
extern QList<int> lstOfLabels;
extern bool ME2ScanFlag, QoSScanFlag, VoiceScanFlag, PieStatFlag;
extern int AnomC1, Filt, Overl, Lowl, Alive, saved, Susp, WF, offlines, ssh;
extern int PieAnomC1, PieSusp, PieBA, PieLowl, PieWF, PieSSH;
extern int gThreadDelay;
extern bool connectedToIRC;
extern bool globalScanFlag;
extern float QoSStep;
extern int MaxDataVal;
extern int tMax;
extern bool widgetIsHidden;
extern bool MapWidgetOpened;
extern int gTimeOut;
extern char endIP2[128];
extern char metaIPDNS[256];
extern char metaRange[256];
extern char metaPercent[256];
extern char metaIPS[256];
extern char metaTargets[256];
extern char metaETA[256];
extern char metaOffline[256];
extern int GlobalWSAErr;
extern bool globalScanFlag;
extern bool trackerOK;
extern char trcPort[32];
extern char trcSrvPortLine[32];
extern char trcSrv[256];
extern char trcScr[256];
extern char trcProxy[128];
extern char trcPersKey[32];
extern char ircServer[32];
extern char ircPort[32];
extern char ircProxy[64];
extern char ircProxyPort[8];
extern char ircNick[32];
extern int stopGlobalLog;
extern int GlobalNegativeSize;
extern char* thrds, top_level_domain[128];
extern char startM[64], endM[64];
extern char **GlobalNegatives;
extern char **loginLst, **passLst, **wfLoginLst, **wfPassLst, **sshlpLst;
extern int MaxPass, MaxLogin, MaxWFLogin, MaxWFPass, MaxSSHPass;
extern double ips;
extern int ovrlIPs, ipCounter;
extern int mode;
extern unsigned long long gTargets, gTargetsOverall, targets, Activity;
extern volatile int BA;
extern volatile int cons;
extern volatile int BrutingThrds;
extern volatile int gThreads;
extern volatile int threads;
extern int found, fillerFlag, indexIP;
extern int gMaxSize;
extern char saveStartIP[128];
extern char saveEndIP[128];
extern int gMode;
extern char gRange[128];
extern char gFirstDom[128];
extern char gPorts[65536];
extern int gMaxBrutingThreads;
extern int OnLiner;
extern bool __savingBackUpFile;
extern unsigned int importFileSize;
extern int ipsstart[4], ipsend[4],
startNum, endNum, overallPorts, flCounter, octet[4];
//extern unsigned char ipsstartfl[8192][4], ipsendfl[8192][4], starterIP[8192][4];
extern unsigned char **ipsstartfl, **ipsendfl, **starterIP;
typedef struct ST{
char argv[MAX_ADDR_LEN];
}sockstruct;
struct conSTR{
char *lowerBuff;
int size;
};
struct assClSt{
const char *argv2;
};
struct PathStr{ struct PathStr{
char codepage[32]; char codepage[32];
char headr[TITLE_MAX_SIZE]; char headr[TITLE_MAX_SIZE];
@ -185,30 +60,18 @@ struct PathStr{
char ip[MAX_ADDR_LEN]; char ip[MAX_ADDR_LEN];
char cookie[COOKIE_MAX_SIZE]; char cookie[COOKIE_MAX_SIZE];
}; };
struct pl{
int loginCounter;
int passCounter;
};
struct lopaStr{ struct lopaStr{
char login[128]; char login[128];
char pass[32]; char pass[32];
char other[128]; char other[128];
}; };
extern int recvS(int lSock, char *recvBuffT, int len, int mode);
extern int sendS(int lSock, char *msg, int len, int mode); struct conSTR{
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage); char *lowerBuff;
extern void UserNickInit(SOCKET lSock); int size;
extern void GetNicks(); };
extern int startScan(char* argv);
extern volatile bool BConnLocked;
extern void BConInc();
extern void BConDec();
extern QString GetNSErrorDefinition(char *str, char *defin);
extern void _SaveBackupToFile();
extern char* __cdecl strstri(char *_Str, const char *_SubStr);
extern char* _getAttribute(char *str, char *attrib);
extern char *_findFirstOcc(char *str, char *delim);
extern int _SSHLobby(char *ip, int port, conSTR *CSTR);
class Lexems class Lexems
{ {
public: public:
@ -229,6 +92,7 @@ class Lexems
int globalSearchNeg(const char *buffcpy, char *ip, int port); int globalSearchNeg(const char *buffcpy, char *ip, int port);
}; };
class Connector class Connector
{ {
public: public:
@ -241,7 +105,7 @@ class Connector
int _EstablishConnection(char *ip, int port, char *request, conSTR *cstr, int force = 0); int _EstablishConnection(char *ip, int port, char *request, conSTR *cstr, int force = 0);
int _EstablishSSLConnection(char *ip, int port, char *request, conSTR *cstr); int _EstablishSSLConnection(char *ip, int port, char *request, conSTR *cstr);
void _StartRangeFapping(int ipsstart[], int ipsend[], int &cons, char *argv2, ST *st); //void _StartRangeFapping(int ipsstart[], int ipsend[], int &cons, char *argv2, ST *st);
void _Connect(void *s); void _Connect(void *s);
int _ConnectToPort(char *ip, const char *port, char *hl); int _ConnectToPort(char *ip, const char *port, char *hl);
}; };

View File

@ -1,4 +1,5 @@
#include "vercheckerthread.h" #include "vercheckerthread.h"
#include "externData.h"
void _checkVer() void _checkVer()
{ {