diff --git a/Connector.cpp b/Connector.cpp index e3917a3..0e3af28 100644 --- a/Connector.cpp +++ b/Connector.cpp @@ -562,6 +562,7 @@ int Connector::connectToPort(char* ip, int port) else if (21 == port) { //strcpy(tempIp, "ftp://"); sprintf(tempIp, "ftp://%s:%d", ip, port); + //sprintf(tempIp, "%s", ip); } /*else if (554 == port) { sprintf(tempIp, "rtsp://%s:%d", ip, port); @@ -574,6 +575,7 @@ int Connector::connectToPort(char* ip, int port) if (port != 37777 && port != 8000 && port != 34567 && port != 9000){ if (port == 22) size = SSHAuth::SSHLobby(ip, port, &buffer); //SSH + else if (21 == port) size = nConnect(ip, port, &buffer); else size = nConnect(tempIp, port, &buffer); if (size > 0) diff --git a/FTPAuth.cpp b/FTPAuth.cpp index 777c0d0..a479ed3 100644 --- a/FTPAuth.cpp +++ b/FTPAuth.cpp @@ -36,7 +36,7 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) { strcpy(pass, ftpPassLst[j]); if (strlen(pass) <= 1) continue; - lpString = string(login) + string(pass); + lpString = string(login) + ":" + string(pass); Connector con; res = con.nConnect(ip, port, &buffer, NULL, NULL, &lpString); diff --git a/FileUpdater.cpp b/FileUpdater.cpp index 4801b49..8b70d64 100644 --- a/FileUpdater.cpp +++ b/FileUpdater.cpp @@ -393,6 +393,7 @@ long getFileSize(const char *fileName) { } void updateList(const char *fileName, long *szPtr, void *funcPtr(void)) { + if (!globalScanFlag) return; long sz = getFileSize(fileName); if(sz != *szPtr) { @@ -408,7 +409,7 @@ void updateList(const char *fileName, long *szPtr, void *funcPtr(void)) { void FileUpdater::updateLists() { running = true; while(globalScanFlag) { - Sleep(1000); + Sleep(30000); if(!globalScanFlag) break; loadOnce(); } diff --git a/finder.cpp b/finder.cpp index 1bebaab..20661c0 100644 --- a/finder.cpp +++ b/finder.cpp @@ -2964,17 +2964,16 @@ void parseFlag(int flag, char* ip, char *ipRaw, int port, std::string *buff, con { ++PieBA; - sprintf(log, "[FTP]:%s:%d; Received: %dftp://%s:%s@%s%s (F:%d)", - ip, port, size, lps.login, lps.pass, ip, lps.login, lps.pass, ip, ps.headr, ps.directoryCount); - sprintf(logEmit, "[FTP]:ftp://%s:%s@%s (F:%d)", - lps.login, lps.pass, ip, lps.login, lps.pass, ip, ps.directoryCount); + sprintf(log, "[FTP]:%s; Received: %dftp://%s:%s@%s%s (F:%d)", + ip, size, lps.login, lps.pass, ipRaw, lps.login, lps.pass, ipRaw, ps.headr, ps.directoryCount); + sprintf(logEmit, "[FTP]:ftp://%s:%s@%s (F:%d)", + lps.login, lps.pass, ipRaw, lps.login, lps.pass, ipRaw, ps.directoryCount); fputsf(log, flag); fillGlobalLogData(ip, port, std::to_string(size).c_str(), "[FTP service]", lps.login, lps.pass, "NULL", cp, "FTP"); stt->doEmitionFoundData(QString::fromLocal8Bit(logEmit)); - } else if (strstr(lps.other, "ROUTER") != NULL) { @@ -2998,6 +2997,8 @@ void parseFlag(int flag, char* ip, char *ipRaw, int port, std::string *buff, con stt->doEmitionFoundData(QString::fromLocal8Bit(log)); }; + + return; } const std::string &cookieRef = Utils::getHeaderValue(buff, "Set-Cookie: ", "Cookie: "); diff --git a/version b/version index 6c2129a..2b89c2b 100644 --- a/version +++ b/version @@ -1 +1 @@ -271CF-7D5 \ No newline at end of file +2729A-B \ No newline at end of file