diff --git a/connector.cpp b/connector.cpp index 7f76e75..a0446aa 100644 --- a/connector.cpp +++ b/connector.cpp @@ -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; diff --git a/finder.cpp b/finder.cpp index d8fc683..cab18bf 100644 --- a/finder.cpp +++ b/finder.cpp @@ -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, ""); + strcat(logEmit, " (F:"); + strcat(logEmit, std::to_string((long double)ps.directoryCount).c_str()); + strcat(logEmit, ")"); fputsf(ip, port, log, flag, "FTP"); diff --git a/mainResources.h b/mainResources.h index 14ccdd4..8f98a9d 100644 --- a/mainResources.h +++ b/mainResources.h @@ -59,6 +59,7 @@ struct PathStr{ int port; char ip[MAX_ADDR_LEN]; char cookie[COOKIE_MAX_SIZE]; + int directoryCount; }; struct lopaStr{ diff --git a/sshpass.txt b/sshpass.txt index 2310446..5c6c017 100644 --- a/sshpass.txt +++ b/sshpass.txt @@ -1,3 +1,4 @@ +hw230f8034t:17932yhf823 root:root root:admin admin:admin