mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
Фикс счетчика директорий и тестовый фикс 10038
This commit is contained in:
parent
1008076fec
commit
4b965e5976
@ -17,14 +17,14 @@ fd_set write_fs;
|
||||
|
||||
|
||||
int _countFTPDirectories(char *recvBuff){
|
||||
if(strcmp(recvBuff, "dummy\r\n") == 0) return 0;
|
||||
int dirCounter = 0;
|
||||
strcat(recvBuff, "\n");
|
||||
if(recvBuff[strlen(recvBuff) - 1] != '\n') strcat(recvBuff, "\n");
|
||||
char *dirPtr = strstr(recvBuff, "\n");
|
||||
while(dirPtr != NULL){
|
||||
++dirCounter;
|
||||
dirPtr = strstr(dirPtr + 1, "\n");
|
||||
};
|
||||
|
||||
return dirCounter;
|
||||
};
|
||||
void BConInc()
|
||||
@ -918,8 +918,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
|
||||
while (true)
|
||||
{
|
||||
Sleep(100);
|
||||
if(globalScanFlag == false) break;
|
||||
ZeroMemory(recvBuff, sizeof(recvBuff));
|
||||
ZeroMemory(recvBuff, 1024);
|
||||
x = recvWT(sockFTP, recvBuff, 1024, gTimeOut + 5, &bTO);
|
||||
if(x <= 0) break;
|
||||
if(MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(recvBuff));
|
||||
@ -993,6 +992,8 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
|
||||
break;
|
||||
};
|
||||
|
||||
if(globalScanFlag == false) break;
|
||||
|
||||
if((strstr(recvBuff, "530 Sorry") != NULL)
|
||||
|| (strstr(recvBuff, "530") != NULL && strstr(recvBuff, "maximum") != NULL)
|
||||
|| strstr(recvBuff, "exceeded") != NULL
|
||||
@ -1519,7 +1520,18 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C
|
||||
if (!iResult) ++offlines;
|
||||
else
|
||||
{
|
||||
if(send(sock, request, strlen(request), 0) != SOCKET_ERROR)
|
||||
int sResult = send(sock, request, strlen(request), 0);
|
||||
while(sResult == SOCKET_ERROR)
|
||||
{
|
||||
stt->doEmitionRedFoundData("[_EC]Resending: " + QString(ip) + " - " + QString::number(WSAGetLastError()));
|
||||
|
||||
CSSOCKET(sock);
|
||||
Sleep(100);
|
||||
sock = socket( AF_INET, SOCK_STREAM, IPPROTO_TCP );
|
||||
connect(sock, (sockaddr*)&sockAddr, sizeof(sockAddr));
|
||||
sResult = send(sock, request, strlen(request), 0);
|
||||
};
|
||||
if(sResult != SOCKET_ERROR)
|
||||
{
|
||||
if(MapWidgetOpened) stt->doEmitionAddOutData(QString(ip), QString(request));
|
||||
Activity += strlen(request);
|
||||
@ -1555,7 +1567,7 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C
|
||||
else
|
||||
{
|
||||
++offlines;
|
||||
stt->doEmitionRedFoundData("Send error " + QString(ip) + " - " + QString::number(WSAGetLastError()));
|
||||
stt->doEmitionRedFoundData("[_EC]Send error: " + QString(ip) + " - " + QString::number(WSAGetLastError()));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define SD_BOTH 2
|
||||
#define PORTSET "80,81,88,8080,8081,60001,60002,8008,8888,554,9000,441,4111,6667,3536,22,21"
|
||||
#define IRC_CHAN "iskopasi_lab03"
|
||||
#define CSSOCKET(Socket) shutdown(Socket, SD_BOTH); closesocket(Socket);
|
||||
#define CSSOCKET(Socket) shutdown(Socket, SD_BOTH); closesocket(Socket); Socket = -1;
|
||||
|
||||
extern QJsonArray *jsonArr;
|
||||
|
||||
|
11
finder.cpp
11
finder.cpp
@ -244,11 +244,12 @@ int _mainFinderFirst(char *buffcpy, int f, int port, char *ip)
|
||||
if(strstr(buffcpy, "vilar ipcamera")) return 13;
|
||||
if(strstr(buffcpy, "window.location = \"rdr.cgi\"")) return 14;
|
||||
if(strstr(buffcpy, "httpfileserver")) return 15;
|
||||
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
||||
(strstri(buffcpy, "220 diskStation ftp server ready") != NULL) ||
|
||||
(strstri(buffcpy, "220 ftp server ready") != NULL)
|
||||
|| strstr(buffcpy, "500 'get': command not understood") != NULL
|
||||
) return 16; // 16 - FTP
|
||||
if(((strstr(buffcpy, "220") != NULL && port == 21) ||
|
||||
strstr(buffcpy, "220 diskstation ftp server ready") != NULL ||
|
||||
strstr(buffcpy, "220 ftp server ready") != NULL ||
|
||||
strstr(buffcpy, "500 'get': command not understood") != NULL
|
||||
)
|
||||
&& strstr(buffcpy, "firewall authentication required") == NULL) return 16; // 16 - FTP
|
||||
if(strstr(buffcpy, "real-time ip camera monitoring system") != NULL ||
|
||||
strstr(buffcpy, "server push mode") != NULL
|
||||
) return 17; //Real-time IP Camera Monitoring System
|
||||
|
@ -1,4 +1,5 @@
|
||||
yadro.ru
|
||||
Firewall Authentication required before
|
||||
liveinternet
|
||||
#[Dlink]
|
||||
session_login.php?reload=1
|
||||
|
Loading…
Reference in New Issue
Block a user