mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
Brute-disabling option added
This commit is contained in:
parent
f09e6e28b7
commit
892be9c934
@ -68,6 +68,8 @@ lopaStr BA::BABrute(const char *ip, const int port) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lopaStr BA::BALobby(const char *ip, const int port) {
|
lopaStr BA::BALobby(const char *ip, const int port) {
|
||||||
|
if(gMaxBrutingThreads > 0) {
|
||||||
|
|
||||||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
||||||
|
|
||||||
BruteUtils::BConInc();
|
BruteUtils::BConInc();
|
||||||
@ -75,4 +77,8 @@ lopaStr BA::BALobby(const char *ip, const int port) {
|
|||||||
BruteUtils::BConDec();
|
BruteUtils::BConDec();
|
||||||
|
|
||||||
return lps;
|
return lps;
|
||||||
|
} else {
|
||||||
|
lopaStr lps;
|
||||||
|
return lps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,7 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lopaStr FTPA::FTPLobby(const char *ip, const int port, PathStr *ps) {
|
lopaStr FTPA::FTPLobby(const char *ip, const int port, PathStr *ps) {
|
||||||
|
if(gMaxBrutingThreads > 0) {
|
||||||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
||||||
|
|
||||||
BruteUtils::BConInc();
|
BruteUtils::BConInc();
|
||||||
@ -72,4 +73,8 @@ lopaStr FTPA::FTPLobby(const char *ip, const int port, PathStr *ps) {
|
|||||||
BruteUtils::BConDec();
|
BruteUtils::BConDec();
|
||||||
|
|
||||||
return lps;
|
return lps;
|
||||||
|
} else {
|
||||||
|
lopaStr lps;
|
||||||
|
return lps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -171,6 +171,10 @@ QString strIP;
|
|||||||
QString strPort;
|
QString strPort;
|
||||||
int SSHAuth::SSHLobby(const char *ip, int port, std::string *buffer)
|
int SSHAuth::SSHLobby(const char *ip, int port, std::string *buffer)
|
||||||
{
|
{
|
||||||
|
if(gMaxBrutingThreads > 0) {
|
||||||
|
|
||||||
|
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
||||||
|
|
||||||
const char &banner = _get_ssh_banner(ip, port);
|
const char &banner = _get_ssh_banner(ip, port);
|
||||||
if(strlen(&banner) > 0)
|
if(strlen(&banner) > 0)
|
||||||
{
|
{
|
||||||
@ -180,4 +184,5 @@ int SSHAuth::SSHLobby(const char *ip, int port, std::string *buffer)
|
|||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
return -1;
|
return -1;
|
||||||
|
} else return -1;
|
||||||
}
|
}
|
||||||
|
@ -21,13 +21,14 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
WFClass(){
|
WFClass(){
|
||||||
|
if(gMaxBrutingThreads > 0) {
|
||||||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(700);
|
while(BrutingThrds >= gMaxBrutingThreads) Sleep(700);
|
||||||
|
|
||||||
++WF;
|
++WF;
|
||||||
BConInc();
|
BConInc();
|
||||||
passCounter = 1;
|
passCounter = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
~WFClass(){
|
~WFClass(){
|
||||||
BConDec();
|
BConDec();
|
||||||
|
@ -256,8 +256,8 @@ lopaStr _IPCameraBrute(const char *ip, int port, char *SPEC)
|
|||||||
|
|
||||||
if(res == 1)
|
if(res == 1)
|
||||||
{
|
{
|
||||||
strcpy(lps.login, loginLst[i]);
|
strcpy(lps.login, login);
|
||||||
strcpy(lps.pass, passLst[j]);
|
strcpy(lps.pass, pass);
|
||||||
return lps;
|
return lps;
|
||||||
}
|
}
|
||||||
else if(res == -1)
|
else if(res == -1)
|
||||||
@ -275,11 +275,16 @@ lopaStr _IPCameraBrute(const char *ip, int port, char *SPEC)
|
|||||||
|
|
||||||
lopaStr _IPCameraBLobby(const char *ip, int port, char *SPEC)
|
lopaStr _IPCameraBLobby(const char *ip, int port, char *SPEC)
|
||||||
{
|
{
|
||||||
|
if(gMaxBrutingThreads > 0) {
|
||||||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
||||||
|
|
||||||
BruteUtils::BConInc();
|
BruteUtils::BConInc();
|
||||||
lopaStr res = _IPCameraBrute(ip, port, SPEC);
|
lopaStr lps = _IPCameraBrute(ip, port, SPEC);
|
||||||
BruteUtils::BConDec();
|
BruteUtils::BConDec();
|
||||||
|
|
||||||
return res;
|
return lps;
|
||||||
|
} else {
|
||||||
|
lopaStr lps;
|
||||||
|
return lps;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ int ipsstart[4], ipsend[4],
|
|||||||
overallPorts, flCounter, octet[4];
|
overallPorts, flCounter, octet[4];
|
||||||
int BA = 0;
|
int BA = 0;
|
||||||
int gPingTimeout = 1;
|
int gPingTimeout = 1;
|
||||||
int gMaxBrutingThreads = 200;
|
int gMaxBrutingThreads = 50;
|
||||||
unsigned int Activity = 0;
|
unsigned int Activity = 0;
|
||||||
|
|
||||||
unsigned char **ipsstartfl = NULL, **ipsendfl = NULL, **starterIP = NULL;
|
unsigned char **ipsstartfl = NULL, **ipsendfl = NULL, **starterIP = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user