mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-12-26 01:11:47 +00:00
Добавлен счётчик файлов для фтп и фикс фейкхитов для ssh.
This commit is contained in:
parent
458113bc6c
commit
1008076fec
@ -15,6 +15,18 @@
|
||||
int gMaxBrutingThreads = 200;
|
||||
fd_set write_fs;
|
||||
|
||||
|
||||
int _countFTPDirectories(char *recvBuff){
|
||||
int dirCounter = 0;
|
||||
strcat(recvBuff, "\n");
|
||||
char *dirPtr = strstr(recvBuff, "\n");
|
||||
while(dirPtr != NULL){
|
||||
++dirCounter;
|
||||
dirPtr = strstr(dirPtr + 1, "\n");
|
||||
};
|
||||
|
||||
return dirCounter;
|
||||
};
|
||||
void BConInc()
|
||||
{
|
||||
__asm
|
||||
@ -1107,6 +1119,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
|
||||
|
||||
#pragma region Get pasv Port
|
||||
char *ptr0 = strstr(recvBuff2, "227 ");
|
||||
|
||||
if( ptr0 != NULL )
|
||||
{
|
||||
if(strstr(ptr0, "(") != NULL)
|
||||
@ -1136,7 +1149,6 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
|
||||
connectionResult = connect(newSockFTP, (sockaddr*)&sockAddr, sizeof(sockAddr));
|
||||
|
||||
send(sockFTP, "LIST\r\n", 6, 0);
|
||||
|
||||
ZeroMemory(recvBuff, sizeof(recvBuff));
|
||||
int x = recvWT(newSockFTP, recvBuff, sizeof(recvBuff), gTimeOut + 3, &bTO);
|
||||
if(x <= 0 || strstr(recvBuff, "unknown command") != NULL)
|
||||
@ -1155,9 +1167,16 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
|
||||
strcpy(lps.login, "UNKNOWN");
|
||||
return lps;
|
||||
}
|
||||
else stt->doEmition_BAGreenData("[+] " + QString(pass) + " [MLSD succeeded]");
|
||||
else {
|
||||
stt->doEmition_BAGreenData("[+] " + QString(pass) + " [MLSD succeeded]");
|
||||
ps->directoryCount = _countFTPDirectories(recvBuff);
|
||||
};
|
||||
}
|
||||
else stt->doEmition_BAGreenData("[+] " + QString(pass) + " [LIST succeeded]");
|
||||
else
|
||||
{
|
||||
stt->doEmition_BAGreenData("[+] " + QString(pass) + " [LIST succeeded]");
|
||||
ps->directoryCount = _countFTPDirectories(recvBuff);
|
||||
};
|
||||
|
||||
CSSOCKET(newSockFTP);
|
||||
}
|
||||
@ -2014,6 +2033,7 @@ int _EstablishSSHConnection(char *host, int port, conSTR *CSTR, char *banner)
|
||||
ZeroMemory(temp, sizeof(temp));
|
||||
if(res == 0)
|
||||
{
|
||||
if(i == 0) return -2; //Failhit
|
||||
SSHConDec();
|
||||
isActive = 0;
|
||||
return 0;
|
||||
|
@ -698,9 +698,7 @@ void fputsf(char *ip, char *port, char *text, int flag, char *msg)
|
||||
}
|
||||
else
|
||||
{
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionRedFoundData("Cannot open file [FLAG: " + QString::number(flag) + "]");
|
||||
#pragma endregion
|
||||
};
|
||||
};
|
||||
void putInFile(int flag, char *ip, char *port, int recd, char *finalstr, char *hl, char *cp)
|
||||
@ -1634,7 +1632,9 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
||||
strcat(logEmit, lps.pass);
|
||||
strcat(logEmit, "@");
|
||||
strcat(logEmit, ip);
|
||||
strcat(logEmit, "</span></a>");
|
||||
strcat(logEmit, "</span></a> (F:");
|
||||
strcat(logEmit, std::to_string((long double)ps.directoryCount).c_str());
|
||||
strcat(logEmit, ")");
|
||||
|
||||
fputsf(ip, port, log, flag, "FTP");
|
||||
|
||||
|
@ -59,6 +59,7 @@ struct PathStr{
|
||||
int port;
|
||||
char ip[MAX_ADDR_LEN];
|
||||
char cookie[COOKIE_MAX_SIZE];
|
||||
int directoryCount;
|
||||
};
|
||||
|
||||
struct lopaStr{
|
||||
|
@ -1,3 +1,4 @@
|
||||
hw230f8034t:17932yhf823
|
||||
root:root
|
||||
root:admin
|
||||
admin:admin
|
||||
|
Loading…
Reference in New Issue
Block a user