From e869a19841933a7e9e84298b83b1c010b7def7ad Mon Sep 17 00:00:00 2001 From: cora32 Date: Sat, 16 Apr 2016 21:31:25 +0300 Subject: [PATCH] New ftp fizes --- FTPAuth.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/FTPAuth.cpp b/FTPAuth.cpp index c049e32..7f96a69 100644 --- a/FTPAuth.cpp +++ b/FTPAuth.cpp @@ -51,9 +51,17 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) { } return lps; } + int rootDir = std::count(buffer.begin(), buffer.end(), '.'); ps->directoryCount = std::count(buffer.begin(), buffer.end(), '\n'); - if (3 == ps->directoryCount) { + if (3 == rootDir && 2 == ps->directoryCount) { + if (gNegDebugMode) { + stt->doEmitionDebugFoundData("Ignoring " + QString(ip) + " (empty)"); + } + return lps; + } + + if (3 == ps->directoryCount || 1 == ps->directoryCount) { if (-1 != buffer.find("pub") || -1 != buffer.find("incoming")) { if (gNegDebugMode) { stt->doEmitionDebugFoundData("Ignoring " + QString(ip) + " (pub or incoming)");