diff --git a/Connector.cpp b/Connector.cpp index 054c2c5..a6e7099 100644 --- a/Connector.cpp +++ b/Connector.cpp @@ -212,11 +212,6 @@ int pConnect(const char* ip, const int port, std::string *buffer, || res == CURLE_SEND_ERROR || res == CURLE_RECV_ERROR ) { - if (gNegDebugMode) - { - stt->doEmitionDebugFoundData("NConnect failed (curl_code: " + QString::number(res) + ") [" + QString(ip) + " Port:" + QString::number(port) + "]"); - } SOCKET eNobuffSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); shutdown(eNobuffSocket, SD_BOTH); closesocket(eNobuffSocket); diff --git a/externData.h b/externData.h index aa5db7c..665f5ba 100644 --- a/externData.h +++ b/externData.h @@ -23,7 +23,7 @@ extern QJsonArray *jsonArr; extern unsigned long long gTargetsNumber; extern long long unsigned int gTargets; -extern std::atomic cons, BrutingThrds, gThreads; +extern std::atomic cons(0), BrutingThrds(0), gThreads(0); extern char **loginLst, **passLst, **wfLoginLst, **wfPassLst, **ftpLoginLst, **ftpPassLst, diff --git a/finder.cpp b/finder.cpp index fa17d46..99b74bf 100644 --- a/finder.cpp +++ b/finder.cpp @@ -584,16 +584,17 @@ void fillGlobalLogData(const char *ip, int port, const char *sz, const char *tit }; } + int __checkFileExistence(int flag) { char fileName[64] = {0}; - if (flag == -22) sprintf(fileName, "./result_files-%s/"TYPE5".html", Utils::getStartDate().c_str()); - else if (flag == 0 || flag == 15 || flag == -10) sprintf(fileName, "./result_files-%s/"TYPE1".html", Utils::getStartDate().c_str()); - else if (flag == 3) sprintf(fileName, "./result_files-%s/"TYPE2".html", Utils::getStartDate().c_str()); - else if (flag == 16) sprintf(fileName, "./result_files-%s/"TYPE4".html", Utils::getStartDate().c_str()); + if (flag == -22) sprintf(fileName, "./result_files-%s/" TYPE5 ".html", Utils::getStartDate().c_str()); + else if (flag == 0 || flag == 15 || flag == -10) sprintf(fileName, "./result_files-%s/" TYPE1 ".html", Utils::getStartDate().c_str()); + else if (flag == 3) sprintf(fileName, "./result_files-%s/" TYPE2 ".html", Utils::getStartDate().c_str()); + else if (flag == 16) sprintf(fileName, "./result_files-%s/" TYPE4 ".html", Utils::getStartDate().c_str()); else if(flag >= 17 || flag == 11 || flag == 12 - || flag == 13 || flag == 14 || flag == 1) sprintf(fileName, "./result_files-%s/"TYPE3".html", Utils::getStartDate().c_str()); + || flag == 13 || flag == 14 || flag == 1) sprintf(fileName, "./result_files-%s/" TYPE3 ".html", Utils::getStartDate().c_str()); FILE *f = fopen(fileName, "r"); if(f == NULL) return true; @@ -618,25 +619,25 @@ void fputsf(char *text, int flag, char *msg) if(flag == 0 || flag == 15 || flag == -10) { if (ftsCameras) ftsCameras = __checkFileExistence(flag); - sprintf(fileName, "./result_files-%s/"TYPE1".html", Utils::getStartDate().c_str()); + sprintf(fileName, "./result_files-%s/" TYPE1 ".html", Utils::getStartDate().c_str()); file = fopen(fileName, "a"); } else if(flag == 1) { if(ftsOther) ftsOther = __checkFileExistence(flag); - sprintf(fileName, "./result_files-%s/"TYPE2".html", Utils::getStartDate().c_str()); + sprintf(fileName, "./result_files-%s/" TYPE2 ".html", Utils::getStartDate().c_str()); file = fopen(fileName, "a"); } else if(flag == -22) { if(ftsSSH) ftsSSH = __checkFileExistence(flag); - sprintf(fileName, "./result_files-%s/"TYPE5".html", Utils::getStartDate().c_str()); + sprintf(fileName, "./result_files-%s/" TYPE5 ".html", Utils::getStartDate().c_str()); file = fopen(fileName, "a"); } else if(flag == 3) { if(ftsFTP) ftsFTP = __checkFileExistence(flag); - sprintf(fileName, "./result_files-%s/"TYPE4".html", Utils::getStartDate().c_str()); + sprintf(fileName, "./result_files-%s/" TYPE4 ".html", Utils::getStartDate().c_str()); file = fopen(fileName, "a"); } else if(flag >= 17 || flag == 11 || flag == 12 @@ -644,7 +645,7 @@ void fputsf(char *text, int flag, char *msg) ) { if(ftsBA) ftsBA = __checkFileExistence(flag); - sprintf(fileName, "./result_files-%s/"TYPE3".html", Utils::getStartDate().c_str()); + sprintf(fileName, "./result_files-%s/" TYPE3 ".html", Utils::getStartDate().c_str()); file = fopen(fileName, "a"); } else stt->doEmitionRedFoundData("Unknown flag [FLAG: " + QString::number(flag) + "]"); @@ -702,7 +703,7 @@ void fputsf(char *text, int flag, char *msg) { char tmsg[1024] = {0}; ftsCameras = false; - strcpy(tmsg, ""TYPE1""); + strcpy(tmsg, "" TYPE1 ""); strcat(tmsg, msg); strcat(tmsg, HTTP_FILE_STYLE); fputs (tmsg, file); @@ -712,7 +713,7 @@ void fputsf(char *text, int flag, char *msg) { char tmsg[1024] = {0}; ftsOther = false; - strcpy(tmsg, ""TYPE2""); + strcpy(tmsg, "" TYPE2 ""); strcat(tmsg, msg); strcat(tmsg, HTTP_FILE_STYLE); fputs (tmsg, file); @@ -722,7 +723,7 @@ void fputsf(char *text, int flag, char *msg) { char tmsg[1024] = {0}; ftsOther = false; - strcpy(tmsg, ""TYPE5""); + strcpy(tmsg, "" TYPE5 ""); strcat(tmsg, msg); strcat(tmsg, HTTP_FILE_STYLE); fputs (tmsg, file); @@ -732,7 +733,7 @@ void fputsf(char *text, int flag, char *msg) { char tmsg[1024] = {0}; ftsFTP = false; - strcpy(tmsg, ""TYPE4""); + strcpy(tmsg, "" TYPE4 ""); strcat(tmsg, msg); strcat(tmsg, HTTP_FILE_STYLE); fputs (tmsg, file); @@ -742,7 +743,7 @@ void fputsf(char *text, int flag, char *msg) { char tmsg[1024] = {0}; ftsBA = false; - strcpy(tmsg, ""TYPE3""); + strcpy(tmsg, "" TYPE3 ""); strcat(tmsg, msg); strcat(tmsg, HTTP_FILE_STYLE); fputs (tmsg, file); @@ -766,8 +767,8 @@ void fputsf(char *text, int flag, char *msg) }; } -#define REDIRECT_PIC "" -#define PEKO_PIC "" +#define REDIRECT_PIC "" +#define PEKO_PIC "" void putInFile(int flag, const char *ip, int port, int size, const char *finalstr, char *cp) { diff --git a/mainResources.h b/mainResources.h index 37715e9..3d9aeaf 100644 --- a/mainResources.h +++ b/mainResources.h @@ -113,11 +113,11 @@ typedef int BOOL; a{color: gray;text-decoration: underline;} \ a:focus{ outline-style: dashed;outline-width:1px; outline-color: red;}" -#define HTTP_FILE_HEADER "
."TYPE1" \ - ."TYPE2" \ - ."TYPE3" \ - ."TYPE4" \ - ."TYPE5" \ +#define HTTP_FILE_HEADER "

" #ifndef MAX_ADDR_LEN diff --git a/nesca_3.qrc b/nesca_3.qrc index 76d3458..f377a50 100644 --- a/nesca_3.qrc +++ b/nesca_3.qrc @@ -1,7 +1,6 @@ small_font.ttf - xc.jpg nesca.ico