ftp fixes

This commit is contained in:
cora32 2016-04-16 20:47:33 +03:00
parent 6a91e4620e
commit 7003bc0392
5 changed files with 60 additions and 40 deletions

View File

@ -45,10 +45,26 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
return lps;
}
else if (res != -1) {
if (buffer.find("syslog") != -1 || buffer.find("CFG-PAGE") != -1) {
if (gNegDebugMode) {
stt->doEmitionDebugFoundData("Ignoring " + QString(ip) + " (syslog or CFG-PAGE)");
}
return lps;
}
ps->directoryCount = std::count(buffer.begin(), buffer.end(), '\n');
if (3 == ps->directoryCount) {
if (-1 != buffer.find("pub") || -1 != buffer.find("incoming")) {
if (gNegDebugMode) {
stt->doEmitionDebugFoundData("Ignoring " + QString(ip) + " (pub or incoming)");
}
return lps;
}
}
if (!globalScanFlag) return lps;
strcpy(lps.login, login);
strcpy(lps.pass, pass);
ps->directoryCount = std::count(buffer.begin(), buffer.end(), '\n');
rowIndex = Utils::addBARow(QString(ip), QString(login) + ":" + QString(pass), "OK", rowIndex);

View File

@ -2960,11 +2960,12 @@ void parseFlag(int flag, char* ip, char *ipRaw, int port, std::string *buff, con
const lopaStr &lps = FTPA::FTPLobby(ip, port, &ps);
if (0 != ps.directoryCount) {
if (strstr(lps.login, "UNKNOWN") == NULL && strlen(lps.other) == 0)
{
++PieBA;
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)",
sprintf(log, "<div id=\"hostspan\"><font color=\"#0f62e2\">%s</font></div><div id=\"hostspan2\"> Size: %d</div><a href=\"ftp://%s:%s@%s/\"><div id=\"hostspan3\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></a>%s (F:%d)</div>",
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);
@ -2979,7 +2980,7 @@ 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> <font color=\"#43EC00\"><a href=\"%s\" style=\"color:#43EC00;\">[ROUTER]</a></font>%s",
sprintf(log, "<div id=\"hostspan\"><font color=\"#0f62e2\">%s:%d</font></div><div id=\"hostspan2\"> Size: %d</div><a href=\"ftp://%s:%s@%s/\"><div id=\"hostspan3\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></div></a> <font color=\"#43EC00\"><a href=\"%s\" style=\"color:#43EC00;\">[ROUTER]</a></font>%s",
ip, port, size, lps.login, lps.pass, ip, lps.login, lps.pass, ip, ip, ps.headr);
sprintf(logEmit, "[FTP]:<a href=\"ftp://%s:%s@%s/\"><span style=\"color: #ff6600;\">ftp://%s:%s@%s</span></a> <font color=\"#43EC00\"><a href=\"%s/\" style=\"color:#43EC00;\">[ROUTER]</a></font>",
lps.login, lps.pass, ip, lps.login, lps.pass, ip, ip);
@ -2997,6 +2998,7 @@ void parseFlag(int flag, char* ip, char *ipRaw, int port, std::string *buff, con
stt->doEmitionFoundData(QString::fromLocal8Bit(log));
};
}
return;
}

View File

@ -106,7 +106,9 @@ typedef int BOOL;
#define NEGATIVE_FN PWD_LIST_FOLDER "negatives.txt"
#define HTTP_FILE_STYLE "<style> #recvSpan{display: inline-block;width: 150px;} \
#hostSpan{display: inline-block;width: 200px;} \
#hostSpan{display: inline-block;width: 300px;} \
#hostSpan2{display: inline-block;width: 130px;} \
#hostSpan3{ display: inline-block; width: 210px; } \
body { background-color: #141414; font-family: monospace; font-size:95%;} \
#ipd{background:black;width:100%;white-space:nowrap;overflow-x:none;display:inline-block;} \
#ipd:hover{color: #909090;background:#202020;} \

View File

@ -1404,10 +1404,10 @@ void nesca_3::switchToJobMode()
}
void copyToClipboardLocation() {
ui->currentDirectoryLine->selectAll();
QClipboard *c = QApplication::clipboard();
//ui->currentDirectoryLine->selectAll();
//QClipboard *c = QApplication::clipboard();
QString dir = ui->currentDirectoryLine->text();
c->setText(dir);
//c->setText(dir);
QDesktopServices::openUrl(QUrl::fromLocalFile(dir));
}

View File

@ -1 +1 @@
2729A-B
272A0-7FA