Single-dns-mode fixed.

This commit is contained in:
cora32 2015-03-28 08:30:41 +03:00
parent c998739994
commit 837ce29455
10 changed files with 27 additions and 27 deletions

1
.gitignore vendored
View File

@ -28,7 +28,6 @@ result_files/*
tags.txt tags.txt
version
lisca.cpp lisca.cpp
main - копия.cpp main - копия.cpp
result_files-* result_files-*

View File

@ -1,4 +1,5 @@
#include "FileUpdater.h" #include "FileUpdater.h"
#include "externFunctions.h"
#include "STh.h" #include "STh.h"
#include "mainResources.h" #include "mainResources.h"
@ -147,7 +148,7 @@ void negativeLoader() {
} }
} }
void *updateNegatives() { void updateNegatives() {
if(GlobalNegatives != NULL) if(GlobalNegatives != NULL)
{ {
for(int i = 0; i < GlobalNegativeSize; ++i) delete []GlobalNegatives[i]; for(int i = 0; i < GlobalNegativeSize; ++i) delete []GlobalNegatives[i];
@ -157,7 +158,7 @@ void *updateNegatives() {
negativeLoader(); negativeLoader();
} }
void *updateLogin() { void updateLogin() {
if(loginLst != NULL) if(loginLst != NULL)
{ {
@ -210,7 +211,7 @@ void *updateLogin() {
stt->doEmitionKillSttThread(); stt->doEmitionKillSttThread();
}; };
} }
void *updatePass() { void updatePass() {
if(passLst != NULL) if(passLst != NULL)
{ {
@ -263,7 +264,7 @@ void *updatePass() {
stt->doEmitionKillSttThread(); stt->doEmitionKillSttThread();
}; };
} }
void *updateSSH() { void updateSSH() {
if(sshlpLst != NULL) if(sshlpLst != NULL)
{ {
@ -317,7 +318,7 @@ void *updateSSH() {
stt->doEmitionKillSttThread(); stt->doEmitionKillSttThread();
}; };
} }
void *updateWFLogin() { void updateWFLogin() {
if(wfLoginLst != NULL) if(wfLoginLst != NULL)
{ {
@ -366,7 +367,7 @@ void *updateWFLogin() {
fclose(wfLoginList); fclose(wfLoginList);
} }
} }
void *updateWFPass() { void updateWFPass() {
if(wfPassLst != NULL) if(wfPassLst != NULL)
{ {
@ -434,7 +435,7 @@ void updateList(const char *fileName, long *szPtr, void *funcPtr(void)) {
} }
} }
int FileUpdater::updateLists() { void FileUpdater::updateLists() {
while(globalScanFlag) { while(globalScanFlag) {
Sleep(60000); Sleep(60000);
if(!globalScanFlag) break; if(!globalScanFlag) break;
@ -442,13 +443,13 @@ int FileUpdater::updateLists() {
} }
} }
int FileUpdater::loadOnce() { void FileUpdater::loadOnce() {
updateList("negatives.txt", &oldNegLstSize, updateNegatives); updateList("negatives.txt", &oldNegLstSize, (void*(*)(void))updateNegatives);
updateList("login.txt", &oldLoginLstSize, updateLogin); updateList("login.txt", &oldLoginLstSize, (void*(*)(void))updateLogin);
updateList("pass.txt", &oldPassLstSize, updatePass); updateList("pass.txt", &oldPassLstSize, (void*(*)(void))updatePass);
updateList("sshpass.txt", &oldSSHLstSize, updateSSH); updateList("sshpass.txt", &oldSSHLstSize, (void*(*)(void))updateSSH);
updateList("wflogin.txt", &oldWFLoginLstSize, updateWFLogin); updateList("wflogin.txt", &oldWFLoginLstSize, (void*(*)(void))updateWFLogin);
updateList("wfpass.txt", &oldWFPassLstSize, updateWFPass); updateList("wfpass.txt", &oldWFPassLstSize, (void*(*)(void))updateWFPass);
} }
void FileUpdater::FUClear() { void FileUpdater::FUClear() {

View File

@ -1,10 +1,6 @@
#ifndef FILEUPDATER_H #ifndef FILEUPDATER_H
#define FILEUPDATER_H #define FILEUPDATER_H
#ifndef Sleep
#define Sleep(msecs) usleep((msecs)*1000)
#endif
#include <fstream> #include <fstream>
#include <mutex> #include <mutex>
#include <condition_variable> #include <condition_variable>
@ -25,8 +21,8 @@ public:
static std::unique_lock<std::mutex> lk; static std::unique_lock<std::mutex> lk;
public: public:
static int updateLists(); static void updateLists();
static int loadOnce(); static void loadOnce();
static void FUClear(); static void FUClear();
}; };

View File

@ -26,4 +26,6 @@ void Threader::cleanUp() {
lk.unlock(); lk.unlock();
lk.release(); lk.release();
threadId = 0; threadId = 0;
std::queue<std::string> empty = {};
std::swap(ipQueue, empty);
} }

View File

@ -7,7 +7,6 @@
#define PORTSET "80,81,88,8080,8081,60001,60002,8008,8888,554,9000,441,4111,6667,3536,22,21" #define PORTSET "80,81,88,8080,8081,60001,60002,8008,8888,554,9000,441,4111,6667,3536,22,21"
#define CSSOCKET(Socket) shutdown(Socket, SD_BOTH); closesocket(Socket); Socket = -1; #define CSSOCKET(Socket) shutdown(Socket, SD_BOTH); closesocket(Socket); Socket = -1;
#ifndef CP_UTF8 #ifndef CP_UTF8
#define CP_UTF8 65001 #define CP_UTF8 65001
#endif #endif

View File

@ -15,7 +15,6 @@ extern char* strstri(const char *_Str, const char *_SubStr);
extern void nCleanup(); 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 void _SaveBackupToFile(); extern void _SaveBackupToFile();
extern char *_findFirst(const char *str, char *delim); extern char *_findFirst(const char *str, char *delim);
//extern int nConnect(char *ip, int port, std::string *buffer); //extern int nConnect(char *ip, int port, std::string *buffer);

View File

@ -340,7 +340,7 @@ int sharedDetector(const char * ip, int port, const char *buffcpy) {
if(globalSearchNeg(buffcpy, ip, port) == -1) return -1; if(globalSearchNeg(buffcpy, ip, port) == -1) return -1;
if(globalSearchPrnt(buffcpy) == -1) return -1; if(globalSearchPrnt(buffcpy) == -1) return -1;
//if(strstr(buffcpy, "<form ") != NULL && strstr(buffcpy, "302 found") == NULL) return 10; //if(strstr(buffcpy, "<form ") != NULL && strstr(buffcpy, "302 found") == NULL) return 10;
//nic.sucks, ... //nic.sucks, etc
return -2; return -2;
} }
@ -663,8 +663,9 @@ void fputsf(char *text, int flag, char *msg)
stt->doEmitionRedFoundData("\"fOpened\" loop detected!"); stt->doEmitionRedFoundData("\"fOpened\" loop detected!");
break; break;
}; };
++innerCounter; ++innerCounter;
Sleep((rand() % 100 + 60)); Sleep((rand() % 100 + 60));
}; };
fOpened = true; fOpened = true;
fputs (string, file); fputs (string, file);

View File

@ -176,3 +176,4 @@ public:
extern lopaStr _IPCameraBLobby(const char *ip, int port, char *SPEC); extern lopaStr _IPCameraBLobby(const char *ip, int port, char *SPEC);
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage);

View File

@ -470,9 +470,10 @@ void nesca_3::slotDrawTextPlacers()
sceneTextPlacer->addLine(85, 110, 90, 100, penPT); sceneTextPlacer->addLine(85, 110, 90, 100, penPT);
sceneTextPlacer->addLine(23, 110, 83, 110, penPT); sceneTextPlacer->addLine(23, 110, 83, 110, penPT);
int linuxOffsetKOSTYL = 0;
#if (!defined(WIN32) && !defined(_WIN32) && !defined(__WIN32)) || defined(__CYGWIN__) #if (!defined(WIN32) && !defined(_WIN32) && !defined(__WIN32)) || defined(__CYGWIN__)
int linuxOffsetKOSTYL = 3; linuxOffsetKOSTYL = 3;
#endif #endif
QGraphicsTextItem *item = sceneTextPlacer->addText("- Anomalies", fnt); QGraphicsTextItem *item = sceneTextPlacer->addText("- Anomalies", fnt);

1
version Normal file
View File

@ -0,0 +1 @@
24B38-32E