From 545c2d4c45b59bd3880fdf7c82fc3784305f3c56 Mon Sep 17 00:00:00 2001 From: cora32 Date: Tue, 10 Mar 2015 23:09:05 +0300 Subject: [PATCH] Negative hit fix. --- Connector.cpp | 24 +++++++++--------------- STh.cpp | 4 ++-- STh.h | 4 ++-- connector_old.cpp | 12 ++++++------ externFunctions.h | 1 + finder.cpp | 19 ++++++++++--------- negatives.txt | 21 ++++++++++----------- nesca_3.cpp | 14 +++++++------- nesca_3.h | 2 +- 9 files changed, 48 insertions(+), 53 deletions(-) diff --git a/Connector.cpp b/Connector.cpp index dcaf0b8..8de8fea 100644 --- a/Connector.cpp +++ b/Connector.cpp @@ -231,17 +231,10 @@ 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_HEADER_OUT: - if(MapWidgetOpened) stt->doEmitionAddOutData(QString("size"), QString(data)); - cout<<"Data: "<doEmitionAddOutData(QString(data)); } return 0; @@ -258,15 +251,16 @@ int Connector::nConnect(const char *ip, const int port, std::string *buffer, const std::vector *customHeaders){ CURL *curl = curl_easy_init(); - struct data config; - - config.trace_ascii = 1; /* enable ascii tracing */ if (curl) { - curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace); - curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config); - curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + if (MapWidgetOpened) { + struct data config; + config.trace_ascii = 1; /* enable ascii tracing */ + 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_PORT, port); curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0"); diff --git a/STh.cpp b/STh.cpp index 8d134fd..076de45 100644 --- a/STh.cpp +++ b/STh.cpp @@ -20,9 +20,9 @@ void STh::doEmitionAddIncData(QString(ip), QString str) { emit stt->sIncData(ip, str); }; -void STh::doEmitionAddOutData(QString ip, QString str) +void STh::doEmitionAddOutData( QString str) { - emit stt->sOutData(ip, str); + emit stt->sOutData(str); }; void STh::doEmitionIPRANGE(QString str) { diff --git a/STh.h b/STh.h index f030969..fd6ed2c 100644 --- a/STh.h +++ b/STh.h @@ -18,7 +18,7 @@ public: static void doEmitionStartScanDNS(); static void doEmitionStartScanImport(); static void doEmitionAddIncData(QString ip, QString str); - static void doEmitionAddOutData(QString ip, QString str); + static void doEmitionAddOutData(QString str); static void doEmition_BAGreenData(QString str); static void doEmition_BARedData(QString str); static void doEmitionIPRANGE(QString str); @@ -62,7 +62,7 @@ public: signals: void changeStatus(QString); public: signals: void changeTargetsLeft(QString); public: signals: void killSttThread(); public: signals: void sIncData(QString, QString); -public: signals: void sOutData(QString, QString); +public: signals: void sOutData(QString); protected: void run(); diff --git a/connector_old.cpp b/connector_old.cpp index 787591a..a610c24 100644 --- a/connector_old.cpp +++ b/connector_old.cpp @@ -218,7 +218,7 @@ void _baSSLWorker(char *ip, char *request, char *rvBuff) if(SSL_connect(ssl)) { SSL_write(ssl, request, strlen(request)); - if(MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(request)); + if(MapWidgetOpened) stt->doEmitionAddOutData(QString(request)); char tempBuff[128] = {0}; int x = 1; @@ -465,7 +465,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method) if(send(sock, hRqst, strlen(hRqst), 0) != SOCKET_ERROR) { - if(MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(hRqst)); + if(MapWidgetOpened) stt->doEmitionAddOutData(QString(hRqst)); ZeroMemory(headerMsg, REQUEST_MAX_SIZE); int x = 1; int xx = 0; @@ -722,7 +722,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method) if (send(sock, request, strlen(request), 0) != SOCKET_ERROR) { - if (MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(request)); + if (MapWidgetOpened) stt->doEmitionAddOutData(QString(request)); dataSz = 0; ZeroMemory(recvBuff2, sizeof(recvBuff2)); ZeroMemory(recvBuff, sizeof(recvBuff)); @@ -1084,7 +1084,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps) strcat(request, "\r\n"); if(send(sockFTP, request, strlen(request), 0) != SOCKET_ERROR) { - if(MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(request)); + if(MapWidgetOpened) stt->doEmitionAddOutData(QString(request)); Activity += strlen(request); ZeroMemory(request, sizeof(request)); @@ -1128,7 +1128,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps) strcat(request, "\r\n"); if(send(sockFTP, request, strlen(request), 0) != SOCKET_ERROR) { - if(MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(request)); + if(MapWidgetOpened) stt->doEmitionAddOutData(QString(request)); Activity += strlen(request); ZeroMemory(request, sizeof(request)); @@ -1396,7 +1396,7 @@ int _webLoginSeq(char *request, char *login, char *pass, char *ip, int port, int } else { - if(MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(request)); + if(MapWidgetOpened) stt->doEmitionAddOutData(QString(request)); int x = 1; int xx = 0; ZeroMemory(recvBuff2, sizeof(recvBuff2)); diff --git a/externFunctions.h b/externFunctions.h index 9284c7e..50b3df6 100644 --- a/externFunctions.h +++ b/externFunctions.h @@ -17,6 +17,7 @@ extern void getSubStr(char *src, char *startStr, char *endStr, char *dest, int s extern void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest); extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage); extern void _SaveBackupToFile(); +extern char *_findFirst(const char *str, char *delim); //extern int nConnect(char *ip, int port, std::string *buffer); diff --git a/finder.cpp b/finder.cpp index e5e0fbf..0019508 100644 --- a/finder.cpp +++ b/finder.cpp @@ -187,7 +187,7 @@ int globalSearchNeg(const char *buffcpy, char *ip, int port) char negWord[256] = {0}; for(int i = 0; i < GlobalNegativeSize; ++i) { - if(!globalScanFlag) break; + if(!globalScanFlag) return -1; strcpy(negWord, GlobalNegatives[i]); if(strstr(buffcpy, negWord) != NULL) @@ -213,10 +213,8 @@ int globalSearchNeg(const char *buffcpy, char *ip, int port) return -1; }; - ZeroMemory(negWord, 256); }; - return -1; } int globalSearchPrnt(const char *buffcpy) @@ -335,7 +333,8 @@ int sharedDetector(char * ip, int port, const char *buffcpy) { if(globalSearchNeg(buffcpy, ip, port) == -1) return -1; if(globalSearchPrnt(buffcpy) == -1) return -1; - if(strstr(buffcpy, "
begin(), redirStrLst->end(), redirStr) == redirStrLst->end()) - { - redirStrLst->push_back(redirStr); - return redirectReconnect(ps->cookie, ip, port, redirStr, l, ps, redirStrLst, rBuff); - } return -1; + if (redirStr[0] != '#') { + if (std::find(redirStrLst->begin(), redirStrLst->end(), redirStr) == redirStrLst->end()) + { + redirStrLst->push_back(redirStr); + return redirectReconnect(ps->cookie, ip, port, redirStr, l, ps, redirStrLst, rBuff); + } return -1; + } return -2; }; } diff --git a/negatives.txt b/negatives.txt index 5d96ffe..1bf1b3d 100644 --- a/negatives.txt +++ b/negatives.txt @@ -1,4 +1,5 @@ Adapto CMS +Account unavailable баланс средств на вашем счету @@ -7,6 +8,7 @@ RFB 009 00;39;49mroot: Authorization Required .swf +покуп yadro.ru liveinternet #[Dlink] @@ -40,6 +42,7 @@ Content-Encoding: gzip no connections allowed pocket-solution trustclick +торг #[/Dlink] 530 User access denied prelogin @@ -791,8 +794,6 @@ page does not exist дешев дешёв pm2-web -домен продается -домены на продажу доставка заказать доставку заработок в сети @@ -834,12 +835,12 @@ pm2-web Seo подписаться поиск работы -приколы +прикол продукция -производство +производств процесі розробки работа в интернете -регистрации доменных имен +регистрации доменных рекламные ссылки ремонт сайт в разработке @@ -849,6 +850,7 @@ Seo сайт на разработке связь с нами скидк +раскрут скоро открытие служба поддержки создание недорогих сайтов @@ -856,25 +858,22 @@ Seo спонсоры стартовая страни стихи -тестовая страница +тестовая страни технические работы услуги флешки -Произошла ошибка +ошибка на хостинге Fatal error: -mc.yandex.ru/watch -mc.yandex.ru/metrika +mc.yandex.ru UNKNOWN HOST host not found Сайт закрыт ?partner хокке - добро пожаловать в статусы высказывани - флэшки футбол юмор diff --git a/nesca_3.cpp b/nesca_3.cpp index bbf5241..2eb66ce 100644 --- a/nesca_3.cpp +++ b/nesca_3.cpp @@ -1599,9 +1599,9 @@ bool nesca_3::eventFilter(QObject* obj, QEvent *event) }; return false; } - else if (obj == qwm) - { - ///TODO: raise parent window with qwm +// else if (obj == qwm) +// { +// ///TODO: raise parent window with qwm // if(event->type() == QEvent::MouseButtonPress) // { // Qt::WindowFlags eFlags = windowFlags (); @@ -1609,7 +1609,7 @@ bool nesca_3::eventFilter(QObject* obj, QEvent *event) // setWindowFlags(eFlags); // return true; // }; - } +// } else { if (event->type() == QEvent::KeyPress) @@ -2196,7 +2196,7 @@ void nesca_3::slotShowNicks() QRegExp _rOutProt(" HTTP/1.\\d+"); QRegExp _rOutPath(" /(\\w|\\.|,|/|:|-|_|\\?|!|\\@|#|\\$|%|\\^|&|\\*|\\(|\\)|=|\\+|<|>|;|:|\"|'|~|\\[|\\])* "); QRegExp _rOutHost("Host: ((\\w|\\d|\\.|:|/)*)\\r\\n"); -void nesca_3::slotOutData(QString ip, QString str) +void nesca_3::slotOutData(QString str) { if(SendData != NULL) { @@ -2227,7 +2227,7 @@ void nesca_3::slotOutData(QString ip, QString str) if(prot.size() > 0) str.replace(prot, "" + prot + ""); str.replace("\r\n", "
"); - SendData->append("[" + ip + "]
" + str + "

"); + SendData->append("
" + str + "

"); }; } @@ -2892,7 +2892,7 @@ void nesca_3::ConnectEvrthng() connect ( stt, SIGNAL(startScanDNS()), this, SLOT(DNSScanSeq())); connect ( stt, SIGNAL(startScanImport()), this, SLOT(ImportScanSeq())); connect ( stt, SIGNAL(sIncData(QString, QString)), this, SLOT(slotIncData(QString, QString))); - connect ( stt, SIGNAL(sOutData(QString, QString)), this, SLOT(slotOutData(QString, QString))); + connect ( stt, SIGNAL(sOutData(QString)), this, SLOT(slotOutData(QString))); connect ( stt, SIGNAL(changeDebugFoundData(QString)), this, SLOT(appendDebugText(QString))); connect ( stt, SIGNAL(changeYellowFoundData(QString)), this, SLOT(appendNotifyText(QString))); connect ( stt, SIGNAL(changeRedFoundData(QString)), this, SLOT(appendErrText(QString))); diff --git a/nesca_3.h b/nesca_3.h index 829b650..7e61e17 100644 --- a/nesca_3.h +++ b/nesca_3.h @@ -85,7 +85,7 @@ protected: void ImportScanSeq(); void smReaction(); void slotShowDataflow(); - void slotOutData(QString ip, QString str); + void slotOutData(QString str); void slotIncData(QString ip, QString str); void slotShowServerMsg(QString str); void slotSaveImage();