From 31dbbabf96225d6ecf7f738b47e7872e7a31e369 Mon Sep 17 00:00:00 2001 From: cora32 Date: Sun, 22 Mar 2015 13:13:17 +0300 Subject: [PATCH] Added FTP/BA progress info. --- BasicAuth.cpp | 5 +++++ FTPAuth.cpp | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/BasicAuth.cpp b/BasicAuth.cpp index e41b897..59b099f 100644 --- a/BasicAuth.cpp +++ b/BasicAuth.cpp @@ -36,6 +36,7 @@ lopaStr BA::_BABrute(const char *ip, const int port) { ZeroMemory(lps.login, sizeof(lps.login)); ZeroMemory(lps.pass, sizeof(lps.pass)); ZeroMemory(lps.other, sizeof(lps.other)); + int passCounter = 0; strcpy(lps.login, "UNKNOWN"); @@ -53,6 +54,10 @@ lopaStr BA::_BABrute(const char *ip, const int port) { return lps; }; + if (BALogSwitched) stt->doEmitionBAData("FTP: " + QString(ip) + ":" + QString::number(port) + + "; l/p: " + QString(loginLst[i]) + ":" + QString(passLst[j]) + "; - Progress: (" + + QString::number((++passCounter / (double)(MaxPass*MaxLogin)) * 100).mid(0, 4) + "%)"); + Sleep(100); } } diff --git a/FTPAuth.cpp b/FTPAuth.cpp index f1c75f7..c14cc0d 100644 --- a/FTPAuth.cpp +++ b/FTPAuth.cpp @@ -19,6 +19,7 @@ lopaStr FTPA::_FTPBrute(const char *ip, const int port, PathStr *ps) { strcpy(lps.login, "UNKNOWN"); int res = 0; + int passCounter = 0; for(int i = 0; i < MaxLogin; ++i) { @@ -41,8 +42,12 @@ lopaStr FTPA::_FTPBrute(const char *ip, const int port, PathStr *ps) { ps->directoryCount = std::count(buffer.begin(), buffer.end(), '\n'); return lps; }; - - Sleep(70); + + if (BALogSwitched) stt->doEmitionBAData("FTP: " + QString(ip) + ":" + QString::number(port) + + "; l/p: " + QString(loginLst[i]) + ":" + QString(passLst[j]) + "; - Progress: (" + + QString::number((++passCounter / (double)(MaxPass*MaxLogin)) * 100).mid(0, 4) + "%)"); + + Sleep(100); } }