mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-12-26 01:11:47 +00:00
FTP brute fixed.
NPE on restart fixed.
This commit is contained in:
parent
536342b6f4
commit
6a91e4620e
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
11
finder.cpp
11
finder.cpp
@ -2964,17 +2964,16 @@ void parseFlag(int flag, char* ip, char *ipRaw, int port, std::string *buff, con
|
||||
{
|
||||
++PieBA;
|
||||
|
||||
sprintf(log, "[FTP]:<font color=\"#0f62e2\">%s:%d</font>; Received: %d<a href=\"ftp://%s:%s@%s/\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></a>%s (F:%d)",
|
||||
ip, port, size, lps.login, lps.pass, ip, lps.login, lps.pass, ip, ps.headr, ps.directoryCount);
|
||||
sprintf(logEmit, "[FTP]:<a href=\"ftp://%s:%s@%s/\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></a> (F:%d)",
|
||||
lps.login, lps.pass, ip, lps.login, lps.pass, ip, ps.directoryCount);
|
||||
sprintf(log, "[FTP]:<font color=\"#0f62e2\">%s</font>; Received: %d<a href=\"ftp://%s:%s@%s/\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></a>%s (F:%d)",
|
||||
ip, size, lps.login, lps.pass, ipRaw, lps.login, lps.pass, ipRaw, ps.headr, ps.directoryCount);
|
||||
sprintf(logEmit, "[FTP]:<a href=\"ftp://%s:%s@%s\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></a> (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: ");
|
||||
|
Loading…
Reference in New Issue
Block a user