-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,182 additions
and
1,250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,19 @@ | ||
#ifndef BASICAUTH_H | ||
#define BASICAUTH_H | ||
|
||
#include <Connector.h> | ||
#include <BruteUtils.h> | ||
#include <Utils.h> | ||
#include <externData.h> | ||
#include <mainResources.h> | ||
|
||
class BA : BruteUtils{ | ||
private: | ||
lopaStr _BABrute(char *cookie, | ||
char *ip, | ||
int port, | ||
char *pathT, | ||
char *method); | ||
static bool checkOutput(const string *buffer); | ||
static lopaStr _BABrute(const char *ip, const int port); | ||
|
||
lopaStr _BALobby(char *cookie, | ||
char *ip, | ||
int port, | ||
char *path, | ||
char *method); | ||
public: | ||
static lopaStr _BALobby(const char *ip, const int port); | ||
}; | ||
|
||
#endif // BASICAUTH_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#include "FTPAuth.h" | ||
|
||
bool FTPA::checkOutput(const string *buffer) { | ||
//Login or password incorrect! | ||
|
||
if(Utils::ci_find_substr(*buffer, "200 ok") != -1 || | ||
Utils::ci_find_substr(*buffer, "http/1.0 200") != -1 || | ||
Utils::ci_find_substr(*buffer, "http/1.1 200") != -1 | ||
) { | ||
|
||
return true; | ||
} | ||
|
||
return false; | ||
} | ||
|
||
lopaStr FTPA::_FTPBrute(const char *ip, const int port, const PathStr *ps) { | ||
string buffer; | ||
string lpString; | ||
lopaStr lps; | ||
ZeroMemory(lps.login, sizeof(lps.login)); | ||
ZeroMemory(lps.pass, sizeof(lps.pass)); | ||
ZeroMemory(lps.other, sizeof(lps.other)); | ||
|
||
strcpy(lps.login, "UNKNOWN"); | ||
|
||
for(int i = 0; i < MaxLogin; ++i) | ||
{ | ||
if(!globalScanFlag) return lps; | ||
if(strlen(loginLst[i]) <= 1) continue; | ||
|
||
for(int j = 0; j < MaxPass; ++j) | ||
{ | ||
if(!globalScanFlag) return lps; | ||
if(strlen(passLst[j]) <= 1) continue; | ||
|
||
lpString = string(loginLst[i]) + ":" + string(passLst[j]); | ||
|
||
Connector::nConnect(ip, port, &buffer, NULL, NULL, &lpString); | ||
|
||
if(checkOutput(&buffer) != 0) { | ||
strcpy(lps.login, loginLst[i]); | ||
strcpy(lps.pass, passLst[j]); | ||
return lps; | ||
}; | ||
|
||
Sleep(70); | ||
} | ||
} | ||
|
||
return lps; | ||
} | ||
|
||
lopaStr FTPA::_FTPLobby(const char *ip, const int port, const PathStr *ps){ | ||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(700); | ||
|
||
BruteUtils::BConInc(); | ||
const lopaStr &lps = _FTPBrute(ip, port, ps); | ||
BruteUtils::BConDec(); | ||
|
||
return lps; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef FTPAUTH_H | ||
#define FTPAUTH_H | ||
|
||
#include <Connector.h> | ||
#include <BruteUtils.h> | ||
#include <Utils.h> | ||
#include <externData.h> | ||
#include <mainResources.h> | ||
|
||
class FTPA { | ||
private: | ||
static bool checkOutput(const string *buffer); | ||
static lopaStr _FTPBrute(const char *ip, const int port, const PathStr *ps); | ||
|
||
public: | ||
static lopaStr _FTPLobby(const char *ip, const int port, const PathStr *ps); | ||
}; | ||
|
||
#endif // FTPAUTH_H |
Oops, something went wrong.