mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-24 03:02:19 +00:00
ftp fixes
This commit is contained in:
parent
6a91e4620e
commit
7003bc0392
18
FTPAuth.cpp
18
FTPAuth.cpp
@ -45,10 +45,26 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
|
|||||||
return lps;
|
return lps;
|
||||||
}
|
}
|
||||||
else if (res != -1) {
|
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;
|
if (!globalScanFlag) return lps;
|
||||||
strcpy(lps.login, login);
|
strcpy(lps.login, login);
|
||||||
strcpy(lps.pass, pass);
|
strcpy(lps.pass, pass);
|
||||||
ps->directoryCount = std::count(buffer.begin(), buffer.end(), '\n');
|
|
||||||
|
|
||||||
rowIndex = Utils::addBARow(QString(ip), QString(login) + ":" + QString(pass), "OK", rowIndex);
|
rowIndex = Utils::addBARow(QString(ip), QString(login) + ":" + QString(pass), "OK", rowIndex);
|
||||||
|
|
||||||
|
@ -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);
|
const lopaStr &lps = FTPA::FTPLobby(ip, port, &ps);
|
||||||
|
|
||||||
|
if (0 != ps.directoryCount) {
|
||||||
if (strstr(lps.login, "UNKNOWN") == NULL && strlen(lps.other) == 0)
|
if (strstr(lps.login, "UNKNOWN") == NULL && strlen(lps.other) == 0)
|
||||||
{
|
{
|
||||||
++PieBA;
|
++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);
|
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)",
|
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);
|
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;
|
++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);
|
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>",
|
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);
|
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));
|
stt->doEmitionFoundData(QString::fromLocal8Bit(log));
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,9 @@ typedef int BOOL;
|
|||||||
#define NEGATIVE_FN PWD_LIST_FOLDER "negatives.txt"
|
#define NEGATIVE_FN PWD_LIST_FOLDER "negatives.txt"
|
||||||
|
|
||||||
#define HTTP_FILE_STYLE "<style> #recvSpan{display: inline-block;width: 150px;} \
|
#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%;} \
|
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{background:black;width:100%;white-space:nowrap;overflow-x:none;display:inline-block;} \
|
||||||
#ipd:hover{color: #909090;background:#202020;} \
|
#ipd:hover{color: #909090;background:#202020;} \
|
||||||
|
@ -1404,10 +1404,10 @@ void nesca_3::switchToJobMode()
|
|||||||
}
|
}
|
||||||
|
|
||||||
void copyToClipboardLocation() {
|
void copyToClipboardLocation() {
|
||||||
ui->currentDirectoryLine->selectAll();
|
//ui->currentDirectoryLine->selectAll();
|
||||||
QClipboard *c = QApplication::clipboard();
|
//QClipboard *c = QApplication::clipboard();
|
||||||
QString dir = ui->currentDirectoryLine->text();
|
QString dir = ui->currentDirectoryLine->text();
|
||||||
c->setText(dir);
|
//c->setText(dir);
|
||||||
|
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(dir));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(dir));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user