mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 10:42:21 +00:00
Digest-auth fix
This commit is contained in:
parent
ada13732ae
commit
c37077dac4
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#include "ActivityDrawerTh_HorNet.h"
|
#include "ActivityDrawerTh_HorNet.h"
|
||||||
#include "STh.h"
|
#include "STh.h"
|
||||||
|
|
||||||
@ -35,42 +34,4 @@ void ActivityDrawerTh_HorNet::run()
|
|||||||
Activity = 0;
|
Activity = 0;
|
||||||
msleep(130);
|
msleep(130);
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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);
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef ACTIVITYDRAWERTH_HORNET_H
|
#ifndef ACTIVITYDRAWERTH_HORNET_H
|
||||||
#define ACTIVITYDRAWERTH_HORNET_H
|
#define ACTIVITYDRAWERTH_HORNET_H
|
||||||
|
|
||||||
@ -20,26 +19,3 @@ protected:
|
|||||||
};
|
};
|
||||||
extern ActivityDrawerTh_HorNet *adtHN;
|
extern ActivityDrawerTh_HorNet *adtHN;
|
||||||
#endif // ACTIVITYDRAWERTH_HORNET_H
|
#endif // ACTIVITYDRAWERTH_HORNET_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
244
CheckKey_Th.cpp
244
CheckKey_Th.cpp
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "CheckKey_Th.h"
|
#include "CheckKey_Th.h"
|
||||||
#include "CheckProxy_Th.h"
|
#include "CheckProxy_Th.h"
|
||||||
@ -240,246 +239,3 @@ void CheckKey_Th::run()
|
|||||||
{
|
{
|
||||||
KeyCheckerMain();
|
KeyCheckerMain();
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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();
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef CHECKKEY_TH_H
|
#ifndef CHECKKEY_TH_H
|
||||||
#define CHECKKEY_TH_H
|
#define CHECKKEY_TH_H
|
||||||
|
|
||||||
@ -16,22 +15,3 @@ protected:
|
|||||||
|
|
||||||
extern CheckKey_Th *chKTh;
|
extern CheckKey_Th *chKTh;
|
||||||
#endif // CHECKKEY_TH_H
|
#endif // CHECKKEY_TH_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#include "CheckProxy_Th.h"
|
#include "CheckProxy_Th.h"
|
||||||
|
|
||||||
void CheckProxy_Th::doEmitChangeRedIRCData(QString str)
|
void CheckProxy_Th::doEmitChangeRedIRCData(QString str)
|
||||||
@ -154,160 +153,3 @@ void CheckProxy_Th::run()
|
|||||||
{
|
{
|
||||||
CheckProxyLogic();
|
CheckProxyLogic();
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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();
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef CHECKPROXY_TH_H
|
#ifndef CHECKPROXY_TH_H
|
||||||
#define CHECKPROXY_TH_H
|
#define CHECKPROXY_TH_H
|
||||||
|
|
||||||
@ -27,33 +26,3 @@ protected:
|
|||||||
};
|
};
|
||||||
extern CheckProxy_Th *chPTh;
|
extern CheckProxy_Th *chPTh;
|
||||||
#endif // CHECKPROXY_TH_H
|
#endif // CHECKPROXY_TH_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#include "DrawerTh_GridQoSScanner.h"
|
#include "DrawerTh_GridQoSScanner.h"
|
||||||
#include "STh.h"
|
#include "STh.h"
|
||||||
|
|
||||||
@ -21,28 +20,4 @@ void DrawerTh_GridQoSScanner::run()
|
|||||||
};
|
};
|
||||||
msleep(2000);
|
msleep(2000);
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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);
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef DRAWERTH_GRIDQOSSCANNER_H
|
#ifndef DRAWERTH_GRIDQOSSCANNER_H
|
||||||
#define DRAWERTH_GRIDQOSSCANNER_H
|
#define DRAWERTH_GRIDQOSSCANNER_H
|
||||||
|
|
||||||
@ -22,28 +21,3 @@ protected:
|
|||||||
|
|
||||||
extern DrawerTh_GridQoSScanner *dtGridQoS;
|
extern DrawerTh_GridQoSScanner *dtGridQoS;
|
||||||
#endif // DRAWERTH_GRIDQOSSCANNER_H
|
#endif // DRAWERTH_GRIDQOSSCANNER_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#include "DrawerTh_HorNet.h"
|
#include "DrawerTh_HorNet.h"
|
||||||
|
|
||||||
void DrawerTh_HorNet::run()
|
void DrawerTh_HorNet::run()
|
||||||
@ -40,47 +39,4 @@ void DrawerTh_HorNet::doEmitionAddLine(int x1, int y1, int x2, int y2)
|
|||||||
void DrawerTh_HorNet::doEmitionAddDelimLines()
|
void DrawerTh_HorNet::doEmitionAddDelimLines()
|
||||||
{
|
{
|
||||||
emit dtHN->sAddDelimLines();
|
emit dtHN->sAddDelimLines();
|
||||||
=======
|
|
||||||
#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();
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef DRAWERTH_HORNET_H
|
#ifndef DRAWERTH_HORNET_H
|
||||||
#define DRAWERTH_HORNET_H
|
#define DRAWERTH_HORNET_H
|
||||||
|
|
||||||
@ -25,31 +24,3 @@ protected:
|
|||||||
|
|
||||||
extern DrawerTh_HorNet *dtHN;
|
extern DrawerTh_HorNet *dtHN;
|
||||||
#endif // DRAWERTH_HORNET_H
|
#endif // DRAWERTH_HORNET_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#include "DrawerTh_ME2Scanner.h"
|
#include "DrawerTh_ME2Scanner.h"
|
||||||
#include "STh.h"
|
#include "STh.h"
|
||||||
|
|
||||||
@ -146,153 +145,4 @@ void DrawerTh_ME2Scanner::run()
|
|||||||
};
|
};
|
||||||
msleep(150);
|
msleep(150);
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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);
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef DRAWERTH_ME2SCANNER_H
|
#ifndef DRAWERTH_ME2SCANNER_H
|
||||||
#define DRAWERTH_ME2SCANNER_H
|
#define DRAWERTH_ME2SCANNER_H
|
||||||
|
|
||||||
@ -22,28 +21,3 @@ protected:
|
|||||||
};
|
};
|
||||||
extern DrawerTh_ME2Scanner *dtME2;
|
extern DrawerTh_ME2Scanner *dtME2;
|
||||||
#endif // DRAWERTH_ME2SCANNER_H
|
#endif // DRAWERTH_ME2SCANNER_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "DrawerTh_QoSScanner.h"
|
#include "DrawerTh_QoSScanner.h"
|
||||||
#include "STh.h"
|
#include "STh.h"
|
||||||
@ -59,66 +58,4 @@ void DrawerTh_QoSScanner::run()
|
|||||||
void DrawerTh_QoSScanner::doEmitionAddLine()
|
void DrawerTh_QoSScanner::doEmitionAddLine()
|
||||||
{
|
{
|
||||||
emit dtQoS->sAddLine();
|
emit dtQoS->sAddLine();
|
||||||
=======
|
|
||||||
#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();
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef DRAWERTH_QOSSCANNER_H
|
#ifndef DRAWERTH_QOSSCANNER_H
|
||||||
#define DRAWERTH_QOSSCANNER_H
|
#define DRAWERTH_QOSSCANNER_H
|
||||||
|
|
||||||
@ -21,27 +20,3 @@ protected:
|
|||||||
|
|
||||||
extern DrawerTh_QoSScanner *dtQoS;
|
extern DrawerTh_QoSScanner *dtQoS;
|
||||||
#endif // DRAWERTH_QOSSCANNER_H
|
#endif // DRAWERTH_QOSSCANNER_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#include "DrawerTh_VoiceScanner.h"
|
#include "DrawerTh_VoiceScanner.h"
|
||||||
|
|
||||||
void DrawerTh_VoiceScanner::doEmitAddLine()
|
void DrawerTh_VoiceScanner::doEmitAddLine()
|
||||||
@ -132,139 +131,4 @@ void DrawerTh_VoiceScanner::run()
|
|||||||
ssh = 0;
|
ssh = 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#ifndef DRAWERTH_VOICESCANNER_H
|
#ifndef DRAWERTH_VOICESCANNER_H
|
||||||
#define DRAWERTH_VOICESCANNER_H
|
#define DRAWERTH_VOICESCANNER_H
|
||||||
|
|
||||||
@ -23,29 +22,3 @@ protected:
|
|||||||
};
|
};
|
||||||
extern DrawerTh_VoiceScanner *vsTh;
|
extern DrawerTh_VoiceScanner *vsTh;
|
||||||
#endif // DRAWERTH_VOICESCANNER_H
|
#endif // DRAWERTH_VOICESCANNER_H
|
||||||
=======
|
|
||||||
#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
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "IRCPinger_Th.h"
|
#include "IRCPinger_Th.h"
|
||||||
|
|
||||||
@ -28,35 +27,4 @@ void IRCPinger_Th::run()
|
|||||||
++globalPinger;
|
++globalPinger;
|
||||||
msleep(1000);
|
msleep(1000);
|
||||||
};
|
};
|
||||||
=======
|
|
||||||
#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);
|
|
||||||
};
|
|
||||||
>>>>>>> 5d30af667b7f24c6e91d2bf1888215f755b4378d
|
|
||||||
};
|
};
|
106
connector.cpp
106
connector.cpp
@ -302,28 +302,48 @@ char *_getAttributeValue(char *str, char *val, char *ip, int port)
|
|||||||
return "";
|
return "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
void print_md5_sum(unsigned char* md, char* md5)
|
|
||||||
{
|
|
||||||
char temp[8] = {0};
|
|
||||||
for(int i = 0; i < MD5_DIGEST_LENGTH; ++i)
|
|
||||||
{
|
|
||||||
ZeroMemory(temp, 8);
|
|
||||||
sprintf(temp, "%02x", md[i]);
|
|
||||||
|
|
||||||
if(i != 0)
|
#define HASHLEN 16
|
||||||
{
|
typedef char HASH[HASHLEN];
|
||||||
strcat(md5, temp);
|
#define HASHHEXLEN 32
|
||||||
}
|
typedef char HASHHEX[HASHHEXLEN+1];
|
||||||
else
|
#define IN
|
||||||
{
|
#define OUT
|
||||||
strcpy(md5, temp);
|
void CvtHex(
|
||||||
};
|
IN HASH Bin,
|
||||||
};
|
OUT HASHHEX Hex
|
||||||
};
|
)
|
||||||
char *_makeDigestResponse(char *login, char *realm, char *pass, char *path, char *nonce)
|
|
||||||
{
|
{
|
||||||
unsigned char HA1[MD5_DIGEST_LENGTH];
|
unsigned short i;
|
||||||
unsigned char HA2[MD5_DIGEST_LENGTH];
|
unsigned char j;
|
||||||
|
|
||||||
|
for (i = 0; i < HASHLEN; i++) {
|
||||||
|
j = (Bin[i] >> 4) & 0xf;
|
||||||
|
if (j <= 9)
|
||||||
|
Hex[i*2] = (j + '0');
|
||||||
|
else
|
||||||
|
Hex[i*2] = (j + 'a' - 10);
|
||||||
|
j = Bin[i] & 0xf;
|
||||||
|
if (j <= 9)
|
||||||
|
Hex[i*2+1] = (j + '0');
|
||||||
|
else
|
||||||
|
Hex[i*2+1] = (j + 'a' - 10);
|
||||||
|
};
|
||||||
|
Hex[HASHHEXLEN] = '\0';
|
||||||
|
};
|
||||||
|
char *_makeDigestResponse(
|
||||||
|
char *login,
|
||||||
|
char *realm,
|
||||||
|
char *pass,
|
||||||
|
char *path,
|
||||||
|
char *nonce,
|
||||||
|
char *pszNonceCount,
|
||||||
|
char *pszCNonce,
|
||||||
|
char *pszQop
|
||||||
|
)
|
||||||
|
{
|
||||||
|
char HA1[MD5_DIGEST_LENGTH];
|
||||||
|
char HA2[MD5_DIGEST_LENGTH];
|
||||||
char HA1Data[512] = {0};
|
char HA1Data[512] = {0};
|
||||||
char HA2Data[512] = {0};
|
char HA2Data[512] = {0};
|
||||||
|
|
||||||
@ -336,8 +356,8 @@ char *_makeDigestResponse(char *login, char *realm, char *pass, char *path, char
|
|||||||
strcpy(HA2Data, "GET:");
|
strcpy(HA2Data, "GET:");
|
||||||
strcat(HA2Data, path);
|
strcat(HA2Data, path);
|
||||||
|
|
||||||
MD5((unsigned char*) HA1Data, strlen(HA1Data), HA1);
|
MD5((unsigned char*) HA1Data, strlen(HA1Data), (unsigned char*)HA1);
|
||||||
MD5((unsigned char*) HA2Data, strlen(HA2Data), HA2);
|
MD5((unsigned char*) HA2Data, strlen(HA2Data), (unsigned char*)HA2);
|
||||||
|
|
||||||
char responseData[512] = {0};
|
char responseData[512] = {0};
|
||||||
char *HA1MD5 = new char[64];
|
char *HA1MD5 = new char[64];
|
||||||
@ -345,20 +365,28 @@ char *_makeDigestResponse(char *login, char *realm, char *pass, char *path, char
|
|||||||
ZeroMemory(HA1MD5, 64);
|
ZeroMemory(HA1MD5, 64);
|
||||||
ZeroMemory(HA2MD5, 64);
|
ZeroMemory(HA2MD5, 64);
|
||||||
|
|
||||||
print_md5_sum(HA1, HA1MD5);
|
CvtHex(HA1, HA1MD5);
|
||||||
strcpy(responseData, HA1MD5);
|
strcpy(responseData, HA1MD5);
|
||||||
strcat(responseData, ":");
|
strcat(responseData, ":");
|
||||||
strcat(responseData, nonce);
|
strcat(responseData, nonce);
|
||||||
strcat(responseData, "::auth:");
|
strcat(responseData, ":");
|
||||||
print_md5_sum(HA2, HA2MD5);
|
if (*pszQop != NULL) {
|
||||||
|
strcat(responseData, pszNonceCount);
|
||||||
|
strcat(responseData, ":");
|
||||||
|
strcat(responseData, pszCNonce);
|
||||||
|
strcat(responseData, ":");
|
||||||
|
strcat(responseData, pszQop);
|
||||||
|
strcat(responseData, ":");
|
||||||
|
};
|
||||||
|
CvtHex(HA2, HA2MD5);
|
||||||
strcat(responseData, HA2MD5);
|
strcat(responseData, HA2MD5);
|
||||||
delete []HA1MD5;
|
delete []HA1MD5;
|
||||||
delete []HA2MD5;
|
delete []HA2MD5;
|
||||||
|
|
||||||
unsigned char response[MD5_DIGEST_LENGTH];
|
char response[MD5_DIGEST_LENGTH];
|
||||||
MD5((unsigned char*) responseData, strlen(responseData), response);
|
MD5((unsigned char*) responseData, strlen(responseData), (unsigned char*)response);
|
||||||
char responseMD5[64] = {0};
|
char responseMD5[64] = {0};
|
||||||
print_md5_sum(response, responseMD5);
|
CvtHex(response, responseMD5);
|
||||||
return (char*)responseMD5;
|
return (char*)responseMD5;
|
||||||
};
|
};
|
||||||
volatile bool baSSLLocked = false;
|
volatile bool baSSLLocked = false;
|
||||||
@ -527,6 +555,8 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
|
|||||||
char attribute[2048] = {0};
|
char attribute[2048] = {0};
|
||||||
char nonce[512] = {0};
|
char nonce[512] = {0};
|
||||||
char realm[512] = {0};
|
char realm[512] = {0};
|
||||||
|
char opaque[512] = {0};
|
||||||
|
char qop[64] = {0};
|
||||||
string encoded = "";
|
string encoded = "";
|
||||||
for(int i = 0; i < MaxLogin; i++)
|
for(int i = 0; i < MaxLogin; i++)
|
||||||
{
|
{
|
||||||
@ -550,6 +580,11 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
|
|||||||
strcpy(nonce, _getAttributeValue(attribute, "nonce=", ip, port));
|
strcpy(nonce, _getAttributeValue(attribute, "nonce=", ip, port));
|
||||||
ZeroMemory(realm, 512);
|
ZeroMemory(realm, 512);
|
||||||
strcpy(realm, _getAttributeValue(attribute, "realm=", ip, port));
|
strcpy(realm, _getAttributeValue(attribute, "realm=", ip, port));
|
||||||
|
ZeroMemory(qop, 64);
|
||||||
|
if(strstri(attribute, "qop") != NULL)
|
||||||
|
{
|
||||||
|
strcpy(qop, _getAttributeValue(attribute, "qop=", ip, port));
|
||||||
|
};
|
||||||
|
|
||||||
strcpy(request, "GET ");
|
strcpy(request, "GET ");
|
||||||
strcat(request, path);
|
strcat(request, path);
|
||||||
@ -569,8 +604,17 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
|
|||||||
strcat(request, "\", uri=\"");
|
strcat(request, "\", uri=\"");
|
||||||
strcat(request, path);
|
strcat(request, path);
|
||||||
strcat(request, "\", qop=auth, response=\"");
|
strcat(request, "\", qop=auth, response=\"");
|
||||||
strcat(request, _makeDigestResponse(curLogin, realm, curPass, path, nonce));
|
strcat(request, _makeDigestResponse(curLogin, realm, curPass, path, nonce, "10000001", "9d531d56796e0dc9", qop));
|
||||||
strcat(request, "\", nc=00000001, cnonce=\"9d531d56796e0dc9\"\r\nConnection: close\r\nContent-length: 0\r\n\r\n");
|
if(strstri(attribute, "opaque") != NULL)
|
||||||
|
{
|
||||||
|
ZeroMemory(opaque, 512);
|
||||||
|
strcpy(opaque, _getAttributeValue(attribute, "opaque=", ip, port));
|
||||||
|
strcat(request, "\", opaque=\"");
|
||||||
|
strcat(request, opaque);
|
||||||
|
};
|
||||||
|
//strcat(request, "\"");
|
||||||
|
strcat(request, "\", nc=10000001, cnonce=\"9d531d56796e0dc9\"");
|
||||||
|
strcat(request, "\r\nConnection: close\r\nContent-length: 0\r\n\r\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -643,7 +687,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
|
|||||||
|
|
||||||
strncat(recvBuff, recvBuff2, x);
|
strncat(recvBuff, recvBuff2, x);
|
||||||
};
|
};
|
||||||
if(BALogSwitched) stt->doEmitionBAData("Checked BA: " + QString(ip) + ":" + QString::number(port) + "; login/pass: "+ QString(tPass) + "; - Progress: (" + QString::number((passCounter++/(double)(MaxPass*MaxLogin)) * 100).mid(0, 4) + "%)");
|
if(BALogSwitched) stt->doEmitionBAData("Checked BA: " + QString(ip) + ":" + QString::number(port) + "; login/pass: " + QString(curLogin) + ":" + QString(curPass) + "; - Progress: (" + QString::number((passCounter++/(double)(MaxPass*MaxLogin)) * 100).mid(0, 4) + "%)");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
51
finder.cpp
51
finder.cpp
@ -274,6 +274,8 @@ int _mainFinderFirst(char *buffcpy, int f, int port, char *ip)
|
|||||||
if(strstr(buffcpy, "ip surveillance") != NULL && strstr(buffcpy, "customer login") != NULL) return 39; //EagleEye
|
if(strstr(buffcpy, "ip surveillance") != NULL && strstr(buffcpy, "customer login") != NULL) return 39; //EagleEye
|
||||||
if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/admin/index.shtml?") != NULL) return 40; //Network Camera VB-C300
|
if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/admin/index.shtml?") != NULL) return 40; //Network Camera VB-C300
|
||||||
if(strstr(buffcpy, "sq-webcam") != NULL && strstr(buffcpy, "liveview.html") != NULL) return 41; //AVIOSYS-camera
|
if(strstr(buffcpy, "sq-webcam") != NULL && strstr(buffcpy, "liveview.html") != NULL) return 41; //AVIOSYS-camera
|
||||||
|
if(strstr(buffcpy, "nw_camera") != NULL && strstr(buffcpy, "/cgi-bin/getuid") != NULL) return 42; //NW_camera
|
||||||
|
if(strstr(buffcpy, "micros") != NULL && strstr(buffcpy, "/gui/gui_outer_frame.shtml") != NULL) return 43; //NW_camera
|
||||||
|
|
||||||
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
||||||
(strstri(buffcpy, "220 diskStation ftp server ready") != NULL) ||
|
(strstri(buffcpy, "220 diskStation ftp server ready") != NULL) ||
|
||||||
@ -284,9 +286,8 @@ int _mainFinderFirst(char *buffcpy, int f, int port, char *ip)
|
|||||||
|| strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL
|
|| strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL
|
||||||
|| strstr(buffcpy, "hfs /") != NULL || strstr(buffcpy, "httpfileserver") != NULL
|
|| strstr(buffcpy, "hfs /") != NULL || strstr(buffcpy, "httpfileserver") != NULL
|
||||||
|| strstr(buffcpy, "network camera server") != NULL
|
|| strstr(buffcpy, "network camera server") != NULL
|
||||||
|| strstr(buffcpy, "ipcamera") != NULL || strstr(buffcpy, "$lock extended") != NULL
|
|| strstr(buffcpy, "$lock extended") != NULL
|
||||||
|| strstr(buffcpy, "ip camera") != NULL
|
|| strstr(buffcpy, "ip camera") != NULL
|
||||||
|| strstr(buffcpy, "ipcam_language") != NULL
|
|
||||||
|| strstr(buffcpy, "/viewer/video.jpg") != NULL || strstr(buffcpy, "smart ip device") != NULL
|
|| strstr(buffcpy, "/viewer/video.jpg") != NULL || strstr(buffcpy, "smart ip device") != NULL
|
||||||
|| strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL
|
|| strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL
|
||||||
|| strstr(buffcpy, "ipcam") != NULL
|
|| strstr(buffcpy, "ipcam") != NULL
|
||||||
@ -340,6 +341,8 @@ int _mainFinderSecond(char *buffcpy, int port, char *ip)
|
|||||||
if(strstr(buffcpy, "ip surveillance") != NULL && strstr(buffcpy, "customer login") != NULL) return 39; //EagleEye
|
if(strstr(buffcpy, "ip surveillance") != NULL && strstr(buffcpy, "customer login") != NULL) return 39; //EagleEye
|
||||||
if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/admin/index.shtml?") != NULL) return 40; //Network Camera VB-C300
|
if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/admin/index.shtml?") != NULL) return 40; //Network Camera VB-C300
|
||||||
if(strstr(buffcpy, "sq-webcam") != NULL && strstr(buffcpy, "liveview.html") != NULL) return 41; //AVIOSYS-camera
|
if(strstr(buffcpy, "sq-webcam") != NULL && strstr(buffcpy, "liveview.html") != NULL) return 41; //AVIOSYS-camera
|
||||||
|
if(strstr(buffcpy, "nw_camera") != NULL && strstr(buffcpy, "/cgi-bin/getuid") != NULL) return 42; //NW_camera
|
||||||
|
if(strstr(buffcpy, "micros") != NULL && strstr(buffcpy, "/gui/gui_outer_frame.shtml") != NULL) return 43; //NW_camera
|
||||||
|
|
||||||
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
||||||
(strstr(buffcpy, "220 diskStation ftp server ready") != NULL) ||
|
(strstr(buffcpy, "220 diskStation ftp server ready") != NULL) ||
|
||||||
@ -351,9 +354,8 @@ int _mainFinderSecond(char *buffcpy, int port, char *ip)
|
|||||||
|| strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL
|
|| strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL
|
||||||
|| strstr(buffcpy, "hfs /") != NULL || strstr(buffcpy, "httpfileserver") != NULL
|
|| strstr(buffcpy, "hfs /") != NULL || strstr(buffcpy, "httpfileserver") != NULL
|
||||||
|| strstr(buffcpy, "network camera server") != NULL
|
|| strstr(buffcpy, "network camera server") != NULL
|
||||||
|| strstr(buffcpy, "ipcamera") != NULL || strstr(buffcpy, "$lock extended") != NULL
|
|| strstr(buffcpy, "$lock extended") != NULL
|
||||||
|| strstr(buffcpy, "ip camera") != NULL
|
|| strstr(buffcpy, "ip camera") != NULL
|
||||||
|| strstr(buffcpy, "ipcam_language") != NULL
|
|
||||||
|| strstr(buffcpy, "/viewer/video.jpg") != NULL || strstr(buffcpy, "smart ip device") != NULL
|
|| strstr(buffcpy, "/viewer/video.jpg") != NULL || strstr(buffcpy, "smart ip device") != NULL
|
||||||
|| strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL
|
|| strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL
|
||||||
|| strstr(buffcpy, "ipcam") != NULL
|
|| strstr(buffcpy, "ipcam") != NULL
|
||||||
@ -372,7 +374,7 @@ int ContentFilter(char *buff, int port, char *ip, char *cp)
|
|||||||
int sz = strlen(buff);
|
int sz = strlen(buff);
|
||||||
int res = 0;
|
int res = 0;
|
||||||
char *lBuff = new char[sz + 1];
|
char *lBuff = new char[sz + 1];
|
||||||
ZeroMemory(lBuff, sizeof(lBuff));
|
ZeroMemory(lBuff, sz + 1);
|
||||||
if(strstr(cp, "1251") != NULL)
|
if(strstr(cp, "1251") != NULL)
|
||||||
{
|
{
|
||||||
strcpy(lBuff, toLowerStr(buff).c_str());
|
strcpy(lBuff, toLowerStr(buff).c_str());
|
||||||
@ -452,7 +454,7 @@ int __checkFileExistence(int flag)
|
|||||||
else if(flag == 0 || flag == 15 || flag == -10) strcpy(fileName, "./result_files/strange.html");
|
else if(flag == 0 || flag == 15 || flag == -10) strcpy(fileName, "./result_files/strange.html");
|
||||||
else if(flag == 3) strcpy(fileName, "./result_files/other.html");
|
else if(flag == 3) strcpy(fileName, "./result_files/other.html");
|
||||||
else if(flag == 7) strcpy(fileName, "./result_files/low_loads.html");
|
else if(flag == 7) strcpy(fileName, "./result_files/low_loads.html");
|
||||||
else if(flag == 10) strcpy(fileName, "./result_files/Login_forms.html");
|
else if(flag == 10) strcpy(fileName, "./result_files/LoginForms.html");
|
||||||
else if(flag == 16) strcpy(fileName, "./result_files/FTP.html");
|
else if(flag == 16) strcpy(fileName, "./result_files/FTP.html");
|
||||||
else if(flag >= 17 || flag == 11 || flag == 12
|
else if(flag >= 17 || flag == 11 || flag == 12
|
||||||
|| flag == 13 || flag == 14 || flag == 1) strcpy(fileName, "./result_files/Basicauth.html");
|
|| flag == 13 || flag == 14 || flag == 1) strcpy(fileName, "./result_files/Basicauth.html");
|
||||||
@ -506,7 +508,7 @@ void fputsf(char *ip, char *port, char *text, int flag, char *msg)
|
|||||||
else if(flag == 10)
|
else if(flag == 10)
|
||||||
{
|
{
|
||||||
if(ftsLF) ftsLF = __checkFileExistence(flag);
|
if(ftsLF) ftsLF = __checkFileExistence(flag);
|
||||||
file = fopen("./result_files/Login_forms.html", "a");
|
file = fopen("./result_files/LoginForms.html", "a");
|
||||||
}
|
}
|
||||||
else if(flag == 16)
|
else if(flag == 16)
|
||||||
{
|
{
|
||||||
@ -1377,15 +1379,6 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
|||||||
char b[16] = {0};
|
char b[16] = {0};
|
||||||
|
|
||||||
if( strstr(buffcpy, "[IGNR_ADDR]") != NULL ) return -1;
|
if( strstr(buffcpy, "[IGNR_ADDR]") != NULL ) return -1;
|
||||||
if(strstri(buffcpy, "404 file not found") != NULL)
|
|
||||||
{
|
|
||||||
if(gNegDebugMode)
|
|
||||||
{
|
|
||||||
stt->doEmitionDebugFoundData("[<a href=\"http://" + QString(ip) + ":" + QString::number(p) + "/\"><font color=\"#0084ff\">" + QString(ip) + ":" + QString::number(p) + "</font></a>" + "] Negative hit: \"" + QString::fromLocal8Bit("404 Not Found").toHtmlEscaped() + "\"");
|
|
||||||
};
|
|
||||||
++Filt;
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
if(p == 22)
|
if(p == 22)
|
||||||
{
|
{
|
||||||
flag = -22;
|
flag = -22;
|
||||||
@ -1480,10 +1473,16 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
|||||||
strcpy(port, itoa(p, b, 10));
|
strcpy(port, itoa(p, b, 10));
|
||||||
|
|
||||||
if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr);
|
if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr);
|
||||||
if(strstr(finalstr, "Error - Bad Address") != NULL) flag = 5;
|
if(flag == -1 || flag == 6 || strstr(finalstr, "[IGNR_ADDR]") != NULL) return -1;
|
||||||
else if(flag == -1 || flag == 6 || strstr(finalstr, "[IGNR_ADDR]") != NULL) return -1;
|
|
||||||
|
|
||||||
fillerFlag = 1;
|
fillerFlag = 1;
|
||||||
|
|
||||||
|
if(strstri(finalstr, "WebDAV") != NULL)
|
||||||
|
{
|
||||||
|
_specBrute(ps.cookie, ip, p, hl, finalstr, flag, "/auth-digest", "[DIGEST]", "Basic Authorization", cp, recd, buffcpy);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#pragma region Fillers
|
#pragma region Fillers
|
||||||
|
|
||||||
if(flag == 16)
|
if(flag == 16)
|
||||||
@ -1685,6 +1684,14 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
|||||||
{
|
{
|
||||||
_specWEBIPCAMBrute(ip, p, hl, "[AVIOSYS] IP Camera", flag, "[AVIOSYS] IP Camera", "Basic Authorization", cp, recd, "AVIOSYS");
|
_specWEBIPCAMBrute(ip, p, hl, "[AVIOSYS] IP Camera", flag, "[AVIOSYS] IP Camera", "Basic Authorization", cp, recd, "AVIOSYS");
|
||||||
}
|
}
|
||||||
|
else if(flag == 42) //NW_camera
|
||||||
|
{
|
||||||
|
_specBrute(ps.cookie, ip, p, hl, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "[NW_camera] IP Camera", "Basic Authorization", cp, recd, "");
|
||||||
|
}
|
||||||
|
else if(flag == 43) //NW_camera
|
||||||
|
{
|
||||||
|
_specBrute(ps.cookie, ip, p, hl, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "[Micros] IP Camera", "Basic Authorization", cp, recd, "");
|
||||||
|
}
|
||||||
else if(flag == 20) //AXIS Camera
|
else if(flag == 20) //AXIS Camera
|
||||||
{
|
{
|
||||||
_specBrute(ps.cookie, ip, p, hl, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "AXIS Camera", "Basic Authorization", cp, recd, "");
|
_specBrute(ps.cookie, ip, p, hl, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "AXIS Camera", "Basic Authorization", cp, recd, "");
|
||||||
@ -2357,12 +2364,6 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
strcpy(ps->headr, "[IRC server]");
|
strcpy(ps->headr, "[IRC server]");
|
||||||
strcpy(ps->path, "/"); return 1;
|
strcpy(ps->path, "/"); return 1;
|
||||||
};
|
};
|
||||||
if(strstri(str, "Error - Bad Address"))
|
|
||||||
{ strcpy(ps->headr, str); strcpy(ps->path, "/"); return 0; };
|
|
||||||
if(strstri(str, "[OVERFLOW]") != NULL)
|
|
||||||
{ strcpy(ps->headr, "[OVERFLOW]"); strcpy(ps->path, "/"); return 0; };
|
|
||||||
if(strstri(str, "site introuvable !") != NULL)
|
|
||||||
{ strcpy(ps->headr, "[Site introuvable !]"); strcpy(ps->path, "/"); return 0; };
|
|
||||||
if(strstri(str, "ip camera") != NULL || strstri(str, "+tm01+") != NULL
|
if(strstri(str, "ip camera") != NULL || strstri(str, "+tm01+") != NULL
|
||||||
|| strstri(str, "camera web server") != NULL || strstri(str, "ipcam_language") != NULL
|
|| strstri(str, "camera web server") != NULL || strstri(str, "ipcam_language") != NULL
|
||||||
|| strstri(str, "/viewer/video.jpg") != NULL || strstri(str, "network camera") != NULL
|
|| strstri(str, "/viewer/video.jpg") != NULL || strstri(str, "network camera") != NULL
|
||||||
@ -2413,7 +2414,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
if(tmp != NULL)
|
if(tmp != NULL)
|
||||||
{
|
{
|
||||||
strncat(newLoc, temp + 10, res < 128 ? res : 127);
|
strncat(newLoc, temp + 10, res < 128 ? res : 127);
|
||||||
if(strstr(newLoc, "http://") == NULL && strstr(newLoc, "https://") == NULL)
|
if(strstri(newLoc, "http://") == NULL && strstri(newLoc, "https://") == NULL)
|
||||||
{
|
{
|
||||||
if(newLoc[0] != '.')
|
if(newLoc[0] != '.')
|
||||||
{
|
{
|
||||||
|
@ -18,6 +18,7 @@ is still available
|
|||||||
php framework
|
php framework
|
||||||
BlueBean
|
BlueBean
|
||||||
403 forbidden
|
403 forbidden
|
||||||
|
404 not found
|
||||||
504 gateway timeout
|
504 gateway timeout
|
||||||
500 internal server error
|
500 internal server error
|
||||||
500 - internal server error
|
500 - internal server error
|
||||||
@ -81,6 +82,7 @@ application/x-shockwave-flash
|
|||||||
/product.php
|
/product.php
|
||||||
/rpauth.html
|
/rpauth.html
|
||||||
/servlet/wap/login
|
/servlet/wap/login
|
||||||
|
site introuvable
|
||||||
shop
|
shop
|
||||||
/buy
|
/buy
|
||||||
/sell
|
/sell
|
||||||
@ -277,7 +279,6 @@ domeingeregistreerd
|
|||||||
down for maint
|
down for maint
|
||||||
draytek corp
|
draytek corp
|
||||||
dreambox webcontrol
|
dreambox webcontrol
|
||||||
drug shop
|
|
||||||
drupal
|
drupal
|
||||||
Dreamweaver MX
|
Dreamweaver MX
|
||||||
due to maintance
|
due to maintance
|
||||||
@ -458,8 +459,6 @@ oncell warning
|
|||||||
one time payment
|
one time payment
|
||||||
one web server
|
one web server
|
||||||
online dating
|
online dating
|
||||||
online pills
|
|
||||||
online shop
|
|
||||||
online store
|
online store
|
||||||
oracle application server
|
oracle application server
|
||||||
our partners
|
our partners
|
||||||
@ -473,12 +472,11 @@ page=about
|
|||||||
pagerrorimg
|
pagerrorimg
|
||||||
pagos
|
pagos
|
||||||
parkerad
|
parkerad
|
||||||
Parking.
|
parking.
|
||||||
paradox ip module
|
paradox ip module
|
||||||
parallels confixx
|
parallels confixx
|
||||||
parallels operations automation default
|
parallels operations automation default
|
||||||
parent.location=
|
parent.location=
|
||||||
parking.php
|
|
||||||
partners
|
partners
|
||||||
paypal
|
paypal
|
||||||
pharmacy
|
pharmacy
|
||||||
@ -548,8 +546,7 @@ samsung digital
|
|||||||
sapphire journal
|
sapphire journal
|
||||||
sbuilder.ru
|
sbuilder.ru
|
||||||
scam_2nd.sis
|
scam_2nd.sis
|
||||||
search...
|
search.
|
||||||
search.html
|
|
||||||
searchnut.com
|
searchnut.com
|
||||||
searchpage.aspx
|
searchpage.aspx
|
||||||
searchremagnified
|
searchremagnified
|
||||||
@ -563,11 +560,6 @@ server default page
|
|||||||
service client
|
service client
|
||||||
servicio
|
servicio
|
||||||
shared ip
|
shared ip
|
||||||
shop.
|
|
||||||
shop online
|
|
||||||
shop_id=
|
|
||||||
shopcart
|
|
||||||
shopping cart
|
|
||||||
sign in now
|
sign in now
|
||||||
silverlight
|
silverlight
|
||||||
sistema fenix
|
sistema fenix
|
||||||
|
BIN
nesca_3.rc
Normal file
BIN
nesca_3.rc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user