3_2266B_784

This commit is contained in:
cora32 2014-09-07 21:54:46 +03:00
commit 99da36c3f0
51 changed files with 20042 additions and 0 deletions

BIN
00000036.wav Normal file

Binary file not shown.

View File

@ -0,0 +1,37 @@
#include "ActivityDrawerTh_HorNet.h"
#include "STh.h"
void ActivityDrawerTh_HorNet::doEmitDrawActivityLine(QString data)
{
emit adtHN->sDrawActivityLine(data);
};
void ActivityDrawerTh_HorNet::doEmitDrawGrid()
{
emit adtHN->sDrawGrid();
};
void makeActLine(int val)
{
if(actLst.size() < 50) actLst.push_back(val);
else
{
actLst.pop_front();
actLst.push_back(val);
};
};
void ActivityDrawerTh_HorNet::run()
{
adtHN->doEmitDrawGrid();
int maxAct = Activity + 1;
int nm = 0;
while(true)
{
if(maxAct < Activity) maxAct = Activity;
if(maxAct > 1000) nm = maxAct-=1000;
else if(maxAct > 10) nm = maxAct-=10;
makeActLine(((float)Activity/(nm != 0 ? nm : 1)) * 10);
adtHN->doEmitDrawActivityLine(QString::number(Activity) + "b");
Activity = 0;
msleep(130);
};
};

21
ActivityDrawerTh_HorNet.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef ACTIVITYDRAWERTH_HORNET_H
#define ACTIVITYDRAWERTH_HORNET_H
#pragma once
#include "nesca_3.h"
class ActivityDrawerTh_HorNet : public QThread
{
Q_OBJECT
public: signals: void sDrawActivityLine(QString);
public: signals: void sDrawGrid();
public:
static void doEmitDrawActivityLine(QString data);
static void doEmitDrawGrid();
protected:
void run();
};
extern ActivityDrawerTh_HorNet *adtHN;
#endif // ACTIVITYDRAWERTH_HORNET_H

241
CheckKey_Th.cpp Normal file
View File

@ -0,0 +1,241 @@
#pragma once
#include "CheckKey_Th.h"
#include "CheckProxy_Th.h"
#include "STh.h"
int emitIfOK = -1;
int KeyCheckerMain()
{
int kLen = strlen(trcPersKey);
if(kLen == 0)
{
stt->doEmitionRedFoundData("[Key check] Key field is empty.");
return -1;
}
else if(kLen < 32)
{
stt->doEmitionRedFoundData("[Key check] Key length is not valid.");
return -1;
};
char msg[1024] = {0};
char ndbServer[64] = {0};
char ndbScript[64] = {0};
sockaddr_in sockAddr;
sockAddr.sin_family = AF_INET;
sockAddr.sin_port = htons(atoi(trcSrvPortLine));
strcpy(msg, "GET ");
strcat(msg, "/");
strcat(msg, trcScr);
strcat(msg, " HTTP/1.0\r\nHost: ");
strcat(msg, trcSrv);
strcat(msg, "\r\nX-Nescav3: True");
strcat(msg, "\r\nConnection: close");
strcat(msg, "\r\n\r\n");
HOSTENT *host;
#if defined(WIN32)
if(inet_addr(trcSrv) != INADDR_NONE) sockAddr.sin_addr.S_un.S_addr = inet_addr(trcSrv);
else if(host=gethostbyname (trcSrv)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#else
if(inet_addr(trcSrv) != INADDR_NONE) sockAddr.sin_addr.s_addr = inet_addr(trcSrv);
else if(host=gethostbyname (trcSrv)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#endif
SOCKET sock = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
stt->doEmitionYellowFoundData("[Key check] Requesting server ip...");
int test = connect(sock, (sockaddr*)&sockAddr, sizeof(sockAddr));
if(test == -1)
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -connect() returned. Cannot connect to balancer! " + QString::number(WSAGetLastError()) + ".");
closesocket(sock);
return -1;
#pragma endregion
};
test = send(sock, msg, strlen(msg), 0);
if(test == -1)
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -send() returned. Cannot send to balancer! " + QString::number(WSAGetLastError()) + ".");
closesocket(sock);
return -1;
#pragma endregion
};
ZeroMemory(msg, sizeof(msg));
int ror = sizeof(msg);
test = recv(sock, msg, sizeof(msg), 0);
char buff[512] = {0};
while((test = recv(sock, msg, sizeof(msg), 0)) != 0)
{
strcat(msg, buff);
};
if(test == -1)
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -recv() returned. Cannot recv from balancer! " + QString::number(WSAGetLastError()) + ".");
closesocket(sock);
return -1;
#pragma endregion
};
char *t1;
char *t2;
if(strstr(msg, "http://") != NULL)
{
t1 = strstr(msg, "http://");
if(strstr((char*)(t1 + strlen("http://")), "/") != NULL)
{
t2 = strstr((char*)(t1 + strlen("http://")), "/");
int ln = t2 - t1 - strlen("http://");
if(ln > 64)
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -Received server string is not valid!");
closesocket(sock);
return -1;
#pragma endregion
}
else strncpy(ndbServer, (char*)(t1 + strlen("http://")), ln);
if(strlen(t2) > 64)
{
#pragma region QTGUI_Area
stt->doEmitionYellowFoundData("[Key check] -Fragmentation detected!");
#pragma endregion
if(strstr(t2, "\r\n") != NULL)
{
char *t3 = strstr(t2, "\r\n");
int y = (int)(t3 - t2);
if(y > 64)
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -Received server string is not valid!");
closesocket(sock);
return -1;
#pragma endregion
}
else
{
strncpy(ndbScript, t2, y);
};
}
else
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -Received server string is not valid!");
closesocket(sock);
return -1;
#pragma endregion
};
} else strcpy(ndbScript, t2);
}
else
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -Cannot receive script value!");
closesocket(sock);
return -1;
#pragma endregion
};
ZeroMemory(msg, sizeof(msg));
#pragma region QTGUI_Area
stt->doEmitionGreenFoundData("[Key check] -OK. -Server string aquired! Checking key...");
closesocket(sock);
#pragma endregion
sockAddr.sin_family = AF_INET;
sockAddr.sin_port = htons(atoi(trcSrvPortLine));
strcpy(msg, "GET ");
strcat(msg, "/api/checkaccount?key=");
strncat(msg, trcPersKey, 32);
strcat(msg, " HTTP/1.0\r\nHost: ");
strcat(msg, ndbServer);
strcat(msg, "\r\nConnection: close");
strcat(msg, "\r\n\r\n");
#if defined(WIN32)
if(inet_addr(ndbServer) != INADDR_NONE) sockAddr.sin_addr.S_un.S_addr = inet_addr(ndbServer);
else if(host=gethostbyname (ndbServer)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#else
if(inet_addr(ndbServer) != INADDR_NONE) sockAddr.sin_addr.s_addr = inet_addr(ndbServer);
else if(host=gethostbyname (ndbServer)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#endif
sock = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
int c = connect(sock, (sockaddr*)&sockAddr, sizeof(sockAddr));
if(c == SOCKET_ERROR)
{
stt->doEmitionRedFoundData("[Key check] -Connection timeout.");
closesocket(sock);
return -1;
};
c = send(sock, msg, strlen(msg), 0);
if(c == SOCKET_ERROR)
{
stt->doEmitionRedFoundData("[Key check] -Send error.");
closesocket(sock);
return -1;
};
ZeroMemory(msg, sizeof(msg));
test = recv(sock, msg, 512, 0);
if(strstr(msg, "202 Accepted") != NULL)
{
#pragma region QTGUI_Area
stt->doEmitionGreenFoundData("[Key check] -OK. Key is valid!");
#pragma endregion
closesocket(sock);
if(emitIfOK == 0) stt->doEmitionStartScanIP();
else if(emitIfOK == 1) stt->doEmitionStartScanDNS();
else if(emitIfOK == 2) stt->doEmitionStartScanImport();
return 1;
}
else if(strstr(msg, "400 Bad Request") != NULL)
{
#pragma region QTGUI_Area
QString errorDef = GetNSErrorDefinition(msg, "notify");
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") + "]");
#pragma endregion
closesocket(sock);
return -1;
}
else
{
#pragma region QTGUI_Area
stt->doEmitionYellowFoundData("[Key check] -FAIL! An error occured. (" + QString::number(WSAGetLastError()) + ")");
if(gDebugMode) stt->doEmitionDebugFoundData(QString(msg));
#pragma endregion
closesocket(sock);
return -1;
};
ZeroMemory(msg, sizeof(msg));
closesocket(sock);
}
else
{
#pragma region QTGUI_Area
stt->doEmitionRedFoundData("[Key check] -Balancer replied with invalid string.");
if(gDebugMode) stt->doEmitionDebugFoundData(QString(msg));
closesocket(sock);
return -1;
#pragma endregion
};
};
void CheckKey_Th::run()
{
KeyCheckerMain();
};

17
CheckKey_Th.h Normal file
View File

@ -0,0 +1,17 @@
#ifndef CHECKKEY_TH_H
#define CHECKKEY_TH_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
extern int emitIfOK;
class CheckKey_Th : public QThread
{
Q_OBJECT
protected:
void run();
};
extern CheckKey_Th *chKTh;
#endif // CHECKKEY_TH_H

155
CheckProxy_Th.cpp Normal file
View File

@ -0,0 +1,155 @@
#include "CheckProxy_Th.h"
void CheckProxy_Th::doEmitChangeRedIRCData(QString str)
{
emit chPTh->changeRedIRCData(str);
};
void CheckProxy_Th::doEmitChangeGreenIRCData(QString str)
{
emit chPTh->changeGreenIRCData(str);
};
void CheckProxy_Th::doEmitChangeYellowIRCData(QString str)
{
emit chPTh->changeYellowIRCData(str);
};
void CheckProxy_Th::doEmitChangeRawIRCDataInc(QString str)
{
emit chPTh->changeRawIRCDataInc(str);
};
void CheckProxy_Th::doEmitChangeRawIRCDataOut(QString str)
{
emit chPTh->changeRawIRCDataOut(str);
};
void CheckProxyLogic()
{
destroychPThFlag = false;
QString str1 = ui->ircProxyPort->text();
QString str2 = ui->ircProxy->text();
strcpy(ircProxy, str2.toUtf8().data());
strcpy(ircProxyPort, str1.toUtf8().data());
int err, yes = 1;
SOCKET pSock;
char precvBuff[2048] = {0};
sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_port = htons(atoi(ircProxyPort));
HOSTENT *host;
#if defined(WIN32)
if(inet_addr(ircProxy) != INADDR_NONE) addr.sin_addr.S_un.S_addr = inet_addr(ircProxy);
else if(host = gethostbyname (ircProxy)) ((unsigned long*) &addr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#else
if(inet_addr(ircProxy) != INADDR_NONE) addr.sin_addr.s_addr = inet_addr(ircProxy);
else if(host=gethostbyname (ircProxy)) ((unsigned long*) &addr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#endif
pSock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
setsockopt(pSock, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(int));
if(pSock == INVALID_SOCKET)
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRedIRCData("CheckProxy: -INVALID SOCKET.");
#pragma endregion
}
else
{
if(connect(pSock, (sockaddr*)&addr, sizeof(addr)) != SOCKET_ERROR)
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRawIRCDataOut(QString::fromLocal8Bit("CONNECT 2ip.ru HTTP/1.1\r\n\r\n"));
#pragma endregion
send(pSock, "CONNECT 2ip.ru HTTP/1.1\r\n\r\n", strlen("CONNECT 2ip.ru HTTP/1.1\r\n\r\n"), 0);
while(recv(pSock, precvBuff, sizeof(precvBuff), 0) > 0)
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRawIRCDataInc(QString::fromLocal8Bit(precvBuff));
#pragma endregion
if( (strstr(precvBuff, "HTTP/1.1 200 OK") || strstr(precvBuff, "200 OK")
|| strstr(precvBuff, "OK 200") || strstr(precvBuff, "200 Connection")
)
&& (strlen(precvBuff) < 150)
&& strstr(precvBuff, "404 File Not Found") == NULL
&&
(
strstr(precvBuff, "Invalid Request") == NULL
|| strstr(precvBuff, "Invalid request") == NULL || strstr(precvBuff, "invalid request") == NULL
|| strstr(precvBuff, "400 Bad Request") == NULL || strstr(precvBuff, " 400 bad request") == NULL
)
)
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRawIRCDataOut(QString::fromLocal8Bit("GET / HTTP/1.1\r\nHost: 2ip.ru\r\n\r\n"));
#pragma endregion
send(pSock, "GET / HTTP/1.1\r\nHost: 2ip.ru\r\n\r\n", strlen("GET / HTTP/1.1\r\nHost: 2ip.ru\r\n\r\n"), 0);
ZeroMemory(precvBuff, sizeof(precvBuff));
while(recv(pSock, precvBuff, sizeof(precvBuff), 0) > 0)
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRawIRCDataInc(QString::fromLocal8Bit(precvBuff));
#pragma endregion
if(strstr(precvBuff, "404 File Not Found") == NULL && strstr(precvBuff, "Invalid Request") == NULL
&& strstr(precvBuff, "Invalid request") == NULL && strstr(precvBuff, "invalid request") == NULL
&& strstr(precvBuff, "400 Bad Request") == NULL && strstr(precvBuff, "400 bad request") == NULL
&& strstr(precvBuff, "404 Not") == NULL && strstr(precvBuff, "404 not") == NULL
&& strstr(precvBuff, "500 Internal") == NULL && strstr(precvBuff, "500 internal") == NULL
&& strstr(precvBuff, "401 Unauthorized") == NULL && strstr(precvBuff, "401 unauthorized") == NULL
&& strstr(precvBuff, "InvalidUrl") == NULL && strstr(precvBuff, "invalidurl") == NULL
&& strstr(precvBuff, "Invalid Url") == NULL && strstr(precvBuff, "invalid url") == NULL
&& strstr(precvBuff, "Gateway Timeout") == NULL && strstr(precvBuff, "Gateway timeout") == NULL
&& strstr(precvBuff, "gateway timeout") == NULL
)
{
#pragma region QTGUI_Area
chPTh->doEmitChangeGreenIRCData("[OK] Success! Now using " + QString(ircProxy) + ":" + QString(ircProxyPort) + ".");
#pragma endregion
proxyEnabledFlag = 1;
closesocket(pSock);
break;
}
else
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRedIRCData("[Fail] " + QString(ircProxy) + ":" + QString(ircProxyPort) + " - is not CONNECT proxy? Try another one.");
#pragma endregion
proxyEnabledFlag = 0;
closesocket(pSock);
break;
};
};
break;
}
else
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRedIRCData("[Fail] " + QString(ircProxy) + ":" + QString(ircProxyPort) + " - is not CONNECT proxy? Try another one.");
#pragma endregion
proxyEnabledFlag = 0;
closesocket(pSock);
break;
};
};
}
else
{
#pragma region QTGUI_Area
chPTh->doEmitChangeRedIRCData("[Fail] Cannot connect to " + QString(ircProxy) + ":" + QString(ircProxyPort) + ".");
#pragma endregion
proxyEnabledFlag = 0;
};
};
};
void CheckProxy_Th::run()
{
CheckProxyLogic();
};

28
CheckProxy_Th.h Normal file
View File

@ -0,0 +1,28 @@
#ifndef CHECKPROXY_TH_H
#define CHECKPROXY_TH_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class CheckProxy_Th : public QThread
{
Q_OBJECT
public: signals: void changeRedIRCData(QString);
public: signals: void changeGreenIRCData(QString);
public: signals: void changeYellowIRCData(QString);
public: signals: void changeRawIRCDataInc(QString);
public: signals: void changeRawIRCDataOut(QString);
public:
void doEmitChangeRedIRCData(QString str);
void doEmitChangeGreenIRCData(QString str);
void doEmitChangeYellowIRCData(QString str);
void doEmitChangeRawIRCDataOut(QString str);
void doEmitChangeRawIRCDataInc(QString str);
protected:
void run();
};
extern CheckProxy_Th *chPTh;
#endif // CHECKPROXY_TH_H

View File

@ -0,0 +1,23 @@
#include "DrawerTh_GridQoSScanner.h"
#include "STh.h"
void DrawerTh_GridQoSScanner::doEmitAddLine()
{
emit dtGridQoS->sAddLine();
};
void DrawerTh_GridQoSScanner::run()
{
while(QoSScanFlag)
{
if(stt->isRunning() == true)
{
if(widgetIsHidden == false && tray->isVisible() == false)
{
++QoSStep;
emit dtGridQoS->doEmitAddLine();
};
};
msleep(2000);
};
};

23
DrawerTh_GridQoSScanner.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef DRAWERTH_GRIDQOSSCANNER_H
#define DRAWERTH_GRIDQOSSCANNER_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class DrawerTh_GridQoSScanner : public QThread
{
Q_OBJECT
public:
public: signals: void sAddLine();
public:
void doEmitAddLine();
protected:
void run();
};
extern DrawerTh_GridQoSScanner *dtGridQoS;
#endif // DRAWERTH_GRIDQOSSCANNER_H

42
DrawerTh_HorNet.cpp Normal file
View File

@ -0,0 +1,42 @@
#include "DrawerTh_HorNet.h"
void DrawerTh_HorNet::run()
{
qsrand (QDateTime::currentMSecsSinceEpoch());
int factor = 0;
int gWidth = ui->graphicLog->width();
int gHeight = ui->graphicLog->height();
dtHN->doEmitionAddDelimLines();
while(ME2ScanFlag)
{
if(widgetIsHidden == false && tray->isVisible() == false)
{
++factor > 9 ? factor = 0 : NULL;
dtHN->doEmitionDrawGrid();
for(int i = 0; i < gHeight; i += 10)
{
QApplication::processEvents();
dtHN->doEmitionAddLine(0, i + factor, gWidth, i + factor);
QApplication::processEvents();
};
};
msleep(200);
};
};
void DrawerTh_HorNet::doEmitionDrawGrid()
{
emit dtHN->sDrawGrid();
};
void DrawerTh_HorNet::doEmitionAddLine(int x1, int y1, int x2, int y2)
{
emit dtHN->sAddLine(x1, y1, x2, y2);
};
void DrawerTh_HorNet::doEmitionAddDelimLines()
{
emit dtHN->sAddDelimLines();
};

26
DrawerTh_HorNet.h Normal file
View File

@ -0,0 +1,26 @@
#ifndef DRAWERTH_HORNET_H
#define DRAWERTH_HORNET_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class DrawerTh_HorNet : public QThread
{
Q_OBJECT
public:
static void doEmitionDrawGrid();
static void doEmitionAddLine(int x1, int y1, int x2, int y2);
static void doEmitionAddDelimLines();
public: signals: void sAddDelimLines();
public: signals: void sAddLine(int, int, int, int);
public: signals: void sDrawGrid();
protected:
void run();
};
extern DrawerTh_HorNet *dtHN;
#endif // DRAWERTH_HORNET_H

148
DrawerTh_ME2Scanner.cpp Normal file
View File

@ -0,0 +1,148 @@
#include "DrawerTh_ME2Scanner.h"
#include "STh.h"
void DrawerTh_ME2Scanner::doEmitDrawTextPlacers()
{
emit dtME2->sDrawTextPlacers();
};
void DrawerTh_ME2Scanner::doEmitionAddPolyLine()
{
emit dtME2->sAddPolyLine();
};
void MakePolygonLine(int gWidth)
{
vect.clear();
int x = 0;
int tx = 0;
int xtx = 0;
QPointF qp(0, 20);
vect.append(qp);
int fact1 = 0,
fact2 = 0,
fact3 = 0,
fact4 = 0,
fact5 = 0,
fact6 = 0,
fact7 = 0;
bool state = stt->isRunning();
for(int i = 1; i < 130; ++i)
{
x = qrand() % 4 + 2 + i;
xtx = x + tx;
if(xtx > 1 && xtx < 31)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - AnomC1*2 - fact1 : 20);
if(AnomC1 > 0)
{
if(xtx < 16 ) fact1+=2;
else fact1-=2;
};
}
if(xtx > 34 && xtx < 72)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - WF*2 - fact2 : 20);
if(WF > 0)
{
if(xtx < 52 ) fact2+=2;
else fact2-=2;
};
}
if(xtx > 74 && xtx < 112)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - BA*2 - fact3 : 20);
if(BA > 0)
{
if(xtx < 92 ) fact3+=2;
else fact3-=2;
};
}
if(xtx > 114 && xtx < 152)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Susp*2 - fact4 : 20);
if(Susp > 0)
{
if(xtx < 132 ) fact4+=2;
else fact4-=2;
};
}
if(xtx > 154 && xtx < 192)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Overl*2 - fact5 : 20);
if(Overl > 0)
{
if(xtx < 172 ) fact5+=2;
else fact5-=2;
};
}
if(xtx > 194 && xtx < 232)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Lowl*2 - fact6 : 20);
if(Lowl > 0)
{
if(xtx < 212 ) fact6+=2;
else fact6-=2;
};
}
if(xtx > 234 && xtx < 269)
{
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Alive*2 - fact7 : 20);
if(Alive > 0)
{
if(xtx < 252 ) fact7+=2;
else fact7-=2;
};
};
vect.append(qp);
tx = x;
};
AnomC1 = 0;
WF = 0;
BA = 0;
Filt = 0;
Overl = 0;
Lowl = 0;
Alive = 0;
Susp = 0;
vect.append(QPointF(gWidth, 20));
};
void DrawerTh_ME2Scanner::run()
{
int gWidth = ui->graphicLog->width();
dtME2->doEmitDrawTextPlacers();
while(ME2ScanFlag)
{
if(widgetIsHidden == false && tray->isVisible() == false)
{
MakePolygonLine(gWidth);
dtME2->doEmitionAddPolyLine();
}
else
{
msleep(1000);
AnomC1 = 0;
WF = 0;
BA = 0;
Filt = 0;
Overl = 0;
Lowl = 0;
Alive = 0;
Susp = 0;
};
msleep(150);
};
};

23
DrawerTh_ME2Scanner.h Normal file
View File

@ -0,0 +1,23 @@
#ifndef DRAWERTH_ME2SCANNER_H
#define DRAWERTH_ME2SCANNER_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class DrawerTh_ME2Scanner : public QThread
{
Q_OBJECT
public:
static void doEmitionAddPolyLine();
static void doEmitDrawTextPlacers();
public: signals: void sAddPolyLine();
public: signals: void sDrawTextPlacers();
protected:
void run();
};
extern DrawerTh_ME2Scanner *dtME2;
#endif // DRAWERTH_ME2SCANNER_H

61
DrawerTh_QoSScanner.cpp Normal file
View File

@ -0,0 +1,61 @@
#pragma once
#include "DrawerTh_QoSScanner.h"
#include "STh.h"
void DrawerTh_QoSScanner::run()
{
while(QoSScanFlag)
{
tMax = 0;
if(stt->isRunning() == true && widgetIsHidden == false && tray->isVisible() == false && QOSWait == false)
{
lstOfLabels.clear();
lstOfLabels.append(Alive);
lstOfLabels.append(AnomC1);
lstOfLabels.append(WF);
lstOfLabels.append(Susp);
lstOfLabels.append(Lowl);
lstOfLabels.append((int)BA);
lstOfLabels.append(Overl);
lstOfLabels.append(ssh);
QList<int> lstOfLabelsCopy = lstOfLabels;
qSort(lstOfLabelsCopy.begin(), lstOfLabelsCopy.end(), qGreater<float>());
int curVal = lstOfLabelsCopy[0];
if(curVal > MaxDataVal) MaxDataVal = curVal;
if(curVal > tMax) tMax = curVal;
dtQoS->doEmitionAddLine();
}
else
{
msleep(500);
AnomC1 = 0;
WF = 0;
BA = 0;
Filt = 0;
Overl = 0;
Lowl = 0;
Alive = 0;
Susp = 0;
ssh = 0;
};
AnomC1 = 0;
WF = 0;
BA = 0;
Filt = 0;
Overl = 0;
Lowl = 0;
Alive = 0;
Susp = 0;
ssh = 0;
msleep(2000);
};
};
void DrawerTh_QoSScanner::doEmitionAddLine()
{
emit dtQoS->sAddLine();
};

22
DrawerTh_QoSScanner.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef DRAWERTH_QOSSCANNER_H
#define DRAWERTH_QOSSCANNER_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class DrawerTh_QoSScanner : public QThread
{
Q_OBJECT
public:
static void doEmitionAddLine();
public: signals: void sAddLine();
protected:
void run();
};
extern DrawerTh_QoSScanner *dtQoS;
#endif // DRAWERTH_QOSSCANNER_H

134
DrawerTh_VoiceScanner.cpp Normal file
View File

@ -0,0 +1,134 @@
#include "DrawerTh_VoiceScanner.h"
void DrawerTh_VoiceScanner::doEmitAddLine()
{
emit vsTh->sAddLine();
};
void DrawerTh_VoiceScanner::doEmitDrawGrid(int factor)
{
emit vsTh->sDrawGrid(factor);
};
void DrawerTh_VoiceScanner::doEmitDrawTextPlacers()
{
emit vsTh->sDrawTextPlacers();
};
void makeVoiceLine(int Al, int An, int Bd, int Sp, int Lo, int var, int Ovl, int WF, int SSH)
{
if(vAlivLst.size() < 140)
{
if(Al > 0) vAlivLst.push_back((Al + 1)*10);
}
else
{
vAlivLst.pop_front();
if(Al > 0) vAlivLst.push_back((Al + 1)*10);
};
if(vAnomLst.size() < 140)
{
if(An > 0) vAnomLst.push_back((An + 1)*10);
}
else
{
vAnomLst.pop_front();
if(An > 0) vAnomLst.push_back((An + 1)*10);
};
if(vWFLst.size() < 140)
{
if(Bd > 0) vWFLst.push_back((Bd + 1)*10);
}
else
{
vWFLst.pop_front();
if(Bd > 0) vWFLst.push_back((Bd + 1)*10);
};
if(vSuspLst.size() < 140)
{
if(Sp > 0) vSuspLst.push_back((Sp + 1)*10);
}
else
{
vSuspLst.pop_front();
if(Sp > 0) vSuspLst.push_back((Sp + 1)*10);
};
if(vLowlLst.size() < 140)
{
if(Lo > 0) vLowlLst.push_back((Lo + 1)*10);
}
else
{
vLowlLst.pop_front();
if(Lo > 0) vLowlLst.push_back((Lo + 1)*10);
};
if(vLowlLst.size() < 140)
{
if(var > 0) vBALst.push_back((var + 1)*10);
}
else
{
vBALst.pop_front();
if(var > 0) vBALst.push_back((var + 1)*10);
};
if(vOvrlLst.size() < 140)
{
if(Ovl > 0) vOvrlLst.push_back((Ovl + 1)*10);
}
else
{
vOvrlLst.pop_front();
if(Ovl > 0) vOvrlLst.push_back((Ovl + 1)*10);
};
if(vSSHLst.size() < 140)
{
if(SSH > 0) vSSHLst.push_back((SSH + 1)*10);
}
else
{
vSSHLst.pop_front();
if(SSH > 0) vSSHLst.push_back((SSH + 1)*10);
};
};
void DrawerTh_VoiceScanner::run()
{
vsTh->doEmitDrawGrid(150);
vsTh->doEmitDrawTextPlacers();
while(VoiceScanFlag)
{
if(widgetIsHidden == false && tray->isVisible() == false)
{
makeVoiceLine(Alive, AnomC1, WF, Susp, Lowl, BA, Overl, WF, ssh);
Alive = 0;
AnomC1 = 0;
WF = 0;
Filt = 0;
Lowl = 0;
BA = 0;
Overl = 0;
Susp = 0;
ssh = 0;
vsTh->doEmitAddLine();
msleep(150);
}
else
{
msleep(500);
Alive = 0;
AnomC1 = 0;
WF = 0;
Filt = 0;
Lowl = 0;
BA = 0;
Overl = 0;
Susp = 0;
ssh = 0;
};
};
};

24
DrawerTh_VoiceScanner.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef DRAWERTH_VOICESCANNER_H
#define DRAWERTH_VOICESCANNER_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class DrawerTh_VoiceScanner : public QThread
{
Q_OBJECT
public:
public: signals: void sAddLine();
public: signals: void sDrawGrid(int factor);
public: signals: void sDrawTextPlacers();
public:
void doEmitAddLine();
void doEmitDrawGrid(int factor);
void doEmitDrawTextPlacers();
protected:
void run();
};
extern DrawerTh_VoiceScanner *vsTh;
#endif // DRAWERTH_VOICESCANNER_H

BIN
Eurostile.ttf Normal file

Binary file not shown.

30
IRCPinger_Th.cpp Normal file
View File

@ -0,0 +1,30 @@
#pragma once
#include "IRCPinger_Th.h"
void IRCPinger_Th::doEmitChangeRedIRCData(QString str)
{
emit ircPTh->changeRedIRCData(str);
};
void IRCPinger_Th::doEmitRestartIRC()
{
emit ircPTh->RestartIRC();
};
void IRCPinger_Th::run()
{
while(iWantToConnect)
{
if(globalPinger >= 360) //6min timeout
{
#pragma region QTGUI_Area
ircPTh->doEmitChangeRedIRCData("-//- Ping timeout. Reconnecting... ");
#pragma endregion
ircPTh->doEmitRestartIRC();
globalPinger = 0;
msleep(10000);
};
++globalPinger;
msleep(1000);
};
};

24
IRCPinger_Th.h Normal file
View File

@ -0,0 +1,24 @@
#ifndef IRCPINGER_TH_H
#define IRCPINGER_TH_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
extern int iWantToConnect;
class IRCPinger_Th : public QThread
{
Q_OBJECT
public:
static void doEmitChangeRedIRCData(QString str);
static void doEmitRestartIRC();
public: signals: void changeRedIRCData(QString);
public: signals: void RestartIRC();
protected:
void run();
};
extern IRCPinger_Th *ircPTh;
#endif // IRCPINGER_TH_H

102
STh.cpp Normal file
View File

@ -0,0 +1,102 @@
#include "STh.h"
void STh::doEmitionShowRedVersion()
{
emit stt->showRedVersion();
};
void STh::doEmitionStartScanIP()
{
emit stt->startScanIP();
};
void STh::doEmitionStartScanDNS()
{
emit stt->startScanDNS();
};
void STh::doEmitionStartScanImport()
{
emit stt->startScanImport();
};
void STh::doEmitionAddIncData(QString(ip), QString str)
{
emit stt->sIncData(ip, str);
};
void STh::doEmitionAddOutData(QString ip, QString str)
{
emit stt->sOutData(ip, str);
};
void STh::doEmitionIPRANGE(QString str)
{
emit stt->changeIpRange(str);
}
void STh::doEmitionThreads(QString str)
{
emit stt->changeThreads(str);
}
void STh::doEmitionIPS(QString str)
{
emit stt->changeIPS(str);
}
void STh::doEmitionFoundData(QString str)
{
emit stt->changeFoundData(str);
}
void STh::doEmitionBAData(QString str)
{
emit stt->changeBAData(str);
}
void STh::doEmition_BARedData(QString str)
{
emit stt->changeRedBAData(str);
};
void STh::doEmition_BAGreenData(QString str)
{
emit stt->changeGreenBAData(str);
}
void STh::doEmitionRedFoundData(QString str)
{
emit stt->changeRedFoundData(str);
}
void STh::doEmitionGreenFoundData(QString str)
{
emit stt->changeGreenFoundData(str);
}
void STh::doEmitionYellowFoundData(QString str)
{
emit stt->changeYellowFoundData(str);
}
void STh::doEmitionDebugFoundData(QString str)
{
emit stt->changeDebugFoundData(str);
}
void STh::doEmitionChangeStatus(QString str)
{
emit stt->changeStatus(str);
}
void STh::doEmitionTargetsLeft(QString str)
{
emit stt->changeTargetsLeft(str);
}
void STh::doEmitionKillSttThread()
{
emit stt->killSttThread();
};
void STh::doEmitionChangeParsed(QString str)
{
emit stt->changeParsedValue(str);
};
void STh::doEmitionChangeBA(QString str)
{
emit stt->changeBAValue(str);
};
void STh::doEmitionOffline(QString str)
{
emit stt->changeOffline(str);
};
void STh::doEmitionDataSaved(bool status)
{
emit stt->signalDataSaved(status);
};
void STh::run()
{
startScan(inputStr);
}

70
STh.h Normal file
View File

@ -0,0 +1,70 @@
#ifndef STH_H
#define STH_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class STh : public QThread
{
Q_OBJECT
public:
public:
static void doEmitionDataSaved(bool status);
static void doEmitionStartScanIP();
static void doEmitionStartScanDNS();
static void doEmitionStartScanImport();
static void doEmitionAddIncData(QString ip, QString str);
static void doEmitionAddOutData(QString ip, QString str);
static void doEmition_BAGreenData(QString str);
static void doEmition_BARedData(QString str);
static void doEmitionIPRANGE(QString str);
static void doEmitionThreads(QString str);
static void doEmitionIPS(QString str);
static void doEmitionFoundData(QString str);
static void doEmitionRedFoundData(QString str);
static void doEmitionGreenFoundData(QString);
static void doEmitionYellowFoundData(QString);
static void doEmitionChangeStatus(QString);
static void doEmitionTargetsLeft(QString);
static void doEmitionKillSttThread();
static void doEmitionChangeParsed(QString);
static void doEmitionChangeBA(QString);
static void doEmitionOffline(QString);
static void doEmitionBAData(QString str);
static void doEmitionDebugFoundData(QString);
static void doEmitionShowRedVersion();
signals:
public: signals: void showRedVersion();
public: signals: void startScanIP();
public: signals: void startScanDNS();
public: signals: void startScanImport();
public: signals: void signalDataSaved(bool);
public: signals: void changeGreenBAData(QString);
public: signals: void changeRedBAData(QString);
public: signals: void changeBAData(QString);
public: signals: void changeOffline(QString);
public: signals: void changeBAValue(QString);
public: signals: void changeParsedValue(QString);
public: signals: void changeIpRange(QString);
public: signals: void changeThreads(QString);
public: signals: void changeIPS(QString);
public: signals: void changeFoundData(QString);
public: signals: void changeRedFoundData(QString);
public: signals: void changeGreenFoundData(QString);
public: signals: void changeYellowFoundData(QString);
public: signals: void changeDebugFoundData(QString);
public: signals: void changeStatus(QString);
public: signals: void changeTargetsLeft(QString);
public: signals: void killSttThread();
public: signals: void sIncData(QString, QString);
public: signals: void sOutData(QString, QString);
protected:
void run();
};
extern STh *stt;
#endif // STH_H

96
base64.cpp Normal file
View File

@ -0,0 +1,96 @@
#include "base64.h"
#include <iostream>
static const std::string base64_chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz"
"0123456789+/";
static inline bool is_base64(unsigned char c) {
return (isalnum(c) || (c == '+') || (c == '/'));
}
std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_len) {
std::string ret;
int i = 0;
int j = 0;
unsigned char char_array_3[3];
unsigned char char_array_4[4];
while (in_len--) {
char_array_3[i++] = *(bytes_to_encode++);
if (i == 3) {
char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
char_array_4[3] = char_array_3[2] & 0x3f;
for(i = 0; (i <4) ; i++)
ret += base64_chars[char_array_4[i]];
i = 0;
}
}
if (i)
{
for(j = i; j < 3; j++)
char_array_3[j] = '\0';
char_array_4[0] = (char_array_3[0] & 0xfc) >> 2;
char_array_4[1] = ((char_array_3[0] & 0x03) << 4) + ((char_array_3[1] & 0xf0) >> 4);
char_array_4[2] = ((char_array_3[1] & 0x0f) << 2) + ((char_array_3[2] & 0xc0) >> 6);
char_array_4[3] = char_array_3[2] & 0x3f;
for (j = 0; (j < i + 1); j++)
ret += base64_chars[char_array_4[j]];
while((i++ < 3))
ret += '=';
}
return ret;
}
std::string base64_decode(std::string const& encoded_string) {
int in_len = encoded_string.size();
int i = 0;
int j = 0;
int in_ = 0;
unsigned char char_array_4[4], char_array_3[3];
std::string ret;
while (in_len-- && ( encoded_string[in_] != '=') && is_base64(encoded_string[in_])) {
char_array_4[i++] = encoded_string[in_]; in_++;
if (i ==4) {
for (i = 0; i <4; i++)
char_array_4[i] = base64_chars.find(char_array_4[i]);
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
for (i = 0; (i < 3); i++)
ret += char_array_3[i];
i = 0;
}
}
if (i) {
for (j = i; j <4; j++)
char_array_4[j] = 0;
for (j = 0; j <4; j++)
char_array_4[j] = base64_chars.find(char_array_4[j]);
char_array_3[0] = (char_array_4[0] << 2) + ((char_array_4[1] & 0x30) >> 4);
char_array_3[1] = ((char_array_4[1] & 0xf) << 4) + ((char_array_4[2] & 0x3c) >> 2);
char_array_3[2] = ((char_array_4[2] & 0x3) << 6) + char_array_4[3];
for (j = 0; (j < i - 1); j++) ret += char_array_3[j];
}
return ret;
}

4
base64.h Normal file
View File

@ -0,0 +1,4 @@
#include <string>
std::string base64_encode(unsigned char const* , unsigned int len);
std::string base64_decode(std::string const& s);

2680
connector.cpp Normal file

File diff suppressed because it is too large Load Diff

2829
finder.cpp Normal file

File diff suppressed because it is too large Load Diff

16
irc_nmblinker.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "irc_nmblinker.h"
#include "nesca_3.h"
void IRC_NMBlinker::doEmitBlinkMessage()
{
emit irc_nmb->sBlinkMessage();
};
void IRC_NMBlinker::run()
{
while(widgetIsHidden == false && disableBlink == false && tray->isVisible() == false)
{
irc_nmb->doEmitBlinkMessage();
msleep(500);
};
};

20
irc_nmblinker.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef IRC_NMBLINKER_H
#define IRC_NMBLINKER_H
#include "nesca_3.h"
class IRC_NMBlinker : public QThread
{
Q_OBJECT
public:
static void doEmitBlinkMessage();
public: signals: void sBlinkMessage();
protected:
void run();
};
extern IRC_NMBlinker *irc_nmb;
#endif // IRC_NMBLINKER_H

27
login.txt Normal file
View File

@ -0,0 +1,27 @@
admin
root
123123
123456
12345
cisco
super
meinsm
monitor
test
ftp
1234
administrator
qwerty
recovery
Polycom
system
naadmin
telecom
dreambox
master
Admin
Root
guest
backup

45
main.cpp Normal file
View File

@ -0,0 +1,45 @@
#include "nesca_3.h"
#include <QApplication>
#if defined(Q_OS_WIN32)
#include <windows.h>
#include <qfontdatabase.h>
#endif
//--Fixing _ITERATOR_DEBUG_LEVEL 0!=2
#if defined(Q_OS_WIN32)
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance, LPSTR lpcmdline, int ncmdshow)
{
QApplication a(ncmdshow, (char **)lpcmdline);
#else
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
#endif
#if defined(Q_OS_WIN32)
QStringList list;
list << "Eurostile.ttf";
int fontID(-1);
bool fontWarningShown(false);
for (QStringList::const_iterator constIterator = list.constBegin(); constIterator != list.constEnd(); ++constIterator) {
QFile res(":/nesca_3/" + *constIterator);
if (res.open(QIODevice::ReadOnly) == false) {
if (fontWarningShown == false) {
fontWarningShown = true;
}
} else {
fontID = QFontDatabase::addApplicationFontFromData(res.readAll());
if (fontID == -1 && fontWarningShown == false) {
fontWarningShown = true;
}
}
}
#endif
nesca_3 *gui = new nesca_3();
gui->showNormal();
return a.exec();
}

43
msgcheckerthread.cpp Normal file
View File

@ -0,0 +1,43 @@
#include "msgcheckerthread.h"
void MSGCheckerThread::doEmitionShowNewMsg(QString str)
{
emit mct->showNewMsg(str);
};
void _getNewMsg()
{
Connector con;
conSTR CSTR;
CSTR.lowerBuff = NULL;
CSTR.size = 0;
char request[256] = {0};
strcpy(request, "GET /mailbox?key=");
strncat(request, trcPersKey, 32);
strcat(request, " HTTP/1.1\r\nHost: nesca.d3w.org\r\nX-Nescav3: True\r\n\r\n");
con._EstablishConnection("nesca.d3w.org", 80, request, &CSTR, 1);
char *ptr1 = NULL;
if(CSTR.lowerBuff != NULL)
{
if(strstr(CSTR.lowerBuff, "\r\n\r\n") != NULL && strstr(CSTR.lowerBuff, "HTTP/1.1 404 Not Found") == NULL && strstr(CSTR.lowerBuff, "HTTP/1.1 502 Bad Gateway") == NULL && strstr(CSTR.lowerBuff, "HTTP/1.1 400 Bad Request") == NULL && strstr(CSTR.lowerBuff, "\r\n\r\nEmpty") == NULL)
{
ptr1 = strstr(CSTR.lowerBuff, "\r\n\r\n");
if(strlen(ptr1 + 4) != 0)
{
mct->doEmitionShowNewMsg(QString(ptr1 + 4));
};
};
delete []CSTR.lowerBuff;
CSTR.lowerBuff = NULL;
};
};
void MSGCheckerThread::run()
{
for(;;)
{
Sleep(60000);
_getNewMsg();
};
};

20
msgcheckerthread.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef MSGCHECKERTHREAD_H
#define MSGCHECKERTHREAD_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class MSGCheckerThread : public QThread
{
Q_OBJECT
public:
static void doEmitionShowNewMsg(QString str);
public: signals: void showNewMsg(QString);
protected:
void run();
};
extern MSGCheckerThread *mct;
#endif // MSGCHECKERTHREAD_H

838
negatives.txt Normal file
View File

@ -0,0 +1,838 @@
yadro.ru
liveinternet
#[Dlink]
session_login.php?reload=1
atwiki
no connections allowed
pocket-solution
trustclick
#[/Dlink]
530 User access denied
prelogin
service temporarily unavailable
service is temporary unavailable
service unavailable
403 - forbidden
403 access denied
is still available
php framework
BlueBean
403 forbidden
504 gateway timeout
500 internal server error
500 - internal server error
502 bad gateway
505 http version
501 not implemented
bad request - invalid hostname
http error 400.
bad request (invalid hostname)
include_path=
function.require
failed to open stream
"./cgi-bin/start.cgi?UID=-1&TEMP="
408 request time-out
421 service not available
500 OOPS
Comming Soon
is sample html
google_ad_client
/js/thickbox.js
google_ad_slot
plone
openmail
institute
google-analytics.com
googlesyndication
temporarily offline
temporarily unavailable
MELOOK
&gt;log in
.js_check.html
/about-our-site.html
/auth.
/acquittal.html
/building.html
/cart/view
/catalog/search.php
/cgi-bin/welcome.cgi
/citrix/
/citrixaccess
/contact
/welcome/
application/x-shockwave-flash
/contactus
/contact-us
/customer
/client
/esi.cgi?page=status-index.xml
/guarantee
/html/index.asp
/iisstart.asp
/images/final-hp
/install.php
/kontakty
/manga/index.cgi
/manual/
/order
/privacy
/news
/portal-login
/product.php
/rpauth.html
/servlet/wap/login
shop
/buy
/sell
/company
/brand
/signin
/simple.html
/soap/
/support/
/terms
/ui/
/user/index.php
/weblogin.htm
/xampp/
/zimbra
:5000/
?hipname=
@bk.ru
@gmail.com
@inbox.ru
@list.ru
@mail.ru
@rambler.ru
@yandex.ru
+home_42+
+i1+
+vt_docsystem+
16 ch
a test web page
clinic
museum
It's works
Adobe GoLive
<body></body>
Remote Link2
about/
aboutus
about-us
about us
acceso denegado
acceso sistema
access the sharecenter
actiontec_bottom
adsense
afrekenen
agent web client
ahcom tecnologia
alfresco
app service
apache_pb.gif
airties
aktualizacji
amicaweb
Alan Adı Al
Alan Adı Sat
and supervision tool
annex b
apache http server test
apache software foundation
apache tomcat
apache ha sido instalado
application manager
apteka
arteco ivs spa
at&t
at-img634
autenticacao de acesso
auto_detect_lang.asp
aviso legal
backgroundimagecache
bad request
baidu
beratung
berneck
btnLive
business invest
best domain names
bitrix
bluedragon
blog
blog/about/
blog/comments/
bubba|2
buffalo inc
buy or sell
buy ticket
cable modem
cafe
call us
calorie
cannot be displayed
cannot find
ccnwebsrvcontroller
church
canopy
casino
cautivo
check_hj.html
check_user_agent
checking javascript support
checking language
checkpoint.com
cheditor
chiliproject
check availability
citrix/xenapp
cliente
clientes
cloud
cmside.htm
company.
comcast business
coming soon
commercial property
configuration manager
configuration file does not
confixx
construcci
consulta
contact info
contact our webmaster
contact support
contact to us
contact us
contact webmaster
contact.
contact_us.
contactanos
contactar
contact-info
contacto
contacts.
contact-us
contactus.
contate
come back later
contato
contatt
control de inventarios
control de solicitudes
controles de acceso
cookiechecker
currently unavailable
cooking
coltd
co.ltd
co.,ltd
#QNAP shit
could be ipv6 addr
cp-gateway
create an account
create new account
credit
currently measuring
currently unreachable
cs3 dreamweaver
FrontPage
TESTPAGE
BB-HGW
OS X Lion
Homepage Builder
dashboard.css
dating
dbox
de iis
design house
de subsidios
de turismo
default page
default parallels plesk panel
default plesk page
default web
defaultwebpage
desserts
default-site
development company
development work
device configuration
default index file
dgc hotspot
dishes
docsis
docsis_system.asp
dominio
domain error
domain has been blocked
domain has been registered
domain name registration
domain registered
domainapps.com
domains for sale
domeny
domeingeregistreerd
down for maint
draytek corp
dreambox webcontrol
drug shop
drupal
Dreamweaver MX
due to maintance
dsnextgen.com
dsparking.com
DATA LAN DISK
TEST SITE
dxclient
eap web interface
echolife
ediciones tierrazul
elipgo
emta settings
en construction
enigin plc
enigma web interface
entertainment
equipe ahcom
erro ao resolver
The requested URL
error.asp
empty page
errors.umi-cms.ru
e-trayz
evaluaciones
exchange/
ezwatch pro
education
fax
fax.
fax:
fax :
fashion
Fireworks MX
fast35xx
facebook
football
for sale
forex
forgot password
free delivery
free to play
freepbx
free-shipping
fritz!box
functioning normally
future home of
gaiyou
glassfish server
globesurfer
gmbh
industrial
help.html
market
guarantee
h.264
h264
hc.ru
hectrix ltd
hipname
hipoteka
hitron technologies
holding page
holding_page
home gateway
home.
hosting
hostline.ru
help desk
hotspot login
htmlanvview:
icecast2
ids_web_login
ie-plugin
iis7
iis8
images/spacer.jpg
images/ub15.gif
in construction
index.cgi?active
index.php?action=login
info experts
information services 8
ingrese usuario
inicio
initservicecookie
initwebclient
inloggen
insurance
intelligent digital security system
into the public_html directory
invalid url
iomega
iis windows
customer
is functioning normally
is under construction
ispmanager control panel
it works
ibm websphere
is now configured
is currently undergoing
jbossweb
join us
joinmember
juniper
jste heslo
kerio connect
keyhole peeks
kablosuz
kloxo control panel
kontakt
kredyt
lacie nas
latest tweets
legal policies
log_off_page.htm
login page
login para acesso
logistics
lvrweb
epanel
commerc
official website
WebFig
in manutenzione
Domain is not authorized
in costruzione
mail_manager
magnesium
management console
mbanking
olaHola
Wireless N ADSL
Account Suspended
Session limit reached
Access Error: Access Denied
Aethra
meble
microsoft exchange
mijn account
mobile phone was detected
mobile web viewer
mobile_viewer_login
mobile login
Mobile Parking
modem (administrator
m&w
munin
my account
my cart
my homepage
myauth
navatom
navigate to public landing page
netdvrv
netsafe utm
netsurveillance
nettalk
netvideo
newocx
nicht aufgeschaltet
no web site
no site on this
nothing to see
nothing here
not authorized to view
nuuo network video recorder
nuuo web
ntt docomo
nvr
no longer available
o nas
obs-helper/menu.jsp
official site
olvido su password
oncell warning
one time payment
one web server
online dating
online pills
online shop
online store
oracle application server
our partners
outlook web
oma domain
on varattu
opening soon
openwebmail
page=contact
page=about
pagerrorimg
pagos
parkerad
Parking.
paradox ip module
parallels confixx
parallels operations automation default
parent.location=
parking.php
partners
paypal
pharmacy
phone system
phpmyadmin
pills
place holder
placeholder
plakaty
platinbox
please login
plesk
poker
polycom '+model
por internet
portada
portal de
postinfo.html
pre-sale
price
prikol
privacy policies
virtual private server
pro-agro apm
produc
produtos
symfony-project
professions
File not found
sonicwall
promo
product_id
presentation page
qnap turbo nas
Qloud Server
read more
redirect server
redmine
reserviert
reg.demos.ru
register now
registrato
register your domain
registrarse
reklam
related searches
relatives
relaxcms.com
remote access controller
remote monitoring system
remote video surveillance
reserved domain
residential gateway login
restaurant
redevelopment
rpauth.html
rpsys.html
ruby on rails
ru-center
rss buddy
roundcube
s.r.l.
sakura internet
sabnzbd
sale only
samsung digital
sapphire journal
sbuilder.ru
scam_2nd.sis
search...
search.html
searchnut.com
searchpage.aspx
searchremagnified
secure login page
securepaynet
sedoparking.com
selectkind.html
seller
server application error
server default page
service client
servicio
shared ip
shop.
shop online
shop_id=
shopcart
shopping cart
sign in now
silverlight
sistema fenix
sistemas
site offline
site_manager
site just created
sitemap
site or Page Not Found
site is not
site_map
saitmap
stay tuned
sitio no encontrado
software is running
skidki
skip intro
small business
smart switch login
smartermail
snom
sign up
sonicwall - authentication
spa configuration
speed test
speedtouch
sport
skype:
src/login.php
ssl-vpn/login.esp
standalone dvr
statcounter
status.stm
strona w przygotowaniu
subsonic
sugarcrm
sun java system
workplace
workspace
Under Constraction
Mobile NAS Router
sunny webbox
supporto
strona w konstrukcji
surgeblog
Apache Error
suspended domain
suspendedpage
switch administrator
sww link
synology
taobao
TopPageFinder.com
teamportal
teamviewer
technical support
teles.igate
tellion
tell
tell.
TEL(
fax(
no server available
tell:
tell :
tel/
fax/
tel
tel.
tel :
tel:
tel?
tel ?
fax?
fax ?
termos de uso
TP-LINK Wireless
RT-N
RT-G
dir320
Access denied for user
underconstr
test page
This IP has been banned
the best place
the best search
the leading
the page is not
the web server is running
this object has moved
this website is not configured
thomson gateway
to log in
tomza
touchstone status
townet 108-30-su
tralix
transfervolumen
trixbox
try again later
tutorial
twitter
Tlf.
Web Client Pro
mailto:
WJND300
Home Page
temporar in mentenanta
under maintanence
under-construction
under construct
under development
under konstruktion
under maintenance
unimep station controller
unsub pag
upnp devices
url could not be retrieved
unohditko salasanan
value domain
verizon
verwaltungskonsole
viagra
visualsvn
voice-over-ip
voip gateway
voip web
velkommen
vood
visit us
varaa itsellesi
w@de
wade
web applications
web client for edvs
web console
web device manager
web frontend
web hosting
web remote access
web remote client
web server setup guide
web site creator
webage unavailable
website does not exist
web-based configurator
webcamx
webclient.js
webconfig
webcontrol
webguard login
webrom
website is currently
webui administration
webview
webmail
welcome to
welcome.do
web development
wimax
window.location = "/ui"
windows home server
windows server
windows small business server
winkelwagen
wordpress
wowza
www.microsoft.com
www.ibm.com
www.lacie.com
www.sedo.com
xenserver
xfinity
xtreamer
yahoo
you are not logged in
your explorer is no support frame
your website
yweb
wkrotce
азартные игры
аккорды
анекдот
аптек
архив новостей
в стадии разработки
в разработке
права защищены
дача
даче
дешевы
дешёвы
домен продается
домены на продажу
доставка
заказать доставку
заработок в сети
знакомства
истек срок регистрации
карикатуры
код регистрации
конкурс
контакты
кухни
главная страница
личный кабинет
лотере
международн
мода
мы предоставляем
на реконструкции
найти работу
находится в разработке
наш баннер
наша компания
низкие цены
новый адрес
о компании
о нас
остев
партнерк
перевод текстов
перееха
персональный сайт
пиши мне
пиши нам
пишите мне
пишите нам
подержанные
подписаться
поиск работы
приколы
продукция
производство
процесі розробки
работа в интернете
регистрации доменных имен
рекламные ссылки
ремонт
сайт в разработке
сайт недоступен
сайт клана
скоро запустится
сайт на разработке
связь с нами
скидк
скоро открытие
служба поддержки
создание недорогих сайтов
создание сайтов
спонсоры
стартовая страни
стихи
тестовая страница
технические работы
услуги
флешки
флэшки
футбол
юмор
новости
на реконструкции
обновление сайта
офис
юридич
страница не найдена
купить
прода

3990
nesca_3.cpp Normal file

File diff suppressed because it is too large Load Diff

203
nesca_3.h Normal file
View File

@ -0,0 +1,203 @@
#ifndef nesca_3_H
#define nesca_3_H
#pragma once
#include <QMainWindow>
#include <qapplication.h>
#include <qgraphicsitem.h>
#include <QGraphicsView>
#include <QGraphicsScene>
#include <QGraphicsItem>
#include "ui_nesca_3.h"
#include <QSystemTrayIcon.h>
#include <QtGui\qevent.h>
#include <qthread.h>
#include <qdatetime.h>
#include <qjsonobject.h>
#include <qjsonvalue.h>
#include <qjsonarray.h>
#include <qtextcodec.h>
#include <qjsondocument.h>
#include <libssh\libssh.h>
extern Ui::nesca_3Class *ui;
extern bool widgetIsHidden;
extern bool IRCLogToggled;
extern bool BALogSwitched;
extern void ShowMsgPopup(QString str);
extern bool blinkFlag;
extern bool disableBlink;
extern bool debugFileOK;
extern QSystemTrayIcon *tray;
extern bool QOSWait;
class nesca_3 : public QMainWindow
{
Q_OBJECT
public:
nesca_3(QWidget *parent = 0);
~nesca_3();
void ConnectEvrthng();
void ChangeLabelIpRange_Value(QString str);
void ChangeLabelIPS_Value(QString str);
void newListItem(QString str);
static int perc;
private:
protected:
bool eventFilter(QObject* obj, QEvent *event);
void run();
QString GetSSLContent(QString str);
void SSLConnect(QString str);
protected slots:
void MaxBrutingThr_ChangeValue(QString str);
void ThreadDelay_ChangeValue(QString val);
void ChangePingerOK(bool val);
void changeNSTrackLabel(bool status);
void slotPBUpdate();
void DNSLine_ValueChanged(QString str);
void slotChangeCPModeToUTF();
void slotChangeCPModeTo1251();
void slotShowRedVersion();
void ChangeDebugFileState(bool val);
void ChangeTopic();
void slotIRCGetTopic(QString str);
void slotIRCOfflined();
void slotUnhidePopup(QString str, QString senderNick);
void slotItemClicked(QListWidgetItem* wi);
void slotClearNickList();
void slotAppendIRCNick(QString str);
void slotShowNicks();
void slotBlinkMessage();
void IPScanSeq();
void DNSScanSeq();
void ImportScanSeq();
void smReaction();
void slotShowDataflow();
void slotOutData(QString ip, QString str);
void slotIncData(QString ip, QString str);
void slotShowServerMsg(QString str);
void slotSaveImage(QAction *qwe);
void slotUpdatePie();
void slotClearLogs();
void slotRestartIRC();
void slotDrawVoiceGrid(int factor);
void slotDrawTextPlacers();
void onLinkClicked(QUrl link);
void CheckPersKey();
void CheckPersKey(int val);
void slotRestoreDefPorts();
void ChangeNick();
void setNickBox(QString str);
void SaySmthng();
void ChangeIRCRawLog();
void ConnectToIRCServer();
void CheckProxy();
void ChangeDispalyMode();
void switchDataFields();
void importAndScan();
void slotQoSAddGrid();
void slotVoiceAddLine();
void slotDrawDelimLines();
void slotDrawActivityLine(QString data);
void slotDrawActivityGrid();
void activateME2ScanScene();
void activateQoSScanBut();
void activateVoiceScanBut();
void activatePieStatBut();
void slotAddPolyLine();
void slotQoSAddLine();
void slotAddLine(int x1, int y1, int x2, int y2);
void slotDrawGrid();
void exitButtonClicked();
void trayButtonClicked();
void mouseMoveEvent(QMouseEvent * event);
void mousePressEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void logoLabelClicked();
void startScanButtonClicked();
void startScanButtonClickedDNS();
void saveOptions();
void ChangeTrackerOK(bool val);
void ChangeLabelThreads_ValueChanged(QString);
void PingTO_ChangeValue(QString);
void ChangeLabelTO_ValueChanged(QString);
void appendErrText(QString str);
void appendOKText(QString str);
void appendDebugText(QString str);
void appendNotifyText(QString str);
void appendDefaultText(QString str);
void appendRedIRCText(QString str);
void appendGreenIRCText(QString str);
void appendYellowIRCText(QString str);
void appendDefaultIRCText(bool, bool, int, QString str, QString s);
void appendDefaultIRCTextOut(QString str);
void appendDefaultIRCRawTextInc(QString str);
void appendDefaultIRCRawTextOut(QString str);
void appendGreenBAData(QString str);
void appendRedBAData(QString str);
void STTTerminate();
void playFcknSound();
private:
QPoint dragPosition;
};
class PieStatView : public QGraphicsView
{
Q_OBJECT
public:
PieStatView(QWidget *parent = 0) : QGraphicsView(parent) {};
public:
void contextMenuEvent(QContextMenuEvent *event);
};
class PopupMsgWidget : public QWidget
{
Q_OBJECT
public:
PopupMsgWidget(QWidget* parent = 0) : QWidget(parent)
{ };
public: signals: void clicked(bool checked = false);
protected:
bool switchWindows;
void mousePressEvent(QMouseEvent *evt)
{
switchWindows = false;
if (evt->button() == Qt::LeftButton)
{
switchWindows = true;
oldPos = evt->globalPos();
evt->accept();
}
else if (evt->button() == Qt::RightButton)
{
disableBlink = true;
ui->newMessageLabel->setStyleSheet("color:rgba(255, 0, 0, 0);background-color: rgba(2, 2, 2, 0);");
this->hide();
};
}
void mouseMoveEvent(QMouseEvent *evt)
{
switchWindows = false;
const QPoint delta = evt->globalPos() - oldPos;
move(x()+delta.x(), y()+delta.y());
oldPos = evt->globalPos();
}
void mouseReleaseEvent(QMouseEvent *evt)
{
if(switchWindows)
{
switchWindows = false;
emit ui->IRCModeBut->clicked();
};
}
private:
QPoint oldPos;
};
#endif // nesca_3_H

6
nesca_3.qrc Normal file
View File

@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/nesca_3">
<file>Eurostile.ttf</file>
<file>Z:/nesca.ico</file>
</qresource>
</RCC>

3948
nesca_3.ui Normal file

File diff suppressed because it is too large Load Diff

2686
nesca_startModule.cpp Normal file

File diff suppressed because it is too large Load Diff

819
oIRC_Th.cpp Normal file
View File

@ -0,0 +1,819 @@
#include "oIRC_Th.h"
#include <QtMultimedia\qsound.h>
int iWantToConnect = false;
#define MAX_IRC_RECV_LEN 2048
//#define IRC_CHAN "iskopasi_lab01"
void oIRC_Th::doEmitionPlayDckingSound()
{
emit ircTh->notifyPlay();
};
void oIRC_Th::doEmitUnhidePopup(QString str1, QString str2)
{
emit ircTh->sUnhidePopup(str1, str2);
};
void oIRC_Th::doEmitChangeIRCData(bool pm, bool hlflag, int code, QString str, QString s)
{
emit ircTh->changeIRCData(pm, hlflag, code, str, s);
};
void oIRC_Th::doEmitChangeRedIRCData(QString str)
{
emit ircTh->changeRedIRCData(str);
};
void oIRC_Th::doEmitChangeGreenIRCData(QString str)
{
emit ircTh->changeGreenIRCData(str);
};
void oIRC_Th::doEmitChangeYellowIRCData(QString str)
{
emit ircTh->changeYellowIRCData(str);
};
void oIRC_Th::doEmitChangeRawIRCDataInc(QString str)
{
emit ircTh->changeRawIRCDataInc(str);
};
void oIRC_Th::doEmitChangeRawIRCDataOut(QString str)
{
emit ircTh->changeRawIRCDataOut(str);
};
void oIRC_Th::doEmitSetNick(QString str)
{
emit ircTh->setNick(str);
};
void oIRC_Th::doEmitAddNick(QString str)
{
emit ircTh->AddNick(str);
};
void oIRC_Th::doEmitClearNickList()
{
emit ircTh->ClearNickList();
};
void oIRC_Th::doEmitIRCOfflined()
{
emit ircTh->IRCOfflined();
};
void oIRC_Th::doEmitGetTopic(QString str)
{
emit ircTh->getTopic(str);
};
QString GetNickColor(char *sn)
{
QString str(sn);
QString hexNick = str.toLocal8Bit().toHex();
int origLen = str.size();
int hln = hexNick.length();
while(hln < 7)
{
hexNick += "0";
hln = hexNick.length();
};
QString nickColorStr = hexNick.mid(0, 6);
QString nickBGColorStr = hexNick.mid(hexNick.size() - 6, hexNick.size());
int nickColor = nickColorStr.toUInt(NULL, 16);
int nickBGColor = nickBGColorStr.toUInt(NULL, 16);
int dim = QString::number(nickColor).length();
int factor = pow((float)10, dim);
nickColor += (7*origLen + nickColor*6 + 123456 - hln*hln*hln*hln + (int)(str[0].toLatin1())*123);
nickColorStr.setNum(nickColor, 16);
nickColorStr = nickColorStr.mid(nickColorStr.size() - 6, nickColorStr.size());
int R = nickColorStr.mid(0, 2).toUInt(NULL, 16);
int G = nickColorStr.mid(2, 2).toUInt(NULL, 16);
int B = nickColorStr.mid(4, 2).toUInt(NULL, 16);
if(R < 100 && G < 100 && B < 100) nickBGColorStr = "#fd7e31";
else nickBGColorStr = "#000000";
return nickColorStr + "; background-color: " + nickBGColorStr + ";";
};
bool doHL(char *rawData)
{
if(strstr(rawData, ircNick) != NULL) return true;
else return false;
};
void _blinkNLine(QString tempData = "", QString senderNick = "")
{
if(widgetIsHidden == false && tray->isVisible() == false)
{
disableBlink = false;
if(irc_nmb->isRunning() == false) irc_nmb->start();
ircTh->doEmitUnhidePopup(tempData, senderNick);
#pragma region QTGUI_Area
if(printDelimiter) ircTh->doEmitChangeIRCData(false, false, 0, "------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------", "");
printDelimiter = false;
#pragma endregion
};
};
int sendS(int lSock, char *msg, int len, int mode)
{
int b;
b = send(lSock, msg, len, mode);
if(b == -1) ircTh->doEmitChangeRedIRCData("[IRC: RecvS error - (" + QString::number(WSAGetLastError()) + ")]");
else
{
Activity += len;
#pragma region QTGUI_Area
ircTh->doEmitChangeRawIRCDataOut(QString::fromLocal8Bit(msg));
#pragma endregion
};
return b;
};
int recvS(int lSock, char *recvBuffT, int len, int mode)
{
int b;
char recvBuff[MAX_IRC_RECV_LEN] = {0};
b = recv(lSock, recvBuff, sizeof(recvBuff), 0);
if(b == -1) ircTh->doEmitChangeRedIRCData("[IRC: RecvS error - (" + QString::number(WSAGetLastError()) + ")]");
else
{
Activity += len;
strcpy(recvBuffT, recvBuff);
#pragma region QTGUI_Area
ircTh->doEmitChangeRawIRCDataInc(QString::fromLocal8Bit(recvBuff));
#pragma endregion
ZeroMemory(recvBuff, sizeof(recvBuff));
};
return b;
};
void UserNickInit(SOCKET sock)
{
strcpy(ircNick, ui->ircNickBox->text().toLocal8Bit().data());
char tempBuffUser[1024] = {0};
strcpy(tempBuffUser, "USER ");
strcat(tempBuffUser, ircNick);
strcat(tempBuffUser, " \"netstalker01\" * : ");
strcat(tempBuffUser, ircNick);
strcat(tempBuffUser, "\r\n");
char tempBuffNick[1024] = {0};
strcpy(tempBuffNick, "NICK ");
strcat(tempBuffNick, ircNick);
strcat(tempBuffNick, "\r\n");
sendS(lSock, tempBuffUser, strlen(tempBuffUser), 0);
sendS(lSock, tempBuffNick, strlen(tempBuffNick), 0);
memset(tempBuffUser, '0', sizeof(tempBuffUser));
memset(tempBuffNick, '0', sizeof(tempBuffNick));
};
void GetNicks()
{
char chanTemp[64] = {0};
strcpy(chanTemp, "NAMES #");
strcat(chanTemp, IRC_CHAN);
strcat(chanTemp, "\r\n");
sendS(lSock, chanTemp, strlen(chanTemp), 0);
};
char *GetServerName(char *buff)
{
char *temp1 = NULL;
int sz = 0;
char name[128] = {0};
if(strstr(buff, " ") != NULL)
{
temp1 = strstr(buff, " ");
sz = temp1 - buff - 1;
strncpy(name, buff + 1, (sz < 128 ? sz : 128));
};
return name;
};
int jFlag1 = 0;
void __pinger(char *recvBuff)
{
if(strstr(recvBuff, "PING") != NULL)
{
char tmpa[128] = {0};
if(strstr(recvBuff, "PING :") != NULL)
{
if(strstr(strstr(recvBuff, "PING :") + strlen("PING :"), "\r\n") != NULL)
{
strcpy(tmpa, "PONG ");
strncat(tmpa, strstr(recvBuff, "PING :") + strlen("PING "), strlen(strstr(recvBuff, "PING :") + strlen("PING ")) - strlen(strstr(strstr(recvBuff, "PING :") + strlen("PING :"), "\r\n")));
strcat(tmpa, "\r\n");
sendS(lSock, tmpa, strlen(tmpa), 0);
}
else
{
strcpy(tmpa, "PONG ");
strncat(tmpa, strstr(recvBuff, ":"), 16);
strcat(tmpa, "\r\n");
sendS(lSock, tmpa, strlen(tmpa), 0);
};
if(ircPTh->isRunning() == false) ircPTh->start();
};
if(!jFlag1) //Channel-entering sequence
{
Sleep(500);
char chanTemp[32] = {0};
strcpy(chanTemp, "JOIN #");
strcat(chanTemp, IRC_CHAN);
strcat(chanTemp, "\r\n");
sendS(lSock, chanTemp, strlen(chanTemp), 0);
jFlag1 = 1;
};
globalPinger = 0;
memset(tmpa, '\0', sizeof(tmpa));
}
if(strstr(recvBuff, "PONG") != NULL)
{
char tmpa[128] = {0};
if(!jFlag1) //Channel-entering sequence
{
Sleep(500);
char chanTemp[32] = {0};
strcpy(chanTemp, "JOIN #");
strcat(chanTemp, IRC_CHAN);
strcat(chanTemp, "\r\n");
sendS(lSock, chanTemp, strlen(chanTemp), 0);
jFlag1 = 1;
};
globalPinger = 0;
memset(tmpa, '\0', sizeof(tmpa));
}
else if(strstr(recvBuff, "G :") != NULL)
{
char tmpa[128] = {0};
if(strstr(recvBuff, "G :") != NULL)
{
if(strstr(strstr(recvBuff, "G :") + strlen("G :"), "\r\n") != NULL)
{
strcpy(tmpa, "PONG ");
strncat(tmpa, strstr(recvBuff, "G :") + strlen("G :"), strlen(strstr(recvBuff, "G :") + strlen("G :")) - strlen(strstr(strstr(recvBuff, "G :") + strlen("G :"), "\r\n")));
strcat(tmpa, "\r\n");
sendS(lSock, tmpa, strlen(tmpa), 0);
}
else
{
strcpy(tmpa, "PONG ");
strncat(tmpa, strstr(recvBuff, ":"), 16);
strcat(tmpa, "\r\n");
sendS(lSock, tmpa, strlen(tmpa), 0);
};
};
if(!jFlag1) //Channel-entering sequence
{
Sleep(500);
char chanTemp[32] = {0};
strcpy(chanTemp, "JOIN #");
strcat(chanTemp, IRC_CHAN);
strcat(chanTemp, "\r\n");
sendS(lSock, chanTemp, strlen(chanTemp), 0);
jFlag1 = 1;
};
globalPinger = 0;
if(ircPTh->isRunning() == false) ircPTh->start();
memset(tmpa, '\0', sizeof(tmpa));
};
};
void IRCLoop()
{
nickFlag = 0;
offlineFlag = 0;
#pragma region QTGUI_Area
ircTh->doEmitChangeYellowIRCData("Connecting to IRC server " + QString(ircServer) + ":" + QString(ircPort) + "...");
#pragma endregion
int err, yes = 1;
jFlag1 = 0;
sockaddr_in addr;
addr.sin_family = AF_INET;
HOSTENT *host;
if(proxyEnabledFlag)
{
addr.sin_port = htons(atoi(ircProxyPort));
#if defined(WIN32)
if(inet_addr(ircProxy) != INADDR_NONE) addr.sin_addr.S_un.S_addr = inet_addr(ircProxy);
else if(host = gethostbyname (ircProxy)) ((unsigned long*) &addr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#else
if(inet_addr(ircProxy) != INADDR_NONE) addr.sin_addr.s_addr = inet_addr(ircProxy);
else if(host=gethostbyname (ircProxy)) ((unsigned long*) &addr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#endif
}
else
{
addr.sin_port = htons(atoi(ircPort));
#if defined(WIN32)
if(inet_addr(ircServer) != INADDR_NONE) addr.sin_addr.S_un.S_addr = inet_addr(ircServer);
else if(host = gethostbyname (ircServer)) ((unsigned long*) &addr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#else
if(inet_addr(ircServer) != INADDR_NONE) addr.sin_addr.s_addr = inet_addr(ircServer);
else if(host=gethostbyname (ircServer)) ((unsigned long*) &addr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0];
#endif
};
for(int conCounter = 1; conCounter <= 100; ++conCounter)
{
char topicData[256] = {0};
if(iWantToConnect == false) break;
OnlineMsgSentFlag = false;
lSock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
setsockopt(lSock, SOL_SOCKET, SO_REUSEADDR, (char*)&yes, sizeof(int));
if(proxyEnabledFlag) ircTh->doEmitChangeYellowIRCData("Connecting to proxy " + QString(ircProxy) + "...");
if(connect(lSock, (sockaddr*)&addr, sizeof(addr)) != SOCKET_ERROR)
{
if(proxyEnabledFlag) ircTh->doEmitChangeYellowIRCData("Connection to proxy " + QString(ircProxy) + " established.");
globalPinger = 0;
char temprecvBuff[512] = {0};
char tempSendMsg[512] = {0};
if(proxyEnabledFlag)
{
strcpy(tempSendMsg, "CONNECT ");
strcat(tempSendMsg, ircServer);
strcat(tempSendMsg, ":");
strcat(tempSendMsg, ircPort);
strcat(tempSendMsg, " HTTP/1.1\r\n\r\n");
sendS(lSock, tempSendMsg, strlen(tempSendMsg), 0);
recvS(lSock, temprecvBuff, sizeof(temprecvBuff), 0);
if(strstr(temprecvBuff, "HTTP/1.1 200 OK") || strstr(temprecvBuff, "200 OK")
|| strstr(temprecvBuff, "OK 200") || strstr(temprecvBuff, "200 Connection") )
{
ircTh->doEmitChangeYellowIRCData("Proxy accepted connection. Waiting for IRC reply...");
sendS(lSock, "\r\n", strlen("\r\n"), 0);
}
else
{
ircTh->doEmitChangeRedIRCData("[IRC: Bad proxy reply.]");
break;
};
}
else
{
sendS(lSock, "\r\n", strlen("\r\n"), 0);
};
UserNickInit(lSock);
char recvBuffG[MAX_IRC_RECV_LEN] = {0};
char serverRealName[256] = {0};
bool nameLocked = false;
while(recvS(lSock, recvBuffG, MAX_IRC_RECV_LEN, 0) > 0 && iWantToConnect)
{
if(strlen(recvBuffG) > 0)
{
char *recvBuff = recvBuffG;
#pragma region Pinger
__pinger(recvBuff);
#pragma endregion
char comStr[512] = {0};
char delimBf[512] = {0};
strcpy(delimBf, ":");
strcat(delimBf, serverRealName);
char *Gtemp = recvBuff;
while(strstr(Gtemp + 1, "\n") != NULL)
{
char *temp1 = NULL;
if(strstr(Gtemp + 1, "\n") != NULL) temp1 = strstr(Gtemp + 1, "\n");
else temp1 = Gtemp + strlen(Gtemp);
int csz = temp1 - Gtemp - 1;
strncpy(comStr, Gtemp, csz);
Gtemp = strstr(Gtemp + 1, "\n");
char privTemp[64] = {0};
strcpy(privTemp, "PRIVMSG #");
strcat(privTemp, IRC_CHAN);
strcat(privTemp, " :");
if(strstr(comStr, " PRIVMSG ") == NULL)
{
char topicTemp[64] = {0};
strcpy(topicTemp, "TOPIC #");
strcat(topicTemp, IRC_CHAN);
strcat(topicTemp, " :");
if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, "while we process your") != NULL || strstr(comStr, "Looking up your hostname") != NULL)
)
{
#pragma region QTGUI_Area
ircTh->doEmitChangeGreenIRCData("[OK] Connected to irc server: " + ui->ircServerBox->text()+ ":" + ui->serverPortBox->text() + ".");
#pragma endregion
if(nameLocked == false)
{
nameLocked = true;
strncpy(serverRealName, GetServerName(recvBuff), 128);
};
Sleep(500);
UserNickInit(lSock);
Sleep(500);
char chanTemp[32] = {0};
strcpy(chanTemp, "JOIN #");
strcat(chanTemp, IRC_CHAN);
strcat(chanTemp, "\r\n");
sendS(lSock, chanTemp, strlen(chanTemp), 0);
}
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, "ERROR :Closing Link:") != NULL || strstr(comStr, "ERROR :") != NULL) )
{
if(strstr(comStr, "Registration timed out") != NULL)
{
#pragma region QTGUI_Area
ircTh->doEmitChangeRedIRCData("-//- [!] Connection failure. (Registration timed out)");
ircTh->terminate();
#pragma endregion
}
else
{
#pragma region QTGUI_Area
ircTh->doEmitChangeRedIRCData("-//- [!] Connection failure. (Closed link)");
ircTh->terminate();
#pragma endregion
};
}
else if(strstr(comStr, serverRealName) != NULL && strstr(comStr, "flooding") != NULL)
{
ircTh->doEmitChangeYellowIRCData("[" + QString::fromLocal8Bit("Óïûðüòå ìåë") + "] Flooding detected.");
}
else if((strstr(comStr, serverRealName) != NULL && strstr(comStr, " 332 ") != NULL)
|| strstr(comStr, topicTemp) != NULL)
{
char chanTemp[32] = {0};
strcpy(chanTemp, IRC_CHAN);
strcat(chanTemp, " :");
char *temp = strstr(comStr, chanTemp);
strncpy(topicData, temp + strlen(chanTemp), 256);
if(utfIRCFlag)
{
QTextCodec *codec = QTextCodec::codecForName("Windows-1251");
QByteArray wtf_s(QString::fromLocal8Bit(topicData).toStdString().c_str());
QByteArray wtf = codec->fromUnicode(wtf_s);
ircTh->doEmitGetTopic(wtf);
}
else ircTh->doEmitGetTopic(QString::fromLocal8Bit(topicData));
}
else if(strstr(comStr, "not channel operator") != NULL)
{
ircTh->doEmitChangeRedIRCData("[Nope] You're not channel operator.");
ircTh->doEmitGetTopic(QString::fromLocal8Bit(topicData));
}
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, "353") != NULL || strstr(comStr, "End of /NAMES list") != NULL))
{
char *strMain = NULL;
char *str1 = NULL;
char *str2 = NULL;
if(strstr(comStr, " 353 ") != NULL) strMain = strstr(comStr, " 353 ");
if(strMain != NULL)
{
char cTemp[64] = {0};
strcpy(cTemp, IRC_CHAN);
strcat(cTemp, " :");
if(strstri(strMain, cTemp) != NULL) str1 = strstri(strMain, cTemp);
else
{
char chanTemp[64] = {0};
strcpy(chanTemp, IRC_CHAN);
strcat(chanTemp, " : Error in /NAMES");
str1 = chanTemp;
};
if(strstr(str1, ":") != NULL) str2 = strstr(str1 + 1, ":");
char temp[MAX_IRC_RECV_LEN] = {0};
int dsz = strlen(str2);
if(dsz > 0)
{
ircTh->doEmitClearNickList();
strncpy(temp, str2, dsz);
char *lex = strtok(temp + 1, " ");
while(lex != NULL && lex != "" && lex != "\r" && lex != "\r\n" && *lex != 13)
{
ircTh->doEmitAddNick(QString::fromLocal8Bit(lex));
lex = strtok(NULL, " ");
};
};
};
}
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, " 432 ") > 0 || strstr(comStr, "Erroneous Nickname") > 0))
{
#pragma region QTGUI_Area
ircTh->doEmitChangeRedIRCData("[Nope] Erroneous Nickname: Illegal characters.");
#pragma endregion
}
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, " 433 ") > 0 || strstr(comStr, "Nickname is already") > 0) )
{
#pragma region QTGUI_Area
QTime time = QTime::currentTime();
qsrand((uint)time.msec());
ircTh->doEmitChangeRedIRCData("[Nope] Nickname is already in use.");
ircTh->doEmitSetNick("ns_" + QString::number(qrand() % 8999 + 1000 ));
#pragma endregion
UserNickInit(lSock);
}
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, " 438 ") > 0 || strstr(comStr, "Nick change too") > 0))
{
#pragma region QTGUI_Area
ircTh->doEmitChangeRedIRCData("[Nope] You are changing nicks too fast.");
#pragma endregion
}
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, "End of /NAMES list") != NULL || strstr(comStr, "End of /names list") != NULL
|| strstr(comStr, "end of /NAMES list") != NULL || strstr(comStr, "end of /names list") != NULL)
&& strstr(comStr, "353") == NULL)
{
ircTh->doEmitChangeRedIRCData("[IRC: NAMES! lol]");
}
else if(strstr(comStr, "QUIT :Ping timeout") != NULL || strstr(comStr, "EOF From") != NULL
|| strstr(comStr, "EOF from") != NULL || strstr(comStr, " QUIT :") != NULL)
{
if(strstr(comStr, ":") != NULL)
{
if(strstr(comStr, "!") != NULL)
{
if(strstr(comStr, "@") != NULL)
{
char *temp1 = strstr(comStr, ":");
char *temp2 = strstr(temp1, "!");
char leaverNick[32] = {0};
int sz = temp2 - temp1;
strncpy(leaverNick, temp1, (sz < 16 ? sz : 16));
#pragma region QTGUI_Area
if(strstr(comStr, "QUIT :Ping timeout") != NULL)
{
ircTh->doEmitChangeYellowIRCData("-//- " + QString(leaverNick) + " left channel (Ping timeout).");
_blinkNLine(QString(leaverNick) + " left channel (Ping timeout)", "[Server]");
}
else
{
ircTh->doEmitChangeYellowIRCData("-//- " + QString(leaverNick) + " left channel.");
_blinkNLine(QString(leaverNick) + " left channel.", "[Server]");
};
#pragma endregion
};
};
};
}
else if(strstr(comStr, "NICK :") != NULL)
{
char *temp;
char *temp2;
char senderNick[32] = {0};
if(strstr(comStr, ":") != NULL) temp = strstr(comStr, ":");
if(strstr(temp, "!") != NULL) temp2 = strstr(comStr, "!");
int nickLen = temp2 - temp - 1;
if(nickLen > 0) strncpy(senderNick, temp + 1, nickLen);
if(strstr(comStr, "NICK :") != NULL) temp = strstr(comStr, "NICK :");
memset(temp + strlen(temp), '\0', 1);
QString newNick = QString((char*)(temp + strlen("NICK :")));
#pragma region QTGUI_Area
ircTh->doEmitChangeYellowIRCData("[" + QString(senderNick) + "] is now known as [" + newNick + "].");
#pragma endregion
_blinkNLine("[" + QString(senderNick) + "] is now known as [" + newNick + "].", "[Server]");
}
else if(iWantToConnect && (strstr(comStr, "JOIN :#") > 0 || strstr(comStr, "Join :#") > 0
|| strstr(comStr, "join :#") > 0))
{
char *temp;
char *temp2;
char senderNick[32] = {0};
if(strstr(comStr, ":") != NULL) temp = strstr(comStr, ":");
if(strstr(temp, "!") != NULL) temp2 = strstr(comStr, "!");
int nickLen = temp2 - temp;
if(nickLen > 0) strncpy(senderNick, temp + 1, nickLen - 1);
#pragma region QTGUI_Area
if(QString::fromLocal8Bit(senderNick) != ui->ircNickBox->text())
{
ircTh->doEmitChangeYellowIRCData("[" + QString(senderNick) + "] joined the channel.");
_blinkNLine("[" + QString(senderNick) + "] joined the channel.", "[Server]");
}
else
{
ircTh->doEmitChangeYellowIRCData("You have joined the channel.");
_blinkNLine("You have joined the channel.", "[Server]");
if(!OnlineMsgSentFlag) //Sending data only once per connect
{
OnlineMsgSentFlag = true;
char temp[64] = {0};
strcpy(temp, "PRIVMSG #");
strcat(temp, IRC_CHAN);
strcat(temp, " :My version: v3_");
strcat(temp, gVER);
strcat(temp, "\n");
sendS(lSock, temp, strlen(temp), 0);
connectedToIRC = true;
};
};
#pragma endregion
}
else if(iWantToConnect && (strstr(comStr, "PART #") > 0 || strstr(comStr, "Part #") > 0
|| strstr(comStr, "part #") > 0))
{
char *temp;
char *temp2;
char senderNick[32] = {0};
if(strstr(comStr, ":") != NULL) temp = strstr(comStr, ":");
if(strstr(temp, "!") != NULL) temp2 = strstr(comStr, "!");
int nickLen = temp2 - temp;
if(nickLen > 0) strncpy(senderNick, temp + 1, nickLen - 1);
#pragma region QTGUI_Area
if(QString::fromLocal8Bit(senderNick) != ui->ircNickBox->text()) ircTh->doEmitChangeYellowIRCData("[" + QString(senderNick) + "] left the channel.");
else ircTh->doEmitChangeYellowIRCData("You have left the channel.");
#pragma endregion
};
}
else if(strstri(comStr, privTemp) != NULL)
{
char channelName[64] = {0};
strcpy(channelName, "PRIVMSG #");
strcat(channelName, IRC_CHAN);
strcat(channelName, " :");
char *tprv = comStr;
char *temp = NULL;
char *temp2 = NULL;
#pragma region Pinger
__pinger(recvBuff);
#pragma endregion
char senderNick[32] = {0};
if(strstr(tprv, ":") != NULL) temp = strstr(tprv, ":");
if(strstr(temp, "!") != NULL) temp2 = strstr(tprv, "!");
if(temp != NULL && temp2 != NULL)
{
if(strlen(temp) > 0 && strlen(temp2) > 0)
{
int nickLen = temp2 - temp;
if(nickLen <= 32)
{
char *tempD = strstri(tprv, channelName);
int nsz = strlen(channelName);
if(tempD == NULL) break;
char *temp4 = NULL;
int dsz = 0;
if(strstr(tempD, "\n") != NULL)
{
temp4 = strstr(tempD, "\n");
dsz = temp4 - tempD - nsz - 1;
};
char tempData[512] = {0};
if(temp4 != NULL)
{
strncpy(tempData, tempD + nsz, (dsz == 0 ? strlen(temp4) : dsz));
}
else strcpy(tempData, tempD + nsz);
if(nickLen > 0) strncpy(senderNick, temp + 1, nickLen - 1);
if(strlen(tempData) > 0)
{
QString strf;
strf = QString::fromLocal8Bit(tempData);
_blinkNLine(strf, QString::fromLocal8Bit(senderNick));
ircTh->doEmitionPlayDckingSound();
bool HLFlag = doHL(strf.toLocal8Bit().data());
int cCode = 0;
#pragma region QTGUI_Area
ircTh->doEmitChangeIRCData(false, HLFlag, cCode, strf, " <a href=\"nesca:" + QString::fromLocal8Bit(senderNick) + "\"><font style=\"color:#" + GetNickColor(senderNick) + "\">[" + QString::fromLocal8Bit(senderNick) + "]:</font></a>");
#pragma endregion
};
};
};
};
ZeroMemory(senderNick, sizeof(senderNick));
}
else if(strstri( comStr, QString("PRIVMSG " + QString(ircNick)).toLocal8Bit().data() ) != NULL)
{
char *tprv = comStr;
char *temp = NULL;
char *temp2 = NULL;
char senderNick[32] = {0};
if(strstr(tprv, ":") != NULL) temp = strstr(tprv, ":");
if(strstr(temp, "!") != NULL) temp2 = strstr(tprv, "!");
if(temp != NULL && temp2 != NULL)
{
if(strlen(temp) > 0 && strlen(temp2) > 0)
{
int nickLen = temp2 - temp;
if(nickLen <= 32)
{
char *tempD = strstri(tprv, QString("PRIVMSG " + QString(ircNick)).toLocal8Bit().data());
int nsz = QString(ircNick).size() + 10;
if(tempD == NULL) break;
char *temp4 = NULL;
int dsz = 0;
if(strstr(tempD, "\n") != NULL)
{
temp4 = strstr(tempD, "\n");
dsz = temp4 - tempD - nsz - 1;
};
char tempData[512] = {0};
if(temp4 != NULL)
{
strncpy(tempData, tempD + nsz, (dsz == 0 ? strlen(temp4) : dsz));
}
else strcpy(tempData, tempD + nsz);
if(nickLen > 0) strncpy(senderNick, temp + 1, nickLen - 1);
if(strlen(tempData) > 0)
{
QString strf;
strf = QString::fromLocal8Bit(tempData);
_blinkNLine(strf, QString::fromLocal8Bit(senderNick));
ircTh->doEmitionPlayDckingSound();
bool HLFlag = doHL(strf.toLocal8Bit().data());
int cCode = 0;
#pragma region QTGUI_Area
ircTh->doEmitChangeIRCData(true, HLFlag, cCode, strf, "<a href=\"nesca:" + QString::fromLocal8Bit(senderNick) + "\"><font style=\"color:#" + GetNickColor(senderNick) + "\">[" + QString::fromLocal8Bit(senderNick) + "]:</font></a>");
#pragma endregion
};
};
};
};
ZeroMemory(senderNick, sizeof(senderNick));
};
ZeroMemory(comStr, sizeof(comStr));
};
ZeroMemory(recvBuffG, MAX_IRC_RECV_LEN);
};
};
if(iWantToConnect == true)
{
#pragma region QTGUI_Area
ircTh->doEmitChangeRedIRCData("[-//-] IRC server went offline.");
#pragma endregion
_blinkNLine("IRC server offlined!", "[Server]");
Sleep(5000);
connectedToIRC == false;
};
}
else
{
#pragma region QTGUI_Area
if(proxyEnabledFlag) ircTh->doEmitChangeRedIRCData("[-//-] Cannot connect to proxy. (" + QString::number(WSAGetLastError()) + ")" );
else ircTh->doEmitChangeRedIRCData("[-//-] Connection failed. (" + QString::number(WSAGetLastError()) + ")" );
#pragma endregion
};
shutdown(lSock, 2);
closesocket(lSock);
};
//};
shutdown(lSock, 2);
closesocket(lSock);
};
void oIRC_Th::run()
{
IRCLoop();
ircTh->doEmitIRCOfflined();
};

48
oIRC_Th.h Normal file
View File

@ -0,0 +1,48 @@
#ifndef OIRC_TH_H
#define OIRC_TH_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
#include "irc_nmblinker.h"
#include "IRCPinger_Th.h"
class oIRC_Th : public QThread
{
Q_OBJECT
public:
void doEmitUnhidePopup(QString, QString);
void doEmitChangeIRCData(bool, bool, int, QString, QString);
void doEmitChangeRedIRCData(QString);
void doEmitChangeGreenIRCData(QString);
void doEmitChangeYellowIRCData(QString);
void doEmitChangeRawIRCDataInc(QString);
void doEmitChangeRawIRCDataOut(QString);
void doEmitSetNick(QString);
void doEmitAddNick(QString);
void doEmitClearNickList();
void doEmitIRCOfflined();
void doEmitionPlayDckingSound();
void doEmitGetTopic(QString str);
public: signals: void sUnhidePopup(QString, QString);
public: signals: void changeIRCData(bool, bool, int, QString, QString);
public: signals: void changeRedIRCData(QString);
public: signals: void changeGreenIRCData(QString);
public: signals: void changeYellowIRCData(QString);
public: signals: void changeRawIRCDataInc(QString);
public: signals: void changeRawIRCDataOut(QString);
public: signals: void setNick(QString);
public: signals: void AddNick(QString);
public: signals: void ClearNickList();
public: signals: void IRCOfflined();
public: signals: void notifyPlay();
public: signals: void getTopic(QString);
protected:
void run();
};
extern oIRC_Th *ircTh;
#endif // OIRC_TH_H

50
pass.txt Normal file
View File

@ -0,0 +1,50 @@
root
admin
password
123456
1234
12345
ADMIN
cisco
ftp
ROOT
123123
pass
passwd
qwerty
meinsm
monitor
test
sysadm
admin123
Admin
123321
12344321
toor
qwerty123
987654321
system
telecom
dreambox
111111
1111
654321
!@#$%^
0000
000000
master
12345678
666666
123123123
123454321
0123456789
qqqqqq
administrator
sys
guest
backup
Fujiyama
fujiyama
super

24
piestat.cpp Normal file
View File

@ -0,0 +1,24 @@
#include "piestat.h"
void PieStat::doEmitUpdatePie()
{
emit psTh->sUpdatePie();
};
void PieStat::run()
{
while(PieStatFlag)
{
psTh->doEmitUpdatePie();
AnomC1 = 0;
WF = 0;
BA = 0;
Filt = 0;
Overl = 0;
Lowl = 0;
Alive = 0;
Susp = 0;
ssh = 0;
msleep(500);
};
};

22
piestat.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef PIESTAT_H
#define PIESTAT_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class PieStat : public QThread
{
Q_OBJECT
public:
public: signals: void sUpdatePie();
public:
void doEmitUpdatePie();
protected:
void run();
};
extern PieStat *psTh;
#endif // PIESTAT_H

16
progressbardrawer.cpp Normal file
View File

@ -0,0 +1,16 @@
#include "progressbardrawer.h"
void ProgressbarDrawer::update()
{
emit pbTh->upd();
};
int nesca_3::perc = 0;
void ProgressbarDrawer::run()
{
while(globalScanFlag)
{
msleep(1000);
nesca_3::perc = (unsigned long)100*indexIP/(gTargetsOverall == 0 ? 1 : gTargetsOverall);
update();
};
};

20
progressbardrawer.h Normal file
View File

@ -0,0 +1,20 @@
#ifndef PROGRESSBARDRAWER_H
#define PROGRESSBARDRAWER_H
#pragma once
#include "nesca_3.h"
#include "resource.h"
class ProgressbarDrawer : public QThread
{
Q_OBJECT
public: signals: void upd();
public:
void update();
protected:
void run();
};
extern ProgressbarDrawer *pbTh;
#endif // PROGRESSBARDRAWER_H

253
resource.h Normal file
View File

@ -0,0 +1,253 @@
//#if defined(WIN32)
#pragma once
#include "base64.h"
#if defined(Q_OS_WIN32)
#pragma once
#include "iostream"
#include <time.h>
#include <process.h>
#include <conio.h>
#include <openssl/ssl.h>
#endif
#if defined(Q_OS_LINUX)
#pragma once
#include <string>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#include <netdb.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <cstring>
#define ZeroMemory(Destination,Length) memset((Destination),0,(Length))
#define Sleep(secs) usleep((secs)*1000)
#define WSAGetLastError() errno
#define closesocket(sock) ::close((sock))
typedef unsigned int UINT;
typedef const char * LPCSTR;
typedef int SOCKET;
typedef hostent HOSTENT;
typedef struct linger LINGER;
typedef int BOOL;
#define INVALID_SOCKET (SOCKET)(~0)
#define SOCKET_ERROR (-1)
#define SD_BOTH 0x02
#define FAR far
#endif
#define MAX_ADDR_LEN 128
#define TITLE_MAX_LENGTH 512
#define RECV_MAX_LENGTH 350000
#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];
struct workerStruct
{
int id;
bool giveMeMore;
char argv[MAX_ADDR_LEN];
};
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 int ipsstart[4], ipsend[4],
startNum, endNum, overallPorts, flCounter, octet[4];
extern unsigned char ipsstartfl[8192][4], ipsendfl[8192][4], starterIP[8192][4];
typedef struct ST{
char argv[2048];
}sockstruct;
struct conSTR{
char *lowerBuff;
int size;
};
struct assClSt{
const char *argv2;
};
struct PathStr{
char codepage[32];
char headr[TITLE_MAX_LENGTH];
char path[1024];
int flag;
int port;
char ip[2048];
char cookie[1024];
};
struct pl{
int loginCounter;
int passCounter;
};
struct lopaStr{
char login[128];
char pass[32];
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);
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage);
extern void UserNickInit(SOCKET lSock);
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);
class Lexems
{
public:
int iterationCount, flag;
Lexems()
{
iterationCount = 0;
flag = 0;
};
~Lexems()
{
iterationCount = 0;
};
int _header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std::vector<std::string> *lst, char *rBuff);
int _filler(int p, char* buffcpy, char* ipi, int recd, Lexems *lx, char *hl);
int globalSearchNeg(const char *buffcpy, char *ip, int port);
};
class Connector
{
public:
int _Updater();
lopaStr _FTPLobby(char *ip, int port, PathStr *ps);
lopaStr _BALobby(char *cookie, char *ip, int port, char *path, char *method, char *data);
lopaStr _WFLobby(char *cookie, char *ip, int port, char *methodVal, char *actionVal, char *userVal, char *passVal, char *formVal);
lopaStr _IPCameraBLobby(char *ip, int port, char *SPEC);
int _EstablishConnection(char *ip, int port, char *request, conSTR *cstr, int force = 0);
int _EstablishSSLConnection(char *ip, int port, char *request, conSTR *cstr);
void _StartRangeFapping(int ipsstart[], int ipsend[], int &cons, char *argv2, ST *st);
void _Connect(void *s);
void _ConnectToPort(char *ip, const char *port, char *hl);
};

24
sshpass.txt Normal file
View File

@ -0,0 +1,24 @@
root:root
root:admin
admin:admin
admin:root
backup:backup
guest:guest
root:master
root:1234
admin:master
admin:111111
root:12345
root:123456
admin:1234
admin:12345
root:12345678
root:123123
admin:123456
admin:12345678
root:654321
admin:123123
admin:654321
root:password
admin:pasword
test:test

32
vercheckerthread.cpp Normal file
View File

@ -0,0 +1,32 @@
#include "vercheckerthread.h"
void _checkVer()
{
Connector con;
conSTR CSTR;
CSTR.lowerBuff = NULL;
CSTR.size = 0;
con._EstablishConnection("nesca.d3w.org", 80, "GET /version HTTP/1.1\r\nHost: nesca.d3w.org\r\nX-Nescav3: True\r\n\r\n", &CSTR, 1);
char *ptr1 = NULL;
if(CSTR.lowerBuff != NULL)
{
if(strstr(CSTR.lowerBuff, "\r\n\r\n") != 0)
{
ptr1 = strstr(CSTR.lowerBuff, "\r\n\r\n");
if(strcmp(gVER, ptr1 + 4) != 0)
{
stt->doEmitionShowRedVersion();
};
};
delete []CSTR.lowerBuff;
CSTR.lowerBuff = NULL;
};
vct->terminate();
};
void VerCheckerThread::run()
{
_checkVer();
};

19
vercheckerthread.h Normal file
View File

@ -0,0 +1,19 @@
#ifndef VERCHECKERTHREAD_H
#define VERCHECKERTHREAD_H
#pragma once
#include "STh.h"
#include "resource.h"
class VerCheckerThread : public QThread
{
Q_OBJECT
public:
protected:
void run();
};
extern VerCheckerThread *vct;
#endif // VERCHECKERTHREAD_H

3
wflogin.txt Normal file
View File

@ -0,0 +1,3 @@
[FAIL]
admin
root

10
wfpass.txt Normal file
View File

@ -0,0 +1,10 @@
[FAIL]
admin
root
pass
password
toor
123123
123456
12345
qwerty