diff --git a/.gitignore b/.gitignore index 35abe43..1c59eb4 100644 --- a/.gitignore +++ b/.gitignore @@ -28,7 +28,6 @@ result_files/* tags.txt -version lisca.cpp main - копия.cpp result_files-* diff --git a/FileUpdater.cpp b/FileUpdater.cpp index 32c80c6..abd3032 100644 --- a/FileUpdater.cpp +++ b/FileUpdater.cpp @@ -1,4 +1,5 @@ #include "FileUpdater.h" +#include "externFunctions.h" #include "STh.h" #include "mainResources.h" @@ -147,7 +148,7 @@ void negativeLoader() { } } -void *updateNegatives() { +void updateNegatives() { if(GlobalNegatives != NULL) { for(int i = 0; i < GlobalNegativeSize; ++i) delete []GlobalNegatives[i]; @@ -157,7 +158,7 @@ void *updateNegatives() { negativeLoader(); } -void *updateLogin() { +void updateLogin() { if(loginLst != NULL) { @@ -210,7 +211,7 @@ void *updateLogin() { stt->doEmitionKillSttThread(); }; } -void *updatePass() { +void updatePass() { if(passLst != NULL) { @@ -263,7 +264,7 @@ void *updatePass() { stt->doEmitionKillSttThread(); }; } -void *updateSSH() { +void updateSSH() { if(sshlpLst != NULL) { @@ -317,7 +318,7 @@ void *updateSSH() { stt->doEmitionKillSttThread(); }; } -void *updateWFLogin() { +void updateWFLogin() { if(wfLoginLst != NULL) { @@ -366,7 +367,7 @@ void *updateWFLogin() { fclose(wfLoginList); } } -void *updateWFPass() { +void updateWFPass() { 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) { Sleep(60000); if(!globalScanFlag) break; @@ -442,13 +443,13 @@ int FileUpdater::updateLists() { } } -int FileUpdater::loadOnce() { - updateList("negatives.txt", &oldNegLstSize, updateNegatives); - updateList("login.txt", &oldLoginLstSize, updateLogin); - updateList("pass.txt", &oldPassLstSize, updatePass); - updateList("sshpass.txt", &oldSSHLstSize, updateSSH); - updateList("wflogin.txt", &oldWFLoginLstSize, updateWFLogin); - updateList("wfpass.txt", &oldWFPassLstSize, updateWFPass); +void FileUpdater::loadOnce() { + updateList("negatives.txt", &oldNegLstSize, (void*(*)(void))updateNegatives); + updateList("login.txt", &oldLoginLstSize, (void*(*)(void))updateLogin); + updateList("pass.txt", &oldPassLstSize, (void*(*)(void))updatePass); + updateList("sshpass.txt", &oldSSHLstSize, (void*(*)(void))updateSSH); + updateList("wflogin.txt", &oldWFLoginLstSize, (void*(*)(void))updateWFLogin); + updateList("wfpass.txt", &oldWFPassLstSize, (void*(*)(void))updateWFPass); } void FileUpdater::FUClear() { diff --git a/FileUpdater.h b/FileUpdater.h index 8ad1dd3..5f37bc4 100644 --- a/FileUpdater.h +++ b/FileUpdater.h @@ -1,10 +1,6 @@ #ifndef FILEUPDATER_H #define FILEUPDATER_H -#ifndef Sleep -#define Sleep(msecs) usleep((msecs)*1000) -#endif - #include #include #include @@ -25,8 +21,8 @@ public: static std::unique_lock lk; public: - static int updateLists(); - static int loadOnce(); + static void updateLists(); + static void loadOnce(); static void FUClear(); }; diff --git a/Threader.cpp b/Threader.cpp index da8fca3..7a469b7 100644 --- a/Threader.cpp +++ b/Threader.cpp @@ -26,4 +26,6 @@ void Threader::cleanUp() { lk.unlock(); lk.release(); threadId = 0; + std::queue empty = {}; + std::swap(ipQueue, empty); } diff --git a/externData.h b/externData.h index 6f3d0bf..c9be601 100644 --- a/externData.h +++ b/externData.h @@ -7,7 +7,6 @@ #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; - #ifndef CP_UTF8 #define CP_UTF8 65001 #endif diff --git a/externFunctions.h b/externFunctions.h index 788a2e6..9f06a1c 100644 --- a/externFunctions.h +++ b/externFunctions.h @@ -15,7 +15,6 @@ extern char* strstri(const char *_Str, const char *_SubStr); extern void nCleanup(); 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 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 81c4ff6..ccaf7d4 100644 --- a/finder.cpp +++ b/finder.cpp @@ -340,7 +340,7 @@ int sharedDetector(const char * ip, int port, const char *buffcpy) { if(globalSearchNeg(buffcpy, ip, port) == -1) return -1; if(globalSearchPrnt(buffcpy) == -1) return -1; //if(strstr(buffcpy, "
doEmitionRedFoundData("\"fOpened\" loop detected!"); break; }; + ++innerCounter; - Sleep((rand() % 100 + 60)); + Sleep((rand() % 100 + 60)); }; fOpened = true; fputs (string, file); diff --git a/mainResources.h b/mainResources.h index bbb21b5..c707d39 100644 --- a/mainResources.h +++ b/mainResources.h @@ -176,3 +176,4 @@ public: extern lopaStr _IPCameraBLobby(const char *ip, int port, char *SPEC); +extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage); diff --git a/nesca_3.cpp b/nesca_3.cpp index d3ff40e..14fcde7 100644 --- a/nesca_3.cpp +++ b/nesca_3.cpp @@ -470,9 +470,10 @@ void nesca_3::slotDrawTextPlacers() sceneTextPlacer->addLine(85, 110, 90, 100, penPT); sceneTextPlacer->addLine(23, 110, 83, 110, penPT); - + + int linuxOffsetKOSTYL = 0; #if (!defined(WIN32) && !defined(_WIN32) && !defined(__WIN32)) || defined(__CYGWIN__) - int linuxOffsetKOSTYL = 3; + linuxOffsetKOSTYL = 3; #endif QGraphicsTextItem *item = sceneTextPlacer->addText("- Anomalies", fnt); diff --git a/version b/version new file mode 100644 index 0000000..89f9067 --- /dev/null +++ b/version @@ -0,0 +1 @@ +24B38-32E \ No newline at end of file