mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 10:42:21 +00:00
Single-dns-mode fixed.
This commit is contained in:
parent
c998739994
commit
837ce29455
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,7 +28,6 @@ result_files/*
|
||||
|
||||
|
||||
tags.txt
|
||||
version
|
||||
lisca.cpp
|
||||
main - копия.cpp
|
||||
result_files-*
|
||||
|
@ -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() {
|
||||
|
@ -1,10 +1,6 @@
|
||||
#ifndef FILEUPDATER_H
|
||||
#define FILEUPDATER_H
|
||||
|
||||
#ifndef Sleep
|
||||
#define Sleep(msecs) usleep((msecs)*1000)
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
@ -25,8 +21,8 @@ public:
|
||||
static std::unique_lock<std::mutex> lk;
|
||||
|
||||
public:
|
||||
static int updateLists();
|
||||
static int loadOnce();
|
||||
static void updateLists();
|
||||
static void loadOnce();
|
||||
static void FUClear();
|
||||
};
|
||||
|
||||
|
@ -26,4 +26,6 @@ void Threader::cleanUp() {
|
||||
lk.unlock();
|
||||
lk.release();
|
||||
threadId = 0;
|
||||
std::queue<std::string> empty = {};
|
||||
std::swap(ipQueue, empty);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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, "<form ") != NULL && strstr(buffcpy, "302 found") == NULL) return 10;
|
||||
//nic.sucks, ...
|
||||
//nic.sucks, etc
|
||||
|
||||
return -2;
|
||||
}
|
||||
@ -663,8 +663,9 @@ void fputsf(char *text, int flag, char *msg)
|
||||
stt->doEmitionRedFoundData("\"fOpened\" loop detected!");
|
||||
break;
|
||||
};
|
||||
|
||||
++innerCounter;
|
||||
Sleep((rand() % 100 + 60));
|
||||
Sleep((rand() % 100 + 60));
|
||||
};
|
||||
fOpened = true;
|
||||
fputs (string, file);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user