mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
initial commit
This commit is contained in:
commit
f80f4b52df
BIN
00000036.wav
Executable file
BIN
00000036.wav
Executable file
Binary file not shown.
241
CheckKey_Th.cpp
Executable file
241
CheckKey_Th.cpp
Executable 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();
|
||||
};
|
155
CheckProxy_Th.cpp
Executable file
155
CheckProxy_Th.cpp
Executable 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();
|
||||
};
|
23
DrawerTh_GridQoSScanner.h
Executable file
23
DrawerTh_GridQoSScanner.h
Executable 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
|
30
IRCPinger_Th.cpp
Executable file
30
IRCPinger_Th.cpp
Executable 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);
|
||||
};
|
||||
};
|
103
STh.cpp
Executable file
103
STh.cpp
Executable file
@ -0,0 +1,103 @@
|
||||
#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::doEmitionSetActivityValue(QString str)
|
||||
{
|
||||
emit stt->SetActivityValue(str);
|
||||
};
|
||||
void STh::doEmitionOffline(QString str)
|
||||
{
|
||||
emit stt->changeOffline(str);
|
||||
};
|
||||
|
||||
void STh::run()
|
||||
{
|
||||
startScan(inputStr);
|
||||
}
|
71
STh.h
Executable file
71
STh.h
Executable file
@ -0,0 +1,71 @@
|
||||
#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 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 doEmitionSetActivityValue(QString);
|
||||
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 SetActivityValue(QString);
|
||||
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
|
2530
connector.cpp
Executable file
2530
connector.cpp
Executable file
File diff suppressed because it is too large
Load Diff
29
darkmap.h
Executable file
29
darkmap.h
Executable file
@ -0,0 +1,29 @@
|
||||
#ifndef DARKMAP_H
|
||||
#define DARKMAP_H
|
||||
|
||||
#pragma once
|
||||
#include "nesca_3.h"
|
||||
#include "resource.h"
|
||||
|
||||
class DarkMap : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
static int cou;
|
||||
static int qwmGrWidth;
|
||||
static int qwmGrHeight;
|
||||
static void doEmitionDrawText();
|
||||
|
||||
public: signals: void sDrawText();
|
||||
|
||||
public:
|
||||
void doEmitDrawText();
|
||||
|
||||
protected:
|
||||
void run();
|
||||
};
|
||||
|
||||
extern DarkMap *dmTh;
|
||||
|
||||
#endif // DARKMAP_H
|
3047
finder.cpp
Executable file
3047
finder.cpp
Executable file
File diff suppressed because it is too large
Load Diff
45
main.cpp
Executable file
45
main.cpp
Executable 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();
|
||||
}
|
||||
|
791
negatives.txt
Executable file
791
negatives.txt
Executable file
@ -0,0 +1,791 @@
|
||||
530 User access denied
|
||||
prelogin
|
||||
service temporarily unavailable
|
||||
service is temporary unavailable
|
||||
service unavailable
|
||||
403 - forbidden
|
||||
403 access denied
|
||||
403 forbidden
|
||||
408 request time-out
|
||||
421 service not available
|
||||
500 - internal server error
|
||||
505 http version
|
||||
Comming Soon
|
||||
google_ad_client
|
||||
/js/thickbox.js
|
||||
google_ad_slot
|
||||
google-analytics.com
|
||||
googlesyndication
|
||||
temporarily offline
|
||||
temporarily unavailable
|
||||
>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
|
||||
customer
|
||||
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
|
||||
dvr
|
||||
dxclient
|
||||
eap web interface
|
||||
echolife
|
||||
ediciones tierrazul
|
||||
elipgo
|
||||
emta settings
|
||||
en construction
|
||||
enigin plc
|
||||
enigma web interface
|
||||
entertainment
|
||||
equipe ahcom
|
||||
erro ao resolver
|
||||
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
|
||||
grupo industrial
|
||||
guarantee
|
||||
h.264
|
||||
h264
|
||||
hc.ru
|
||||
hectrix ltd
|
||||
hikvision-webs
|
||||
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
|
||||
ip surveillance
|
||||
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
|
||||
mail_manager
|
||||
magnesium
|
||||
management console
|
||||
mbanking
|
||||
meble
|
||||
microsoft exchange
|
||||
mijn account
|
||||
mobile phone was detected
|
||||
mobile web viewer
|
||||
mobile_viewer_login
|
||||
mobile login
|
||||
Mobile Parking
|
||||
modem (administrator
|
||||
mshtml
|
||||
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
|
||||
not found 404
|
||||
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
|
||||
азартные игры
|
||||
аккорды
|
||||
анекдот
|
||||
аптек
|
||||
архив новостей
|
||||
в стадии разработки
|
||||
в разработке
|
||||
права защищены
|
||||
дача
|
||||
даче
|
||||
дешевы
|
||||
дешёвы
|
||||
домен продается
|
||||
домены на продажу
|
||||
доставка
|
||||
заказать доставку
|
||||
заработок в сети
|
||||
знакомства
|
||||
истек срок регистрации
|
||||
карикатуры
|
||||
код регистрации
|
||||
конкурс
|
||||
контакты
|
||||
купить
|
||||
кухни
|
||||
лавная страница
|
||||
личный кабинет
|
||||
лотере
|
||||
международные
|
||||
мода
|
||||
мы перее
|
||||
мы предоставляем
|
||||
на реконструкции
|
||||
найти работу
|
||||
находится в разработке
|
||||
наш баннер
|
||||
наша компания
|
||||
низкие цены
|
||||
новый адрес
|
||||
о компании
|
||||
о нас
|
||||
остев
|
||||
партнерк
|
||||
перевод текстов
|
||||
переехал
|
||||
переехал на
|
||||
персональный сайт
|
||||
пиши мне
|
||||
пиши нам
|
||||
пишите мне
|
||||
пишите нам
|
||||
подержанные
|
||||
подписаться
|
||||
поиск работы
|
||||
приколы
|
||||
продукция
|
||||
производство
|
||||
процесі розробки
|
||||
работа в интернете
|
||||
регистрации доменных имен
|
||||
рекламные ссылки
|
||||
ремонт
|
||||
сайт в разработке
|
||||
сайт недоступен
|
||||
сайт клана
|
||||
скоро запустится
|
||||
сайт на разработке
|
||||
связь с нами
|
||||
скидк
|
||||
скоро открытие
|
||||
служба поддержки
|
||||
создание недорогих сайтов
|
||||
создание сайтов
|
||||
спонсоры
|
||||
стартовая страни
|
||||
стихи
|
||||
тестовая страница
|
||||
технические работы
|
||||
услуги
|
||||
флешки
|
||||
флэшки
|
||||
футбол
|
||||
юмор
|
3911
nesca_3.cpp
Executable file
3911
nesca_3.cpp
Executable file
File diff suppressed because it is too large
Load Diff
199
nesca_3.h
Executable file
199
nesca_3.h
Executable file
@ -0,0 +1,199 @@
|
||||
#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 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();
|
||||
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();
|
||||
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 slotDrawActivityGrid();
|
||||
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 SetActivityValue(QString val);
|
||||
void ChangeTrackerOK(bool val);
|
||||
void ChangeLabelThreads_ValueChanged(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
|
||||
|
BIN
nesca_3.rc
Executable file
BIN
nesca_3.rc
Executable file
Binary file not shown.
3756
nesca_3.ui
Executable file
3756
nesca_3.ui
Executable file
File diff suppressed because it is too large
Load Diff
2555
nesca_startModule.cpp
Executable file
2555
nesca_startModule.cpp
Executable file
File diff suppressed because it is too large
Load Diff
818
oIRC_Th.cpp
Executable file
818
oIRC_Th.cpp
Executable file
@ -0,0 +1,818 @@
|
||||
#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();
|
||||
};
|
49
pass.txt
Executable file
49
pass.txt
Executable file
@ -0,0 +1,49 @@
|
||||
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
|
16
progressbardrawer.cpp
Executable file
16
progressbardrawer.cpp
Executable 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
Executable file
20
progressbardrawer.h
Executable 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
|
252
resource.h
Executable file
252
resource.h
Executable file
@ -0,0 +1,252 @@
|
||||
//#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>
|
||||
#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,60002,8008,8888,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 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 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 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, Activity, saved, Susp, WF, offlines, ssh;
|
||||
extern volatile int BA;
|
||||
extern int PieAnomC1, PieSusp, PieBA, PieLowl, PieWF, PieSSH;
|
||||
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 volatile int BrutingThrds;
|
||||
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 volatile int threads;
|
||||
extern unsigned long int gTargets, gTargetsOverall, targets;
|
||||
extern volatile int cons;
|
||||
extern int found, fillerFlag, indexIP;
|
||||
extern char timeLeft[64], tempRes[32], des1[64], res[32];
|
||||
extern int gMaxSize;
|
||||
extern char saveStartIP[128];
|
||||
extern char saveEndIP[128];
|
||||
extern volatile int gThreads;
|
||||
extern int gMode;
|
||||
extern char gRange[128];
|
||||
extern char gFirstDom[128];
|
||||
extern char gPorts[65536];
|
||||
|
||||
extern int OnLiner;
|
||||
|
||||
extern int ipsstart[4], ipsend[4], ipsstartfl[8192][4], ipsendfl[8192][4], starterIP[8192][4],
|
||||
startNum, endNum, overallPorts, flCounter, octet[4];
|
||||
|
||||
|
||||
extern std::vector<std::string> dnsVec;
|
||||
|
||||
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];
|
||||
};
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
class Connector
|
||||
{
|
||||
public:
|
||||
int _Updater();
|
||||
|
||||
lopaStr _ftpBrute(char *ip, int port, PathStr *ps);
|
||||
lopaStr _BALobby(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);
|
||||
};
|
||||
|
17
sshpass.txt
Executable file
17
sshpass.txt
Executable file
@ -0,0 +1,17 @@
|
||||
root:root
|
||||
root:admin
|
||||
admin:admin
|
||||
admin:root
|
||||
backup:backup
|
||||
guest:guest
|
||||
root:master
|
||||
admin:master
|
||||
admin:111111
|
||||
admin:1234
|
||||
admin:12345
|
||||
admin:123456
|
||||
root:1234
|
||||
root:12345
|
||||
root:123456
|
||||
admin:pasword
|
||||
root:password
|
Loading…
Reference in New Issue
Block a user