diff --git a/Connector.cpp b/Connector.cpp index 6570bbf..fcc13e7 100644 --- a/Connector.cpp +++ b/Connector.cpp @@ -398,12 +398,14 @@ int Connector::connectToPort(char* ip, int port) int sz = strlen(ip); if (443 == port) { strcpy(tempIp, "https://"); - strncat(tempIp, ip, sz > 119 ? 119 : sz); + } + else if (21 == port) { + strcpy(tempIp, "ftp://"); } else { strcpy(tempIp, "http://"); - strncat(tempIp, ip, sz > 119 ? 119 : sz); } + strncat(tempIp, ip, sz > 119 ? 119 : sz); if (port != 37777 && port != 8000 && port != 34567 && port != 9000){ if (port == 22) size = SSHAuth::SSHLobby(ip, port, &buffer); //SSH diff --git a/FTPAuth.cpp b/FTPAuth.cpp index 19f2d1f..5db3c6c 100644 --- a/FTPAuth.cpp +++ b/FTPAuth.cpp @@ -40,8 +40,6 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) { lpString = string(login) + ":" + string(pass); - nip[0] = 0; - sprintf(nip, "ftp://%s", ip); Connector con; res = con.nConnect(nip, port, &buffer, NULL, NULL, &lpString); if (res == -2) {