This commit is contained in:
cora48 2015-03-06 17:32:36 +03:00
parent b0e7831984
commit 082bde227b
20 changed files with 620 additions and 773 deletions

View File

@ -4,8 +4,10 @@
#include "STh.h" #include "STh.h"
#include "externData.h" #include "externData.h"
#include "externFunctions.h" #include "externFunctions.h"
#include <Connector.h>
#include <Utils.h>
void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest) void getSubStrEx(const char *src, char *startStr, char *endStr, char *dest, int szDest)
{ {
ZeroMemory(dest, szDest); ZeroMemory(dest, szDest);
char *ptr1 = strstri((const char*)src, startStr); char *ptr1 = strstri((const char*)src, startStr);
@ -48,214 +50,47 @@ int KeyCheckerMain()
stt->doEmitionRedFoundData("[Key check] Key length is not valid."); stt->doEmitionRedFoundData("[Key check] Key length is not valid.");
return -1; return -1;
}; };
char msg[1024] = {0};
char ndbServer[64] = {0};
char ndbScript[64] = {0};
sockaddr_in sockAddr; std::vector<std::string> headerVector;
sockAddr.sin_family = AF_INET; headerVector.push_back("X-Nescav3: True");
sockAddr.sin_port = htons(atoi(trcSrvPortLine));
strcpy(msg, "GET "); std::string buffer;
strcat(msg, "/"); Connector::nConnect((std::string(trcSrv) + std::string(trcScr)).c_str(), std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
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; int hostStringIndex = Utils::ci_find_substr(buffer, std::string("\r\n\r\n"));
if(hostStringIndex != -1) {
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) const char *ptr1 = buffer.c_str() + hostStringIndex + 4;
if(inet_addr(trcSrv) != INADDR_NONE) sockAddr.sin_addr.S_un.S_addr = inet_addr(trcSrv); buffer.clear();
else if(host=gethostbyname (trcSrv)) ((unsigned long*) &sockAddr.sin_addr)[0] = ((unsigned long**)host->h_addr_list)[0][0]; Connector::nConnect((std::string(ptr1) + std::string("/api/checkaccount?key=") + std::string(trcPersKey)).c_str(),
#else std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
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)
{
stt->doEmitionRedFoundData("[Key check] -connect() returned. Cannot connect to balancer! " + QString::number(WSAGetLastError()) + ".");
CSSOCKET(sock);
return -1;
};
test = send(sock, msg, strlen(msg), 0);
if(test == -1)
{
stt->doEmitionRedFoundData("[Key check] -send() returned. Cannot send to balancer! " + QString::number(WSAGetLastError()) + ".");
CSSOCKET(sock);
return -1;
};
ZeroMemory(msg, 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)
{
stt->doEmitionRedFoundData("[Key check] -recv() returned. Cannot recv from balancer! " + QString::number(WSAGetLastError()) + ".");
CSSOCKET(sock);
return -1;
};
char *t1;
char *t2;
if(strstr(msg, "http://") != NULL)
{
t1 = strstr(msg, "http://");
if(strstr((char*)(t1 + 7), "/") != NULL)
{
t2 = strstr((char*)(t1 + 7), "/");
int ln = t2 - t1 - 7;
if(ln > 64)
{
stt->doEmitionRedFoundData("[Key check] -Received server string is not valid!");
CSSOCKET(sock);
return -1;
}
else strncpy(ndbServer, (char*)(t1 + 7), ln);
if(strlen(t2) > 64)
{
stt->doEmitionYellowFoundData("[Key check] -Fragmentation detected!");
if(strstr(t2, "\r\n") != NULL)
{
char *t3 = strstr(t2, "\r\n");
int y = (int)(t3 - t2);
if(y > 64)
{
stt->doEmitionRedFoundData("[Key check] -Received server string is not valid!");
CSSOCKET(sock);
return -1;
}
else
{
strncpy(ndbScript, t2, y);
};
}
else
{
stt->doEmitionRedFoundData("[Key check] -Received server string is not valid!");
CSSOCKET(sock);
return -1;
};
} else strcpy(ndbScript, t2);
}
else
{
stt->doEmitionRedFoundData("[Key check] -Cannot receive script value!");
CSSOCKET(sock);
return -1;
};
ZeroMemory(msg, sizeof(msg));
stt->doEmitionGreenFoundData("[Key check] -OK. -Server string aquired! Checking key...");
CSSOCKET(sock);
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) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
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.");
CSSOCKET(sock);
return -1;
};
c = send(sock, msg, strlen(msg), 0);
if(c == SOCKET_ERROR)
{
stt->doEmitionRedFoundData("[Key check] -Send error.");
CSSOCKET(sock);
return -1;
};
ZeroMemory(msg, sizeof(msg));
test = recv(sock, msg, 512, 0);
if(strstr(msg, "202 Accepted") != NULL)
{
stt->doEmitionGreenFoundData("[Key check] -OK. Key is valid!");
CSSOCKET(sock);
if(Utils::ci_find_substr(buffer, std::string("202 Accepted")) != -1) {
stt->doEmitionGreenFoundData("Key is valid.");
if(emitIfOK == 0) stt->doEmitionStartScanIP(); if(emitIfOK == 0) stt->doEmitionStartScanIP();
else if(emitIfOK == 1) stt->doEmitionStartScanDNS(); else if(emitIfOK == 1) stt->doEmitionStartScanDNS();
else if(emitIfOK == 2) stt->doEmitionStartScanImport(); else if(emitIfOK == 2) stt->doEmitionStartScanImport();
return 1; return 1;
} } else if(Utils::ci_find_substr(buffer, std::string("400 Bad Request")) != -1) {
else if(strstr(msg, "400 Bad Request") != NULL) QString errorDef = GetNSErrorDefinition(buffer.c_str(), "notify");
{
QString errorDef = GetNSErrorDefinition(msg, "notify");
if(errorDef == "Invalid access key") stt->doEmitionYellowFoundData("[NS-Track] [Key is unauthorized] A valid key is required."); if(errorDef == "Invalid access key") stt->doEmitionYellowFoundData("[NS-Track] [Key is unauthorized] A valid key is required.");
else stt->doEmitionYellowFoundData("[NS-Track] -FAIL! [400 Bad Request : " + GetNSErrorDefinition(msg, "notify") + "]"); else stt->doEmitionYellowFoundData("[Key checker] -FAIL! [400 Bad Request : " + GetNSErrorDefinition(buffer.c_str(), "notify") + "]");
CSSOCKET(sock);
return -1; return -1;
} } else if(Utils::ci_find_substr(buffer, std::string("503 Bad Gateway")) != -1) {
else if(strstr(msg, "503 Bad Gateway") != NULL) stt->doEmitionYellowFoundData("[Key checker] 503 Backend not responding!");
{
stt->doEmitionYellowFoundData("[NS-Track] 503 Backend not responding!");
CSSOCKET(sock);
return -1; return -1;
} } else {
else
{
char header[64] = {0}; char header[64] = {0};
getSubStrEx(msg, "http/1.1 ", "\r\n", header, 64); getSubStrEx(buffer.c_str(), "http/1.1 ", "\r\n", header, 64);
stt->doEmitionYellowFoundData("[Key check] -FAIL! An error occured. (" + QString::number(WSAGetLastError()) + ") Header: <u>" + QString::fromLocal8Bit(header) + "</u>"); stt->doEmitionRedFoundData("[Key checker] -FAIL! An error occured. (" + QString::number(WSAGetLastError()) + ") Header: <u>" + QString::fromLocal8Bit(header) + "</u>");
if(gDebugMode) stt->doEmitionDebugFoundData(QString(msg)); if(gDebugMode) stt->doEmitionDebugFoundData(QString(buffer.c_str()));
CSSOCKET(sock);
return -1; return -1;
}; };
} else {
ZeroMemory(msg, sizeof(msg)); stt->doEmitionRedFoundData("[Key checker] Cannot acquire host string.");
CSSOCKET(sock); }
} }
else
{
stt->doEmitionRedFoundData("[Key check] -Balancer replied with invalid string.");
if(gDebugMode) stt->doEmitionDebugFoundData(QString(msg));
CSSOCKET(sock);
return -1;
};
};
void CheckKey_Th::run() void CheckKey_Th::run()
{ {
KeyCheckerMain(); KeyCheckerMain();
}; }

View File

@ -1,8 +1,93 @@
#include <Connector.h> #include <Connector.h>
#include <Utils.h>
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
int _pingMyTarget(char *ip)
{
HANDLE hIcmpFile;
unsigned long ipaddr = INADDR_NONE;
DWORD dwRetVal = 0;
char SendData[32] = "Data Buffer";
LPVOID ReplyBuffer = NULL;
DWORD ReplySize = 0;
ipaddr = inet_addr(ip);
if (ipaddr == INADDR_NONE)
{
stt->doEmitionRedFoundData("[Pinger] INADDR_NONE! [" + QString(ip) + "]");
return 0;
}
hIcmpFile = IcmpCreateFile();
if (hIcmpFile == INVALID_HANDLE_VALUE)
{
stt->doEmitionRedFoundData("[Pinger] Unable to open handle. [" + QString::number(GetLastError()) + "]");
return 0;
}
ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData);
ReplyBuffer = (VOID*) malloc(ReplySize);
if (ReplyBuffer == NULL)
{
stt->doEmitionRedFoundData("[Pinger] Unable to allocate memory.");
return 0;
}
dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData),
NULL, ReplyBuffer, ReplySize, gPingTimeout*1000);
if (dwRetVal != 0) {
PICMP_ECHO_REPLY pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer;
struct in_addr ReplyAddr;
ReplyAddr.S_un.S_addr = pEchoReply->Address;
printf("\tSent icmp message to %s\n", "127.0.0.1");
if (dwRetVal > 1)
{
if(gDebugMode) stt->doEmitionYellowFoundData("[Pinger] Received " + QString::number(dwRetVal) + " icmp message responses.");
}
else
{
if(gDebugMode) stt->doEmitionYellowFoundData("[Pinger] Received " + QString::number(dwRetVal) + " icmp message responses.");
}
int Connector::_sshConnect(char *user, char *pass, char *host, int port) if(gDebugMode) stt->doEmitionYellowFoundData("[Pinger] Received from: " + QString(inet_ntoa( ReplyAddr )) + "; Status = " + QString::number(pEchoReply->Status) + "; Roundtrip time = " + QString::number(pEchoReply->RoundTripTime) + "ms.");
return 1;
}
else
{
printf("\tCall to IcmpSendEcho failed.\n");
printf("\tIcmpSendEcho returned error: %ld\n", GetLastError() );
if(gDebugMode) stt->doEmitionRedFoundData("[Pinger] Call to IcmpSendEcho failed. IcmpSendEcho returned error: " + QString::number(GetLastError()));
return 0;
};
}
#else
int _pingMyTarget(char *ip)
{
FILE *pipe = popen(("ping -w " + std::to_string(gPingTimeout) + " " + ip).c_str(), "r");
if(!pipe) {
stt->doEmitionRedFoundData("Ping pipe failed: cannot open pipe.");
perror("pipe");
return 0;
}
char buffer[128] = {0};
std::string result;
while(!feof(pipe)) {
if(fgets(buffer, 128, pipe) != NULL){
result += buffer;
}
}
pclose(pipe);
if(strstr((char*)result.c_str(), "100% packet loss") != NULL) return 0;
return 1;
}
#endif
int _sshConnect(char *user, char *pass, char *host, int port)
{ {
char hostStr[128] = {0}; char hostStr[128] = {0};
ZeroMemory(hostStr, sizeof(hostStr)); ZeroMemory(hostStr, sizeof(hostStr));
@ -50,7 +135,7 @@ int Connector::_sshConnect(char *user, char *pass, char *host, int port)
return 0; return 0;
} }
char Connector::_get_ssh_banner(char *ip, int port) char _get_ssh_banner(char *ip, int port)
{ {
char recvBuff[256] = {0}; char recvBuff[256] = {0};
std::string buffer; std::string buffer;
@ -66,7 +151,7 @@ char Connector::_get_ssh_banner(char *ip, int port)
return *recvBuff; return *recvBuff;
} }
int Connector::check_ssh_pass(char *user, char *pass, char *userPass, char *host, int port, std::string *buffer, const char *banner) int check_ssh_pass(char *user, char *pass, char *userPass, char *host, int port, std::string *buffer, const char *banner)
{ {
int res = -1; int res = -1;
if(BALogSwitched) stt->doEmitionBAData("Probing SSH: " + QString(user) + ":" + QString(pass) + "@" + QString(host) + ":" + QString::number(port)); if(BALogSwitched) stt->doEmitionBAData("Probing SSH: " + QString(user) + ":" + QString(pass) + "@" + QString(host) + ":" + QString::number(port));
@ -84,7 +169,7 @@ int Connector::check_ssh_pass(char *user, char *pass, char *userPass, char *host
return res; return res;
} }
int Connector::_EstablishSSHConnection(char *host, int port, std::string *buffer, const char *banner) int _EstablishSSHConnection(char *host, int port, std::string *buffer, const char *banner)
{ {
char login[32] = {0}; char login[32] = {0};
char pass[32] = {0}; char pass[32] = {0};
@ -138,19 +223,101 @@ int Connector::_SSHLobby(char *ip, int port, std::string *buffer)
return -1; return -1;
} }
struct data {
char trace_ascii; /* 1 or 0 */
};
static
void dump(const char *text,
FILE *stream, unsigned char *ptr, size_t size,
char nohex)
{
size_t i;
size_t c;
unsigned int width=0x10;
if(nohex)
/* without the hex output, we can fit more on screen */
width = 0x40;
fprintf(stream, "%s, %10.10ld bytes (0x%8.8lx)\n",
text, (long)size, (long)size);
for(i=0; i<size; i+= width) {
fprintf(stream, "%4.4lx: ", (long)i);
if(!nohex) {
/* hex not disabled, show it */
for(c = 0; c < width; c++)
if(i+c < size)
fprintf(stream, "%02x ", ptr[i+c]);
else
fputs(" ", stream);
}
for(c = 0; (c < width) && (i+c < size); c++) {
/* check for 0D0A; if found, skip past and start a new line of output */
if (nohex && (i+c+1 < size) && ptr[i+c]==0x0D && ptr[i+c+1]==0x0A) {
i+=(c+2-width);
break;
}
fprintf(stream, "%c",
(ptr[i+c]>=0x20) && (ptr[i+c]<0x80)?ptr[i+c]:'.');
/* check again for 0D0A, to avoid an extra \n if it's at width */
if (nohex && (i+c+2 < size) && ptr[i+c+1]==0x0D && ptr[i+c+2]==0x0A) {
i+=(c+3-width);
break;
}
}
fputc('\n', stream); /* newline */
}
fflush(stream);
}
static
int my_trace(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userp)
{
struct data *config = (struct data *)userp;
const char *text;
(void)handle; /* prevent compiler warning */
switch (type) {
case CURLINFO_TEXT:
//fprintf(stderr, "== Info: %s", data);
default: /* in case a new one is introduced to shock us */
return 0;
}
if(MapWidgetOpened) stt->doEmitionAddOutData(QString("size"), QString(data));
dump(text, stderr, (unsigned char *)data, size, config->trace_ascii);
return 0;
}
static size_t nWriteCallback(void *contents, size_t size, size_t nmemb, void *userp) static size_t nWriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{ {
((std::string*)userp)->append((char*)contents, size * nmemb); ((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb; return size * nmemb;
} }
int Connector::nConnect(char *ip, int port, std::string *buffer,
const char *postData = NULL, int Connector::nConnect(const char *ip, const int port, std::string *buffer,
const std::vector<std::string> *customHeaders = NULL){ const char *postData,
const std::vector<std::string> *customHeaders){
CURL *curl = curl_easy_init(); CURL *curl = curl_easy_init();
struct data config;
config.trace_ascii = 1; /* enable ascii tracing */
if (curl) if (curl)
{ {
curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
curl_easy_setopt(curl, CURLOPT_URL, ip); curl_easy_setopt(curl, CURLOPT_URL, ip);
curl_easy_setopt(curl, CURLOPT_PORT, port); curl_easy_setopt(curl, CURLOPT_PORT, port);
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"); curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0");
@ -160,8 +327,11 @@ int Connector::nConnect(char *ip, int port, std::string *buffer,
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, nWriteCallback); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, nWriteCallback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer); curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
curl_easy_setopt(curl, CURLOPT_PROXY, "--"); int proxyPort = std::atoi(gProxyPort);
curl_easy_setopt(curl, CURLOPT_PROXYPORT, 3128); if(strlen(gProxyIP) != 0 && (proxyPort > 0 && proxyPort < 65535)) {
curl_easy_setopt(curl, CURLOPT_PROXY, gProxyIP);
curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxyPort);
}
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, gTimeOut); curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, gTimeOut);
curl_easy_setopt(curl, CURLOPT_TIMEOUT, gTimeOut); curl_easy_setopt(curl, CURLOPT_TIMEOUT, gTimeOut);
@ -175,15 +345,16 @@ int Connector::nConnect(char *ip, int port, std::string *buffer,
struct curl_slist *chunk = NULL; struct curl_slist *chunk = NULL;
for(auto &ch : customHeaders) { for(auto &ch : *customHeaders) {
chunk = curl_slist_append(chunk, *ch); chunk = curl_slist_append(chunk, ch.c_str());
} }
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
} }
curl_easy_perform(curl); curl_easy_perform(curl);
if(MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(buffer->c_str()));
curl_easy_cleanup(curl); curl_easy_cleanup(curl);
} else { } else {
stt->doEmitionRedFoundData("Curl error."); stt->doEmitionRedFoundData("Curl error.");

View File

@ -1,17 +1,14 @@
#ifndef CONNECTOR_H #ifndef CONNECTOR_H
#define CONNECTOR_H #define CONNECTOR_H
#include <mainResources.h>
#include <externData.h>
#include <STh.h>
class Connector { class Connector {
private:
int _sshConnect(char *user, char *pass, char *host, int port);
int _get_ssh_banner(char *ip, int port);
int check_ssh_pass(char *user, char *pass, char *userPass,
char *host, int port, std::string *buffer, const char *banner);
int _EstablishSSHConnection(char *host, int port, std::string *buffer, const char *banner);
public: public:
static int nConnect(char *ip, int port, std::string *buffer, static int nConnect(const char *ip, const int port, std::string *buffer,
const char *postData = NULL, const char *postData = NULL,
const std::vector<std::string> *customHeaders = NULL); const std::vector<std::string> *customHeaders = NULL);
static int _ConnectToPort(char *ip, int port, char *hl); static int _ConnectToPort(char *ip, int port, char *hl);

View File

@ -147,6 +147,6 @@ void DrawerTh_ME2Scanner::run()
Alive = 0; Alive = 0;
Susp = 0; Susp = 0;
}; };
msleep(120); msleep(90);
}; };
} }

View File

@ -1,11 +1,15 @@
#include <Utils.h> #include <Utils.h>
template<typename T> int Utils::ci_find_substr(const T& str1, char *getSystemProxy() {
const T& str2,
const std::locale& locale) {
auto it = std::search(str1.begin, str1.end, str2.begin, str2.end, }
my_equal<typename T::value_type>(locale));
if(it != str1.end()) return it - str1.begin(); int Utils::getProxyPort() {
else return -1; }
char * Utils::getProxy() {
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
#else
getSystemProxy();
#endif
} }

11
Utils.h
View File

@ -19,7 +19,16 @@ public:
// find substring (case insensitive) // find substring (case insensitive)
template<typename T> static int ci_find_substr(const T& str1, template<typename T> static int ci_find_substr(const T& str1,
const T& str2, const T& str2,
const std::locale& loc = std::locale()); const std::locale& loc = std::locale()) {
auto it = std::search(str1.begin(), str1.end(), str2.begin(), str2.end(),
my_equal<typename T::value_type>(loc));
if(it != str1.end()) return it - str1.begin();
else return -1;
}
char * getProxy();
int getProxyPort();
}; };
#endif // UTILS_H #endif // UTILS_H

View File

@ -1,5 +1,7 @@
#include <WebformWorker.h> #include <WebformWorker.h>
bool WFClass::active = false;
lopaStr WFClass::parseResponse(const char *ip, lopaStr WFClass::parseResponse(const char *ip,
const int port, const int port,
const std::string *buffer, const std::string *buffer,

View File

@ -6,6 +6,7 @@
#include <externFunctions.h> #include <externFunctions.h>
#include <Utils.h> #include <Utils.h>
#include "STh.h" #include "STh.h"
#include "Connector.h"
class WFClass { class WFClass {
@ -25,12 +26,12 @@ public:
++WF; ++WF;
BConInc(); BConInc();
active = true; this->active = true;
passCounter = 1; passCounter = 1;
} }
~WFClass(){ ~WFClass(){
active = false; this->active = false;
BConDec(); BConDec();
} }

View File

@ -900,7 +900,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
return lps; return lps;
} }
lopaStr _BALobby(char *cookie, char *ip, int port, char *path, char *method, char *data = NULL) lopaStr _BALobby(char *cookie, char *ip, int port, char *path, char *method)
{ {
while(BrutingThrds >= gMaxBrutingThreads) Sleep(700); while(BrutingThrds >= gMaxBrutingThreads) Sleep(700);
@ -1752,91 +1752,7 @@ lopaStr _IPCameraBLobby(char *ip, int port, char *SPEC)
} }
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
int _pingMyTarget(char *ip)
{
HANDLE hIcmpFile;
unsigned long ipaddr = INADDR_NONE;
DWORD dwRetVal = 0;
char SendData[32] = "Data Buffer";
LPVOID ReplyBuffer = NULL;
DWORD ReplySize = 0;
ipaddr = inet_addr(ip);
if (ipaddr == INADDR_NONE)
{
stt->doEmitionRedFoundData("[Pinger] INADDR_NONE! [" + QString(ip) + "]");
return 0;
}
hIcmpFile = IcmpCreateFile();
if (hIcmpFile == INVALID_HANDLE_VALUE)
{
stt->doEmitionRedFoundData("[Pinger] Unable to open handle. [" + QString::number(GetLastError()) + "]");
return 0;
}
ReplySize = sizeof(ICMP_ECHO_REPLY) + sizeof(SendData);
ReplyBuffer = (VOID*) malloc(ReplySize);
if (ReplyBuffer == NULL)
{
stt->doEmitionRedFoundData("[Pinger] Unable to allocate memory.");
return 0;
}
dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData),
NULL, ReplyBuffer, ReplySize, gPingTimeout*1000);
if (dwRetVal != 0) {
PICMP_ECHO_REPLY pEchoReply = (PICMP_ECHO_REPLY)ReplyBuffer;
struct in_addr ReplyAddr;
ReplyAddr.S_un.S_addr = pEchoReply->Address;
printf("\tSent icmp message to %s\n", "127.0.0.1");
if (dwRetVal > 1)
{
if(gDebugMode) stt->doEmitionYellowFoundData("[Pinger] Received " + QString::number(dwRetVal) + " icmp message responses.");
}
else
{
if(gDebugMode) stt->doEmitionYellowFoundData("[Pinger] Received " + QString::number(dwRetVal) + " icmp message responses.");
}
if(gDebugMode) stt->doEmitionYellowFoundData("[Pinger] Received from: " + QString(inet_ntoa( ReplyAddr )) + "; Status = " + QString::number(pEchoReply->Status) + "; Roundtrip time = " + QString::number(pEchoReply->RoundTripTime) + "ms.");
return 1;
}
else
{
printf("\tCall to IcmpSendEcho failed.\n");
printf("\tIcmpSendEcho returned error: %ld\n", GetLastError() );
if(gDebugMode) stt->doEmitionRedFoundData("[Pinger] Call to IcmpSendEcho failed. IcmpSendEcho returned error: " + QString::number(GetLastError()));
return 0;
};
}
#else
int _pingMyTarget(char *ip)
{
FILE *pipe = popen(("ping -w " + std::to_string(gPingTimeout) + " " + ip).c_str(), "r");
if(!pipe) {
stt->doEmitionRedFoundData("Ping pipe failed: cannot open pipe.");
perror("pipe");
return 0;
}
char buffer[128] = {0};
std::string result;
while(!feof(pipe)) {
if(fgets(buffer, 128, pipe) != NULL){
result += buffer;
}
}
pclose(pipe);
if(strstr((char*)result.c_str(), "100% packet loss") != NULL) return 0;
return 1;
}
#endif

View File

@ -23,7 +23,8 @@ extern volatile int BA, cons, BrutingThrds, gThreads;
extern char **loginLst, **passLst, **wfLoginLst, **wfPassLst, **sshlpLst, **GlobalNegatives; extern char **loginLst, **passLst, **wfLoginLst, **wfPassLst, **sshlpLst, **GlobalNegatives;
extern bool trackerOK, __savingBackUpFile, globalScanFlag, MapWidgetOpened, extern bool trackerOK, __savingBackUpFile, globalScanFlag, MapWidgetOpened,
widgetIsHidden, OnlineMsgSentFlag, utfIRCFlag, HTMLDebugMode, gNegDebugMode, widgetIsHidden, OnlineMsgSentFlag, utfIRCFlag, HTMLDebugMode, gNegDebugMode,
gDebugMode, horLineFlag, gPingNScan, gShuffle; gDebugMode, horLineFlag, gPingNScan, gShuffle,
BALogSwitched;
extern int found, indexIP, gMode, extern int found, indexIP, gMode,
MaxPass, MaxLogin, MaxWFLogin, MaxWFPass, MaxSSHPass, MaxPass, MaxLogin, MaxWFLogin, MaxWFPass, MaxSSHPass,
GlobalNegativeSize, isActive, gMaxBrutingThreads, GlobalNegativeSize, isActive, gMaxBrutingThreads,
@ -36,7 +37,8 @@ extern char trcSrv[256], trcScr[256], trcProxy[128], trcPersKey[32],
ircServer[32], ircPort[32], ircProxy[64], ircProxyPort[8], ircNick[32], ircServer[32], ircPort[32], ircProxy[64], ircProxyPort[8], ircNick[32],
trcPort[32], trcSrvPortLine[32], saveStartIP[128], saveEndIP[128], trcPort[32], trcSrvPortLine[32], saveStartIP[128], saveEndIP[128],
gRange[128], gFirstDom[128], gPorts[65536], endIP2[128], gRange[128], gFirstDom[128], gPorts[65536], endIP2[128],
gVER[16]; gVER[16],
gProxyIP[64], gProxyPort[8];
struct pl{ struct pl{
int loginCounter; int loginCounter;

View File

@ -6,7 +6,7 @@ extern void GetNicks();
extern int startScan(char* argv); extern int startScan(char* argv);
extern void BConInc(); extern void BConInc();
extern void BConDec(); extern void BConDec();
extern QString GetNSErrorDefinition(char *str, char *defin); extern QString GetNSErrorDefinition(const char *str, const char *defin);
extern void _SaveBackupToFile(); extern void _SaveBackupToFile();
extern char* strstri(const char *_Str, const char *_SubStr); extern char* strstri(const char *_Str, const char *_SubStr);
extern char* _getAttribute(char *str, char *attrib); extern char* _getAttribute(char *str, char *attrib);
@ -15,4 +15,5 @@ extern void nCleanup();
extern void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest); extern void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest);
extern void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest); extern void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest);
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage); extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage);
extern void _SaveBackupToFile();
//extern int nConnect(char *ip, int port, std::string *buffer); //extern int nConnect(char *ip, int port, std::string *buffer);

View File

@ -5,6 +5,7 @@
#include "externData.h" #include "externData.h"
#include "WebformWorker.h" #include "WebformWorker.h"
#include "Connector.h" #include "Connector.h"
#include <memory>
char* strstri(const char *_Str, const char *_SubStr) char* strstri(const char *_Str, const char *_SubStr)
{ {
@ -1322,7 +1323,7 @@ void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag,
}; };
} }
void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int flag, char *path, char *comment, char *cp, int recd, char *data) void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int flag, char *path, char *comment, char *cp, int recd)
{ {
isActive = 1; isActive = 1;
lopaStr lps; lopaStr lps;
@ -1333,8 +1334,8 @@ void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int
char tport[32] = {0}; char tport[32] = {0};
sprintf(tport, ":%d", port); sprintf(tport, ":%d", port);
if(strcmp(comment, "[DIGEST]") == 0) lps = _BALobby(cookie, ip, port, path, "[DIGEST]", data); if(strcmp(comment, "[DIGEST]") == 0) lps = _BALobby(cookie, ip, port, path, "[DIGEST]");
else lps = _BALobby(cookie, ip, port, path, "[NORMAL]", ""); else lps = _BALobby(cookie, ip, port, path, "[NORMAL]");
if(strstr(lps.login, "UNKNOWN") == NULL && strlen(lps.other) == 0) if(strstr(lps.login, "UNKNOWN") == NULL && strlen(lps.other) == 0)
{ {
@ -1725,47 +1726,47 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if(flag == 21) //Eyeon else if(flag == 21) //Eyeon
{ {
_specBrute(ps.cookie, ip, p, hl, "Eyeon Camera", flag, "/user/index.htm", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Eyeon Camera", flag, "/user/index.htm", "Basic Authorization", cp, recd);
} }
else if(flag == 22) //IP Camera control else if(flag == 22) //IP Camera control
{ {
_specBrute(ps.cookie, ip, p, hl, "IP camera Control webpage", flag, "/main/cs_motion.asp", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "IP camera Control webpage", flag, "/main/cs_motion.asp", "Basic Authorization", cp, recd);
} }
else if(flag == 23) //Network Camera BB-SC384 else if(flag == 23) //Network Camera BB-SC384
{ {
_specBrute(ps.cookie, ip, p, hl, "Network Camera BB-SC384", flag, "/live/index2.html", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Network Camera BB-SC384", flag, "/live/index2.html", "Basic Authorization", cp, recd);
} }
else if(flag == 24) //Network Camera VB-M40 else if(flag == 24) //Network Camera VB-M40
{ {
_specBrute(ps.cookie, ip, p, hl, "Network Camera VB-M40", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Network Camera VB-M40", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, recd);
} }
else if(flag == 25) //Panasonic WTFISTHISAreaOMGIDONTEVEN-camera else if(flag == 25) //Panasonic WTFISTHISAreaOMGIDONTEVEN-camera
{ {
_specBrute(ps.cookie, ip, 60002, hl, "Panasonic WTFISTHISAreaOMGIDONTEVEN-camera", flag, "/SnapshotJPEG", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, 60002, hl, "Panasonic WTFISTHISAreaOMGIDONTEVEN-camera", flag, "/SnapshotJPEG", "Basic Authorization", cp, recd);
} }
else if(flag == 26) //Sony Network Camera else if(flag == 26) //Sony Network Camera
{ {
_specBrute(ps.cookie, ip, p, hl, "Sony Network Camera", flag, "/oneshotimage?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Sony Network Camera", flag, "/oneshotimage?", "Basic Authorization", cp, recd);
} }
else if(flag == 27) //UA Network Camera else if(flag == 27) //UA Network Camera
{ {
_specBrute(ps.cookie, ip, p, hl, "UA Network Camera", flag, "/webs.cgi?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "UA Network Camera", flag, "/webs.cgi?", "Basic Authorization", cp, recd);
} }
else if(flag == 28) //Network Camera VB-M40 else if(flag == 28) //Network Camera VB-M40
{ {
_specBrute(ps.cookie, ip, p, hl, "Network Camera VB-??", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Network Camera VB-??", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, recd);
} }
else if(flag == 29) //LG Smart IP Device else if(flag == 29) //LG Smart IP Device
{ {
_specBrute(ps.cookie, ip, p, hl, "LG Smart IP Device Camera", flag, "/digest.php", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "LG Smart IP Device Camera", flag, "/digest.php", "Basic Authorization", cp, recd);
} }
else if(flag == 30) //NAS else if(flag == 30) //NAS
{ {
_specBrute(ps.cookie, ip, p, hl, "NAS", flag, "/cgi-bin/data/viostor-220/viostor/viostor.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "NAS", flag, "/cgi-bin/data/viostor-220/viostor/viostor.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 31) //ip cam else if(flag == 31) //ip cam
{ {
_specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/check_user.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/check_user.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 32) //IPC WEB ip cam else if(flag == 32) //IPC WEB ip cam
{ {
@ -1777,7 +1778,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if(flag == 34) //Hikvision ip cam else if(flag == 34) //Hikvision ip cam
{ {
_specBrute(ps.cookie, ip, p, hl, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, recd);
} }
else if(flag == 35) //EasyCam else if(flag == 35) //EasyCam
{ {
@ -1785,11 +1786,11 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if(flag == 36) //Panasonic Cam else if(flag == 36) //Panasonic Cam
{ {
_specBrute(ps.cookie, ip, p, hl, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 37) //Panasonic Cam else if(flag == 37) //Panasonic Cam
{ {
_specBrute(ps.cookie, ip, p, hl, "[Panasonic] IP Camera", flag, "/view/getuid.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Panasonic] IP Camera", flag, "/view/getuid.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 38) //Foscam else if(flag == 38) //Foscam
{ {
@ -1797,11 +1798,11 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if(flag == 39) //EagleEye else if(flag == 39) //EagleEye
{ {
_specBrute(ps.cookie, ip, p, hl, "[EagleEye] IP Camera", flag, "/cgi-bin/guest/Video.cgi?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[EagleEye] IP Camera", flag, "/cgi-bin/guest/Video.cgi?", "Basic Authorization", cp, recd);
} }
else if(flag == 40) //Network Camera VB-C?? else if(flag == 40) //Network Camera VB-C??
{ {
_specBrute(ps.cookie, ip, p, hl, "[Network Camera VB-C??] IP Camera", flag, "/admin/index.shtml?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Network Camera VB-C??] IP Camera", flag, "/admin/index.shtml?", "Basic Authorization", cp, recd);
} }
else if(flag == 41) //AVIOSYS-camera else if(flag == 41) //AVIOSYS-camera
{ {
@ -1809,19 +1810,19 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if(flag == 42) //NW_camera else if(flag == 42) //NW_camera
{ {
_specBrute(ps.cookie, ip, p, hl, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "Basic Authorization", cp, recd);
} }
else if(flag == 43) //NW_camera else if(flag == 43) //NW_camera
{ {
_specBrute(ps.cookie, ip, p, hl, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "Basic Authorization", cp, recd);
} }
else if(flag == 44) //Hikvision ip cam 2 else if(flag == 44) //Hikvision ip cam 2
{ {
_specBrute(ps.cookie, ip, p, hl, "[Hikvision] IP Camera 2", flag, "/ISAPI/Security/userCheck", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Hikvision] IP Camera 2", flag, "/ISAPI/Security/userCheck", "Basic Authorization", cp, recd);
} }
else if(flag == 45) //Panasonic ip cam else if(flag == 45) //Panasonic ip cam
{ {
_specBrute(ps.cookie, ip, p, hl, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 46) //Buffalo disk else if(flag == 46) //Buffalo disk
{ {
@ -1841,39 +1842,39 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if (flag == 50) //IP Camera else if (flag == 50) //IP Camera
{ {
_specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/app/multi/single.asp", "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?", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, recd);
} }
else if(flag == 19) //reecam cameras else if(flag == 19) //reecam cameras
{ {
_specBrute(ps.cookie, ip, p, hl, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 18) //linksys camera else if(flag == 18) //linksys camera
{ {
_specBrute(ps.cookie, ip, p, hl, "Linksys camera", flag, "/img/main.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Linksys camera", flag, "/img/main.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 17) //Real-time IP Camera Monitoring System else if(flag == 17) //Real-time IP Camera Monitoring System
{ {
_specBrute(ps.cookie, ip, p, hl, "Real-time IP Camera Monitoring System", flag, "/live.htm", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Real-time IP Camera Monitoring System", flag, "/live.htm", "Basic Authorization", cp, recd);
} }
else if(flag == 11) else if(flag == 11)
{ {
_specBrute(ps.cookie, ip, p, hl, "Netwave IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "Netwave IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 12) else if(flag == 12)
{ {
_specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/view/view.shtml?videos=", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/view/view.shtml?videos=", "Basic Authorization", cp, recd);
} }
else if(flag == 13) else if(flag == 13)
{ {
_specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/eng/view/indexjava.html", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/eng/view/indexjava.html", "Basic Authorization", cp, recd);
} }
else if(flag == 14) else if(flag == 14)
{ {
_specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/rdr.cgi", "Basic Authorization", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, "IP Camera", flag, "/rdr.cgi", "Basic Authorization", cp, recd);
} }
else if(flag == 15) //For HFS else if(flag == 15) //For HFS
{ {
@ -1882,7 +1883,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
isActive = 1; isActive = 1;
++AnomC1; ++AnomC1;
lps = _BALobby(ps.cookie, ip, p, "/~login", "[NORMAL]", ""); lps = _BALobby(ps.cookie, ip, p, "/~login", "[NORMAL]");
sprintf(log, "[HFS]:<font color=\"#ff6600\">%s :: </font><a href=\"http://%s:%s/\"><span style=\"color: #a1a1a1;\">%s:%s</span></a><font color=\"#0084ff\"> T: </font><font color=\"#ff9600\">%s Pass: %s:%s</font>", sprintf(log, "[HFS]:<font color=\"#ff6600\">%s :: </font><a href=\"http://%s:%s/\"><span style=\"color: #a1a1a1;\">%s:%s</span></a><font color=\"#0084ff\"> T: </font><font color=\"#ff9600\">%s Pass: %s:%s</font>",
hl, ip, port, ip, port, finalstr, lps.login, lps.pass); hl, ip, port, ip, port, finalstr, lps.login, lps.pass);
@ -1910,11 +1911,11 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
} }
else if(flag == 1) else if(flag == 1)
{ {
_specBrute(ps.cookie, ip, p, hl, finalstr, flag, pps, "[NORMAL]", cp, recd, ""); _specBrute(ps.cookie, ip, p, hl, finalstr, flag, pps, "[NORMAL]", cp, recd);
} }
else if(flag == 101) else if(flag == 101)
{ {
_specBrute(ps.cookie, ip, p, hl, finalstr, flag, pps, "[DIGEST]", cp, recd, buffcpy); _specBrute(ps.cookie, ip, p, hl, finalstr, flag, pps, "[DIGEST]", cp, recd);
} }
else if(flag == 10) else if(flag == 10)
{ {
@ -1929,11 +1930,6 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
return flag; return flag;
} }
const char *rbuff1 = "GET ";
const char *rbuff2 = " HTTP/1.1\r\nHost: ";
const char *rbuff3 = "\r\nCookie:";
const char *rbuff4 = "\r\nAccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Language: us-US,ru;q=0.9,en;q=0.8\r\nAccept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\nAccept-Encoding: text, identity, *;q=0\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11\r\nConnection: close\r\n\r\n";
int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, PathStr *ps, std::vector<std::string> *redirStrLst, char *buff) int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, PathStr *ps, std::vector<std::string> *redirStrLst, char *buff)
{ {
if(ls->iterationCount++ == 5) if(ls->iterationCount++ == 5)
@ -1950,7 +1946,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
strcpy(tempIP, ip); strcpy(tempIP, ip);
int tempPort = port; int tempPort = port;
char tempPath[1024] = {0}; char tempPath[1024] = {0};
char mes[2048]= {0};
if(strstri(str, "https://") != NULL) if(strstri(str, "https://") != NULL)
{ {
@ -2002,32 +1997,16 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
strcpy(tempPath, "/"); strcpy(tempPath, "/");
}; };
strcpy(mes, rbuff1); std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
if(tempPath[0] != '/') strcat(mes, "/"); sprintf(nip.get(), "%s%s", tempIP, tempPath);
strcat(mes, tempPath);
strcat(mes, rbuff2);
strcat(mes, tempIP);
if(tempPort != 80){
strcat(mes, ":");
char tbuff[16] = {0};
sprintf(tbuff, "%d", tempPort);
strcat(mes, tbuff);
}
if(strlen(cookie) != 0)
{
strcat(mes, rbuff3);
strcat(mes, cookie);
};
strcat(mes, rbuff4);
std::string buffer; std::string buffer;
int cSz = Connector::nConnect(tempIP, tempPort, buffer); int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
if(cSz > -1) if(cSz > -1)
{ {
strncpy(buff, buffer.c_str(), (cSz < 65535 ? cSz : 65535)); strncpy(buff, buffer.c_str(), (cSz < 65535 ? cSz : 65535));
strcpy(ps->codepage, GetCodePage(buff)); strcpy(ps->codepage, GetCodePage(buff));
ls->flag = ContentFilter(cstr.lowerBuff, tempPort, tempIP, ps->codepage); ls->flag = ContentFilter(buff, tempPort, tempIP, ps->codepage);
ps->flag = ls->flag; ps->flag = ls->flag;
if(ls->flag == -1) if(ls->flag == -1)
@ -2058,7 +2037,7 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
strcat(ps->headr, " -> "); strcat(ps->headr, " -> ");
strcat(ps->headr, GetTitle(buff)); strcat(ps->headr, GetTitle(buff));
if (ls->_header(tempIP, tempPort, cstr.lowerBuff, ls, ps, redirStrLst, buff) == -1) if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
{ {
ps->flag = -1; ps->flag = -1;
strcpy(ps->headr, "[IGNR_ADDR]"); strcpy(ps->headr, "[IGNR_ADDR]");
@ -2068,16 +2047,16 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
}; };
ps->port = tempPort; ps->port = tempPort;
if(strlen(buff) < 1) // if(strlen(buff) < 1)
{ // {
ps->flag = 3; // ps->flag = 3;
ls->flag = 3; // ls->flag = 3;
} // }
else if(cstr.overflow == true) // else if(cstr.overflow == true)
{ // {
ls->flag = 0; // ls->flag = 0;
ps->flag = 0; // ps->flag = 0;
}; // };
} }
else else
{ {
@ -2113,6 +2092,7 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
strcpy(tempPath, "/"); strcpy(tempPath, "/");
sz = ptr2 - ptr1 - 7; sz = ptr2 - ptr1 - 7;
}; };
char tPort[8] = {0}; char tPort[8] = {0};
strncpy(tPort, ptr2 + 1, sz < 8 ? sz : 5); strncpy(tPort, ptr2 + 1, sz < 8 ? sz : 5);
tempPort = atoi(tPort); tempPort = atoi(tPort);
@ -2138,32 +2118,16 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
strcpy(tempPath, "/"); strcpy(tempPath, "/");
}; };
strcpy(mes, rbuff1); std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
if(tempPath[0] != '/') strcat(mes, "/"); sprintf(nip.get(), "%s%s", tempIP, tempPath);
strcat(mes, tempPath);
strcat(mes, rbuff2);
strcat(mes, tempIP);
if(tempPort != 80){
strcat(mes, ":");
char tbuff[16] = {0};
sprintf(tbuff, "%d", tempPort);
strcat(mes, tbuff);
}
if(strlen(cookie) != 0)
{
strcat(mes, rbuff3);
strcat(mes, cookie);
};
strcat(mes, rbuff4);
std::string buffer; std::string buffer;
int cSz = Connector::nConnect(tempIP, tempPort, buffer); int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
if(cSz > -1) if(cSz > -1)
{ {
strncpy(buff, cstr.lowerBuff, (cSz< 65535 ? cSz : 65535)); strncpy(buff, buffer.c_str(), (cSz < 65535 ? cSz : 65535));
strcpy(ps->codepage, GetCodePage(cstr.lowerBuff)); strcpy(ps->codepage, GetCodePage(buff));
ls->flag = ContentFilter(cstr.lowerBuff, tempPort, tempIP, ps->codepage); ls->flag = ContentFilter(buff, tempPort, tempIP, ps->codepage);
ps->flag = ls->flag; ps->flag = ls->flag;
if(ls->flag == -1) if(ls->flag == -1)
@ -2177,7 +2141,7 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
if(ls->flag >= 17 || ls->flag == 11 || ls->flag == 12 if(ls->flag >= 17 || ls->flag == 11 || ls->flag == 12
|| ls->flag == 13 || ls->flag == 14 || ls->flag == 1 || ls->flag == 10) || ls->flag == 13 || ls->flag == 14 || ls->flag == 1 || ls->flag == 10)
{ {
strcat(ps->headr, GetTitle(cstr.lowerBuff)); strcat(ps->headr, GetTitle(buff));
ps->flag = ls->flag; ps->flag = ls->flag;
strcpy(ps->path, tempPath); strcpy(ps->path, tempPath);
ps->port = tempPort; ps->port = tempPort;
@ -2191,9 +2155,11 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
ps->port = tempPort; ps->port = tempPort;
return -2; return -2;
}; };
strcat(ps->headr, " -> "); strcat(ps->headr, " -> ");
strcat(ps->headr, GetTitle(cstr.lowerBuff)); strcat(ps->headr, GetTitle(buff));
if (ls->_header(tempIP, tempPort, cstr.lowerBuff, ls, ps, redirStrLst, buff) == -1)
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
{ {
ps->flag = -1; ps->flag = -1;
strcpy(ps->headr, "[IGNR_ADDR]"); strcpy(ps->headr, "[IGNR_ADDR]");
@ -2203,16 +2169,16 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
}; };
ps->port = tempPort; ps->port = tempPort;
if(strlen(buff) < 1) // if(strlen(buff) < 1)
{ // {
ps->flag = 3; // ps->flag = 3;
ls->flag = 3; // ls->flag = 3;
} // }
else if(cstr.overflow == true) // else if(cstr.overflow == true)
{ // {
ls->flag = 0; // ls->flag = 0;
ps->flag = 0; // ps->flag = 0;
}; // };
} }
else else
{ {
@ -2220,6 +2186,7 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
ls->flag = -1; ls->flag = -1;
if(gNegDebugMode) stt->doEmitionDebugFoundData("[<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\"><font color=\"#0084ff\">" + QString(ip) + ":" + QString::number(port) + "</font></a>" + "] Rejecting in _header::redirect [Dead host]."); if(gNegDebugMode) stt->doEmitionDebugFoundData("[<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\"><font color=\"#0084ff\">" + QString(ip) + ":" + QString::number(port) + "</font></a>" + "] Rejecting in _header::redirect [Dead host].");
}; };
return -2; return -2;
} }
else if(str[0] == '/' || (str[0] == '.' && str[1] == '/') || (str[0] == '.' && str[1] == '.' && str[2] == '/')) else if(str[0] == '/' || (str[0] == '.' && str[1] == '/') || (str[0] == '.' && str[1] == '.' && str[2] == '/'))
@ -2228,43 +2195,16 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
else if(str[0] == '.') strcpy(tempPath, str + 1); else if(str[0] == '.') strcpy(tempPath, str + 1);
else strcpy(tempPath, str); else strcpy(tempPath, str);
strcpy(mes, rbuff1); std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
if(tempPath[0] != '/') strcat(mes, "/"); sprintf(nip.get(), "%s%s", tempIP, tempPath);
strcat(mes, tempPath); std::string buffer;
strcat(mes, rbuff2); int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
strcat(mes, ip); if(cSz > -1)
if(tempPort != 80){
strcat(mes, ":");
char tbuff[16] = {0};
sprintf(tbuff, "%d", tempPort);
strcat(mes, tbuff);
}
if(strlen(cookie) != 0)
{ {
strcat(mes, rbuff3); strncpy(buff, buffer.c_str(), (cSz < 65535 ? cSz : 65535));
strcat(mes, cookie); strcpy(ps->codepage, GetCodePage(buff));
};
strcat(mes, rbuff4);
conSTR cstr; ls->flag = ContentFilter(buff, port, ip, ps->codepage);
cstr.size = 0;
cstr.lowerBuff = NULL;
int cRes = 0;
if(port == 443) cRes = con._EstablishSSLConnection(ip, 443, mes, &cstr);
else cRes = con._EstablishConnection(ip, port, mes, &cstr);
if(cstr.size < 65535)
{
strncpy(buff, cstr.lowerBuff, cstr.size);
}
else
{
strncpy(buff, cstr.lowerBuff, 65535);
};
if(cRes > -1)
{
strcpy(ps->codepage, GetCodePage(cstr.lowerBuff));
ls->flag = ContentFilter(cstr.lowerBuff, port, ip, ps->codepage);
ps->flag = ls->flag; ps->flag = ls->flag;
if(ls->flag == -1) if(ls->flag == -1)
@ -2272,17 +2212,16 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
ps->flag = -1; ps->flag = -1;
strcpy(ps->headr, "[IGNR_ADDR]"); strcpy(ps->headr, "[IGNR_ADDR]");
strcpy(ps->path, tempPath); strcpy(ps->path, tempPath);
delete []cstr.lowerBuff;
return -2; return -2;
}; };
if(ls->flag >= 17 || ls->flag == 11 || ls->flag == 12 if(ls->flag >= 17 || ls->flag == 11 || ls->flag == 12
|| ls->flag == 13 || ls->flag == 14 || ls->flag == 1 || ls->flag == 10) || ls->flag == 13 || ls->flag == 14 || ls->flag == 1 || ls->flag == 10)
{ {
strcat(ps->headr, GetTitle(cstr.lowerBuff)); strcat(ps->headr, GetTitle(buff));
ps->flag = ls->flag; ps->flag = ls->flag;
strcpy(ps->path, tempPath); strcpy(ps->path, tempPath);
delete []cstr.lowerBuff;
ps->port = port; ps->port = port;
strcpy(ps->ip, ip); strcpy(ps->ip, ip);
@ -2294,30 +2233,30 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
ps->port = tempPort; ps->port = tempPort;
return -2; return -2;
}; };
strcat(ps->headr, "->"); strcat(ps->headr, "->");
strcat(ps->headr, GetTitle(cstr.lowerBuff)); strcat(ps->headr, GetTitle(buff));
if (ls->_header(tempIP, tempPort, cstr.lowerBuff, ls, ps, redirStrLst, buff) == -1)
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
{ {
ps->flag = -1; ps->flag = -1;
strcpy(ps->headr, "[IGNR_ADDR]"); strcpy(ps->headr, "[IGNR_ADDR]");
strcpy(ps->path, tempPath); strcpy(ps->path, tempPath);
delete[]cstr.lowerBuff;
return -1; return -1;
}; };
ps->port = tempPort; ps->port = tempPort;
if(strlen(cstr.lowerBuff) < 1) // if(strlen(buff) < 1)
{ // {
ps->flag = 3; // ps->flag = 3;
ls->flag = 3; // ls->flag = 3;
} // }
else if(cstr.overflow == true) // else if(cstr.overflow == true)
{ // {
ls->flag = 0; // ls->flag = 0;
ps->flag = 0; // ps->flag = 0;
}; // };
delete []cstr.lowerBuff;
} }
else else
{ {
@ -2329,41 +2268,22 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
} }
else if(strlen(str) > 2) else if(strlen(str) > 2)
{ {
strcpy(tempPath, str); std::unique_ptr<char[]> nip(new char[strlen(ip) + strlen(str) + 1]);
strcpy(mes, rbuff1); sprintf(nip.get(), "%s%s", ip, str);
if(tempPath[0] != '/') strcat(mes, "/"); std::string buffer;
strcat(mes, tempPath); int cSz = Connector::nConnect(nip.get(), port, &buffer);
strcat(mes, rbuff2); if(cSz > -1)
strcat(mes, ip);
if(tempPort != 80){
strcat(mes, ":");
char tbuff[16] = {0};
sprintf(tbuff, "%d", tempPort);
strcat(mes, tbuff);
}
if(strlen(cookie) != 0)
{ {
strcat(mes, rbuff3); strncpy(buff, buffer.c_str(), (cSz < 65535 ? cSz : 65535));
strcat(mes, cookie); strcpy(ps->codepage, GetCodePage(buff));
};
strcat(mes, rbuff4);
conSTR cstr; ls->flag = ContentFilter(buff, port, ip, ps->codepage);
cstr.size = 0;
cstr.lowerBuff = NULL;
if(con._EstablishConnection(ip, port, mes, &cstr) != -1)
{
strncpy(buff, cstr.lowerBuff, (cstr.size < 65535 ? cstr.size : 65535));
strcpy(ps->codepage, GetCodePage(cstr.lowerBuff));
ls->flag = ContentFilter(cstr.lowerBuff, port, ip, ps->codepage);
ps->flag = ls->flag; ps->flag = ls->flag;
if(ls->flag == -1) if(ls->flag == -1)
{ {
ps->flag = -1; ps->flag = -1;
strcpy(ps->headr, "[IGNR_ADDR]"); strcpy(ps->headr, "[IGNR_ADDR]");
strcpy(ps->path, tempPath); strcpy(ps->path, tempPath);
delete []cstr.lowerBuff;
return -1; return -1;
}; };
@ -2371,10 +2291,9 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
if(ls->flag >= 17 || ls->flag == 11 || ls->flag == 12 if(ls->flag >= 17 || ls->flag == 11 || ls->flag == 12
|| ls->flag == 13 || ls->flag == 14 || ls->flag == 1 || ls->flag == 10) || ls->flag == 13 || ls->flag == 14 || ls->flag == 1 || ls->flag == 10)
{ {
strcat(ps->headr, GetTitle(cstr.lowerBuff)); strcat(ps->headr, GetTitle(buff));
ps->flag = ls->flag; ps->flag = ls->flag;
strcpy(ps->path, tempPath); strcpy(ps->path, tempPath);
delete []cstr.lowerBuff;
ps->port = port; ps->port = port;
strcpy(ps->ip, ip); strcpy(ps->ip, ip);
@ -2387,23 +2306,22 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
ps->port = tempPort; ps->port = tempPort;
return -2; return -2;
}; };
strcat(ps->headr, " -> "); strcat(ps->headr, " -> ");
strcat(ps->headr, GetTitle(cstr.lowerBuff)); strcat(ps->headr, GetTitle(buff));
ls->_header(ip, port, cstr.lowerBuff, ls, ps, redirStrLst, buff); ls->_header(ip, port, buff, ls, ps, redirStrLst, buff);
ps->port = tempPort; ps->port = tempPort;
if(strlen(cstr.lowerBuff) < 1) // if(strlen(buff) < 1)
{ // {
ps->flag = 3; // ps->flag = 3;
ls->flag = 3; // ls->flag = 3;
} // }
else if(cstr.overflow == true) // else if(cstr.overflow == true)
{ // {
ls->flag = 0; // ls->flag = 0;
ps->flag = 0; // ps->flag = 0;
}; // };
delete []cstr.lowerBuff;
} }
else else
{ {

View File

@ -158,5 +158,5 @@ class Connector_old
extern lopaStr _IPCameraBLobby(char *ip, int port, char *SPEC); extern lopaStr _IPCameraBLobby(char *ip, int port, char *SPEC);
extern lopaStr _BALobby(char *cookie, char *ip, int port, char *path, char *method, char *data = NULL); extern lopaStr _BALobby(char *cookie, char *ip, int port, char *path, char *method);
extern lopaStr _FTPLobby(char *ip, int port, PathStr *ps); extern lopaStr _FTPLobby(char *ip, int port, PathStr *ps);

View File

@ -7,7 +7,7 @@
void MSGCheckerThread::doEmitionShowNewMsg(QString str) void MSGCheckerThread::doEmitionShowNewMsg(QString str)
{ {
emit mct->showNewMsg(str); emit mct->showNewMsg(str);
}; }
void _getNewMsg() void _getNewMsg()
{ {

View File

@ -35,10 +35,10 @@ SOURCES +=\
STh.cpp \ STh.cpp \
vercheckerthread.cpp \ vercheckerthread.cpp \
finder.cpp \ finder.cpp \
Utils.cpp \
WebformWorker.cpp \ WebformWorker.cpp \
Connector.cpp \ Connector.cpp \
connector_old.cpp connector_old.cpp \
Utils.cpp
HEADERS += ActivityDrawerTh_HorNet.h \ HEADERS += ActivityDrawerTh_HorNet.h \

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.2.1, 2015-03-02T17:28:39. --> <!-- Written by QtCreator 3.2.1, 2015-03-06T17:32:08. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>

View File

@ -35,6 +35,8 @@ int ver = 100*(100*(date.year()%100) + date.month()) + date.day();
#define WIDGET_WIDTH 500 #define WIDGET_WIDTH 500
//#define IRC_CHAN "iskopasi_lab01" //#define IRC_CHAN "iskopasi_lab01"
bool utfIRCFlag = true; bool utfIRCFlag = true;
bool HTMLDebugMode = false; bool HTMLDebugMode = false;
bool code160 = false; bool code160 = false;
@ -74,6 +76,8 @@ char trcProxy[128] = {0};
char trcSrv[256] = {0}; char trcSrv[256] = {0};
char trcScr[256] = {0}; char trcScr[256] = {0};
char trcPersKey[32] = {0}; char trcPersKey[32] = {0};
char gProxyIP[64] = {0};
char gProxyPort[8] = {0};
SOCKET lSock; SOCKET lSock;
@ -738,9 +742,9 @@ void nesca_3::slotAddLine(int x1, int y1, int x2, int y2)
void nesca_3::slotAddPolyLine() void nesca_3::slotAddPolyLine()
{ {
sceneGraph->setItemIndexMethod(QGraphicsScene::NoIndex);
if(ME2ScanFlag) if(ME2ScanFlag)
{ {
double uu = 0.0;
QPainterPath path; QPainterPath path;
if(vect.size() > 0) if(vect.size() > 0)
{ {
@ -752,22 +756,24 @@ void nesca_3::slotAddPolyLine()
}; };
QGraphicsPathItem* itm = new QGraphicsPathItem(path); QGraphicsPathItem* itm = new QGraphicsPathItem(path);
itm->setPen(pen2i); itm->setPen(pen2i);
int vSz = sceneGraph->items().size(); sceneGraph->addItem(itm);
double uu = 0.0;
int vSz = sceneGraph->items().count();
for(int i = 0; i < vSz; ++i) for(int i = 0; i < vSz; ++i)
{ {
sceneGraph->items()[i]->setY(u + i + 1); sceneGraph->items()[i]->setY(u + i + 1);
sceneGraph->items()[i]->setOpacity(1 - uu); sceneGraph->items()[i]->setOpacity(0 + uu);
uu += 0.027; uu += 0.027;
u += 1; u += 1;
}; };
sceneGraph->addItem(itm);
if(vSz == 50) while(sceneGraph->items().count() > 38)
{ {
sceneGraph->items().pop_back(); sceneGraph->removeItem(sceneGraph->items().first());
}; };
if(u > 10) u = 1; if(u > 10) u = 1;
}; };
} }
@ -2977,6 +2983,21 @@ void nesca_3::ConnectEvrthng()
connect ( irc_nmb, SIGNAL(sBlinkMessage()), this, SLOT(slotBlinkMessage()) ); connect ( irc_nmb, SIGNAL(sBlinkMessage()), this, SLOT(slotBlinkMessage()) );
} }
QString loadNescaSetup(char *resStr, char *option) {
char *lex = NULL;
if(strstr(resStr, option) != NULL)
{
lex = strstr(resStr, option) + strlen(option);
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
return QString(lex);
} return "";
}
return "";
}
void RestoreSession() void RestoreSession()
{ {
FILE *resFile = fopen("restore", "r"); FILE *resFile = fopen("restore", "r");
@ -2985,7 +3006,6 @@ void RestoreSession()
if(resFile != NULL) if(resFile != NULL)
{ {
stt->doEmitionYellowFoundData("Previous session file found! Restoring..."); stt->doEmitionYellowFoundData("Previous session file found! Restoring...");
while(fgets(resStr, 128, resFile) != NULL) while(fgets(resStr, 128, resFile) != NULL)
@ -3087,176 +3107,32 @@ void RestoreSession()
}; };
}; };
if(strstr(resStr, "[NDBSERVER]:") != NULL) if(strstr(resStr, "[NDBSERVER]:") != NULL) ui->lineTrackerSrv->setText(loadNescaSetup(resStr, "[NDBSERVER]:").simplified());
{ if(strstr(resStr, "[NDBSCRIPT]:") != NULL) ui->lineTrackerScr->setText(loadNescaSetup(resStr, "[NDBSCRIPT]:").simplified());
lex = strstr(resStr, "[NDBSERVER]:") + strlen("[NDBSERVER]:"); if(strstr(resStr, "[NDBPORT]:") != NULL) ui->trcSrvPortLine->setText(loadNescaSetup(resStr, "[NDBPORT]:").simplified());
if(strstr(resStr, "[PING]:") != NULL) ui->pingingOnOff->setText(loadNescaSetup(resStr, "[PING]:").simplified());
if(strlen(lex) > 1) if(strstr(resStr, "[PING_TO]:") != NULL) ui->PingTO->setText(loadNescaSetup(resStr, "[PING_TO]:").simplified());
{ if(strstr(resStr, "[THREAD_DELAY]:") != NULL) ui->threadDelayBox->setText(loadNescaSetup(resStr, "[THREAD_DELAY]:").simplified());
lex[strlen(lex) - 1] = '\0'; if(strstr(resStr, "[TIMEOUT]:") != NULL) {
ui->lineTrackerSrv->setText(QString(lex)); ui->iptoLine_value->setText(loadNescaSetup(resStr, "[TIMEOUT]:"));
}; ui->iptoLine_value_2->setText(loadNescaSetup(resStr, "[TIMEOUT]:"));
ui->iptoLine_value_3->setText(loadNescaSetup(resStr, "[TIMEOUT]:"));
} }
else if(strstr(resStr, "[NDBSCRIPT]:") != NULL) if(strstr(resStr, "[MAXBTHR]:") != NULL) ui->maxBrutingThrBox->setText(loadNescaSetup(resStr, "[MAXBTHR]:").simplified());
{ if(strstr(resStr, "[PERSKEY]:") != NULL) ui->linePersKey->setText(loadNescaSetup(resStr, "[PERSKEY]:").simplified());
lex = strstr(resStr, "[NDBSCRIPT]:") + strlen("[NDBSCRIPT]:"); if(strstr(resStr, "[IRCSERVER]:") != NULL) ui->ircServerBox->setText(loadNescaSetup(resStr, "[IRCSERVER]:").simplified());
if(strstr(resStr, "[IRCPORT]:") != NULL) ui->serverPortBox->setText(loadNescaSetup(resStr, "[IRCPORT]:").simplified());
if(strstr(resStr, "[IRCPROXY]:") != NULL) ui->ircProxy->setText(loadNescaSetup(resStr, "[IRCPROXY]:").simplified());
if(strstr(resStr, "[IRCPROXYPORT]:") != NULL) ui->ircProxyPort->setText(loadNescaSetup(resStr, "[IRCPROXYPORT]:").simplified());
if(strstr(resStr, "[SYSTEMPROXYIP]:") != NULL) ui->systemProxyIP->setText(loadNescaSetup(resStr, "[SYSTEMPROXYIP]:").simplified());
if(strstr(resStr, "[SYSTEMPROXYPORT]:") != NULL) ui->systemProxyPort->setText(loadNescaSetup(resStr, "[SYSTEMPROXYPORT]:").simplified());
if(strstr(resStr, "[IRCNICK]:") != NULL) ui->ircNickBox->setText(loadNescaSetup(resStr, "[IRCNICK]:").simplified());
ZeroMemory(resStr, sizeof(resStr));
};
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->lineTrackerScr->setText(QString(lex));
};
}
else if(strstr(resStr, "[NDBPORT]:") != NULL)
{
lex = strstr(resStr, "[NDBPORT]:") + strlen("[NDBPORT]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->trcSrvPortLine->setText(QString(lex));
};
}
else if(strstr(resStr, "[PROXY]:") != NULL)
{
lex = strstr(resStr, "[PROXY]:") + strlen("[PROXY]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
};
}
else if(strstr(resStr, "[PROXYPORT]:") != NULL)
{
lex = strstr(resStr, "[PROXYPORT]:") + strlen("[PROXYPORT]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
};
}
else if(strstr(resStr, "[PING]:") != NULL)
{
lex = strstr(resStr, "[PING]:") + strlen("[PING]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->pingingOnOff->setChecked(strcmp(lex, "true") == 0 ? true : false);
};
}
else if(strstr(resStr, "[PING_TO]:") != NULL)
{
lex = strstr(resStr, "[PING_TO]:") + strlen("[PING_TO]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->PingTO->setText(QString(lex));
};
}
else if(strstr(resStr, "[THREAD_DELAY]:") != NULL)
{
lex = strstr(resStr, "[THREAD_DELAY]:") + strlen("[THREAD_DELAY]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->threadDelayBox->setText(QString(lex));
};
}
else if(strstr(resStr, "[TIMEOUT]:") != NULL)
{
lex = strstr(resStr, "[TIMEOUT]:") + strlen("[TIMEOUT]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->iptoLine_value->setText(QString(lex));
ui->iptoLine_value_2->setText(QString(lex));
ui->iptoLine_value_3->setText(QString(lex));
};
}
else if(strstr(resStr, "[MAXBTHR]:") != NULL)
{
lex = strstr(resStr, "[MAXBTHR]:") + strlen("[MAXBTHR]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->maxBrutingThrBox->setText(QString(lex));
};
}
else if(strstr(resStr, "[PERSKEY]:") != NULL)
{
lex = strstr(resStr, "[PERSKEY]:") + strlen("[PERSKEY]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->linePersKey->setText(QString(lex));
};
}
else if(strstr(resStr, "[IRCSERVER]:") != NULL)
{
lex = strstr(resStr, "[IRCSERVER]:") + strlen("[IRCSERVER]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->ircServerBox->setText(QString(lex));
};
}
else if(strstr(resStr, "[IRCPORT]:") != NULL)
{
lex = strstr(resStr, "[IRCPORT]:") + strlen("[IRCPORT]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->serverPortBox->setText(QString(lex));
};
}
else if(strstr(resStr, "[IRCPROXY]:") != NULL)
{
lex = strstr(resStr, "[IRCPROXY]:") + strlen("[IRCPROXY]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->ircProxy->setText(QString(lex));
};
}
else if(strstr(resStr, "[IRCPROXYPORT]:") != NULL)
{
lex = strstr(resStr, "[IRCPROXYPORT]:") + strlen("[IRCPROXYPORT]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->ircProxyPort->setText(QString(lex));
};
}
else if(strstr(resStr, "[IRCNICK]:") != NULL)
{
lex = strstr(resStr, "[IRCNICK]:") + strlen("[IRCNICK]:");
if(strlen(lex) > 1)
{
lex[strlen(lex) - 1] = '\0';
ui->ircNickBox->setText(QString(lex));
}
else
{
ui->ircNickBox->setText("ns_" + QString::number(qrand() % 8999 + 1000 ));
};
};
};
fclose(resFile); fclose(resFile);
stt->doEmitionGreenFoundData("Previous session restored."); stt->doEmitionGreenFoundData("Previous session restored.");
}; };
} }
@ -3336,13 +3212,6 @@ void _startMsgCheck()
mct->start(); mct->start();
} }
static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
{
((std::string*)userp)->append((char*)contents, size * nmemb);
return size * nmemb;
}
nesca_3::nesca_3(QWidget *parent) : QMainWindow(parent) nesca_3::nesca_3(QWidget *parent) : QMainWindow(parent)
{ {
setWindowFlags ( Qt::FramelessWindowHint ); setWindowFlags ( Qt::FramelessWindowHint );
@ -3500,8 +3369,6 @@ void nesca_3::saveOptions()
{ {
int ci = ui->tabMainWidget->currentIndex(); int ci = ui->tabMainWidget->currentIndex();
if(ci == 0) if(ci == 0)
{ {
ZeroMemory(saveStartIP, sizeof(saveStartIP)); ZeroMemory(saveStartIP, sizeof(saveStartIP));
@ -3570,6 +3437,10 @@ void nesca_3::saveOptions()
strcpy(ircProxy, ui->ircProxy->text().toLocal8Bit().data()); strcpy(ircProxy, ui->ircProxy->text().toLocal8Bit().data());
strcpy(ircProxyPort, ui->ircProxyPort->text().toLocal8Bit().data()); strcpy(ircProxyPort, ui->ircProxyPort->text().toLocal8Bit().data());
strcpy(ircNick, ui->ircNickBox->text().toLocal8Bit().data()); strcpy(ircNick, ui->ircNickBox->text().toLocal8Bit().data());
strncpy(gProxyIP, ui->systemProxyIP->text().toLocal8Bit().data(), 64);
strncpy(gProxyPort, ui->systemProxyPort->text().toLocal8Bit().data(), 8);
_SaveBackupToFile();
} }
void nesca_3::STTTerminate() void nesca_3::STTTerminate()

View File

@ -22,7 +22,7 @@
#include <mainResources.h> #include <mainResources.h>
extern Ui::nesca_3Class *ui; extern Ui::nesca_3Class *ui;
extern bool widgetIsHidden, IRCLogToggled, BALogSwitched, blinkFlag, disableBlink, debugFileOK, QOSWait, extern bool widgetIsHidden, IRCLogToggled, blinkFlag, disableBlink, debugFileOK, QOSWait,
connectedToIRC, ME2ScanFlag, QoSScanFlag, VoiceScanFlag, PieStatFlag, proxyEnabledFlag, connectedToIRC, ME2ScanFlag, QoSScanFlag, VoiceScanFlag, PieStatFlag, proxyEnabledFlag,
smBit_8, smBit_7, smBit_6, smBit_5, smBit_4, smBit_3, smBit_2, smBit_1, printDelimiter; smBit_8, smBit_7, smBit_6, smBit_5, smBit_4, smBit_3, smBit_2, smBit_1, printDelimiter;
extern float QoSStep; extern float QoSStep;

View File

@ -78,6 +78,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>10</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -90,7 +91,7 @@
<enum>QTabWidget::Rounded</enum> <enum>QTabWidget::Rounded</enum>
</property> </property>
<property name="currentIndex"> <property name="currentIndex">
<number>0</number> <number>3</number>
</property> </property>
<property name="elideMode"> <property name="elideMode">
<enum>Qt::ElideMiddle</enum> <enum>Qt::ElideMiddle</enum>
@ -144,6 +145,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -174,6 +176,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -201,6 +204,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -335,6 +339,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -365,6 +370,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -397,6 +403,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -448,6 +455,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -478,6 +486,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -505,6 +514,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -639,6 +649,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -669,6 +680,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -701,6 +713,7 @@
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -749,6 +762,7 @@ color: rgb(214, 214, 0);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -779,6 +793,7 @@ color: rgb(214, 214, 0);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -881,6 +896,7 @@ color: rgb(214, 214, 0);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>9</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -911,6 +927,7 @@ color: rgb(214, 214, 0);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -957,7 +974,7 @@ border-radius: 3px;</string>
<rect> <rect>
<x>30</x> <x>30</x>
<y>100</y> <y>100</y>
<width>208</width> <width>241</width>
<height>17</height> <height>17</height>
</rect> </rect>
</property> </property>
@ -983,14 +1000,15 @@ border-radius: 3px;</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>250</x> <x>250</x>
<y>10</y> <y>2</y>
<width>121</width> <width>121</width>
<height>20</height> <height>16</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1013,14 +1031,15 @@ border-radius: 3px;</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>30</x>
<y>10</y> <y>2</y>
<width>211</width> <width>211</width>
<height>20</height> <height>16</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1043,14 +1062,15 @@ border-radius: 3px;</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>30</x> <x>30</x>
<y>35</y> <y>22</y>
<width>341</width> <width>341</width>
<height>20</height> <height>12</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1073,14 +1093,15 @@ border-radius: 3px;</string>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>379</x> <x>379</x>
<y>10</y> <y>2</y>
<width>62</width> <width>62</width>
<height>20</height> <height>16</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1102,15 +1123,16 @@ border-radius: 3px;</string>
<widget class="QPushButton" name="checkKeyBut"> <widget class="QPushButton" name="checkKeyBut">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>380</x> <x>379</x>
<y>35</y> <y>18</y>
<width>61</width> <width>61</width>
<height>23</height> <height>16</height>
</rect> </rect>
</property> </property>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1132,6 +1154,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="whatsThis"> <property name="whatsThis">
@ -1159,6 +1182,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="whatsThis"> <property name="whatsThis">
@ -1215,7 +1239,7 @@ border-radius: 3px;</string>
<rect> <rect>
<x>163</x> <x>163</x>
<y>85</y> <y>85</y>
<width>17</width> <width>31</width>
<height>16</height> <height>16</height>
</rect> </rect>
</property> </property>
@ -1276,6 +1300,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1346,7 +1371,7 @@ border-radius: 3px;</string>
<rect> <rect>
<x>30</x> <x>30</x>
<y>68</y> <y>68</y>
<width>100</width> <width>161</width>
<height>17</height> <height>17</height>
</rect> </rect>
</property> </property>
@ -1371,6 +1396,71 @@ border-radius: 3px;</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLineEdit" name="systemProxyIP">
<property name="geometry">
<rect>
<x>30</x>
<y>38</y>
<width>341</width>
<height>12</height>
</rect>
</property>
<property name="font">
<font>
<family>Eurostile</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="toolTip">
<string/>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(216, 216, 216);background-color: rgb(56, 56, 56); border:none;</string>
</property>
<property name="text">
<string/>
</property>
<property name="maxLength">
<number>32</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="placeholderText">
<string>Proxy here</string>
</property>
</widget>
<widget class="QLineEdit" name="systemProxyPort">
<property name="geometry">
<rect>
<x>379</x>
<y>38</y>
<width>62</width>
<height>12</height>
</rect>
</property>
<property name="font">
<font>
<family>Eurostile</family>
<pointsize>8</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">color: rgb(216, 216, 216);background-color: rgb(56, 56, 56);border:none;</string>
</property>
<property name="text">
<string>3128</string>
</property>
<property name="maxLength">
<number>5</number>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="placeholderText">
<string>Balancer port here</string>
</property>
</widget>
</widget> </widget>
</widget> </widget>
<widget class="QLabel" name="labelNesca_3"> <widget class="QLabel" name="labelNesca_3">
@ -1518,6 +1608,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1545,6 +1636,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
@ -1569,6 +1661,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1590,6 +1683,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1611,6 +1705,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1632,6 +1727,7 @@ border-radius: 3px;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1678,7 +1774,7 @@ border-radius: 3px;</string>
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Consolas'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Consolas'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="cursorWidth"> <property name="cursorWidth">
@ -1718,6 +1814,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1745,6 +1842,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1778,6 +1876,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1805,6 +1904,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1826,6 +1926,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -1847,6 +1948,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -2361,6 +2463,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -2388,6 +2491,7 @@ p, li { white-space: pre-wrap; }
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -2433,7 +2537,7 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Eurostile'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Eurostile'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="cursorWidth"> <property name="cursorWidth">
@ -2494,6 +2598,7 @@ background-color: #000000;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -2809,6 +2914,7 @@ background-color: #000000;</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -3415,7 +3521,7 @@ background-color: #000000;</string>
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Eurostile'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Eurostile'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="acceptRichText"> <property name="acceptRichText">
@ -3551,7 +3657,7 @@ p, li { white-space: pre-wrap; }
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt; &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Eurostile'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt; &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Eurostile'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:2px; margin-bottom:2px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> &lt;p style=&quot;-qt-paragraph-type:empty; margin-top:2px; margin-bottom:2px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property> </property>
<property name="acceptRichText"> <property name="acceptRichText">
@ -3885,6 +3991,7 @@ color: rgb(71, 71, 71);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -3912,6 +4019,7 @@ color: rgb(71, 71, 71);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -3939,6 +4047,7 @@ color: rgb(71, 71, 71);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">
@ -3969,6 +4078,7 @@ color: rgb(71, 71, 71);</string>
<property name="font"> <property name="font">
<font> <font>
<family>Eurostile</family> <family>Eurostile</family>
<pointsize>8</pointsize>
</font> </font>
</property> </property>
<property name="toolTip"> <property name="toolTip">

View File

@ -121,15 +121,15 @@ void SaveErrorLog(char *sender, char *MesSent, char *ReplRecv)
}; };
} }
QString GetNSErrorDefinition(char *str, char *elem) QString GetNSErrorDefinition(const char *str, const char *elem)
{ {
char *temp = strstr(str, elem); const char *temp = strstr(str, elem);
if(temp != NULL) if(temp != NULL)
{ {
char definition[128] = {0}; char definition[128] = {0};
char *firstComma = strstr(temp + strlen(elem) + 1, "\""); const char *firstComma = strstr(temp + strlen(elem) + 1, "\"");
char *lastComma = strstr(firstComma + 1, "\""); const char *lastComma = strstr(firstComma + 1, "\"");
int sz = lastComma - firstComma - 1; int sz = lastComma - firstComma - 1;
@ -352,6 +352,14 @@ void _SaveBackupToFile()
sprintf(saveStr, "[MAXBTHR]: %d\n", gMaxBrutingThreads); sprintf(saveStr, "[MAXBTHR]: %d\n", gMaxBrutingThreads);
strcat(saveBuffer, saveStr); strcat(saveBuffer, saveStr);
ZeroMemory(saveStr, sizeof(saveStr));
sprintf(saveStr, "[SYSTEMPROXYIP]: %s\n", gProxyIP);
strcat(saveBuffer, saveStr);
ZeroMemory(saveStr, sizeof(saveStr));
sprintf(saveStr, "[SYSTEMPROXYPORT]: %s\n", gProxyPort);
strcat(saveBuffer, saveStr);
ZeroMemory(saveStr, sizeof(saveStr)); ZeroMemory(saveStr, sizeof(saveStr));
strcpy(saveStr, "[PERSKEY]:"); strcpy(saveStr, "[PERSKEY]:");
@ -1127,7 +1135,9 @@ void _passLoginFapper()
stt->doEmitionKillSttThread(); stt->doEmitionKillSttThread();
}; };
stt->doEmitionYellowFoundData("BA: ~" + QString(std::to_string(MaxLogin * MaxPass/gTimeOut/60).c_str()) + "; WF: ~" + QString(std::to_string(MaxWFLogin * MaxWFPass/gTimeOut/60).c_str()) + "; SSH: ~" + QString(std::to_string(MaxSSHPass/gTimeOut/60).c_str())); stt->doEmitionYellowFoundData("BA: ~" + QString(std::to_string(MaxLogin * MaxPass/gTimeOut/60).c_str())
+ "; WF: ~" + QString(std::to_string(MaxWFLogin * MaxWFPass/gTimeOut/60).c_str())
+ "; SSH: ~" + QString(std::to_string(MaxSSHPass/gTimeOut/60).c_str()));
} }
void ReadUTF8(FILE* nFile, char *cp) void ReadUTF8(FILE* nFile, char *cp)