mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
rgt
This commit is contained in:
parent
51ef7cd65d
commit
a9f8a4eb68
@ -6,6 +6,7 @@
|
||||
#include "mainResources.h"
|
||||
#include "externFunctions.h"
|
||||
#include "externData.h"
|
||||
#include <openssl/err.h>
|
||||
|
||||
#if defined(Q_OS_WIN32)
|
||||
#include <iphlpapi.h>
|
||||
@ -172,14 +173,13 @@ int OpenConnection(SOCKET *sock, const char *hostname, int port)
|
||||
|
||||
void _baSSLWorker(char *ip, char *request, char *rvBuff)
|
||||
{
|
||||
SSL_CTX *ctx = NULL;
|
||||
const SSL_METHOD *method = SSLv3_client_method(); /* Create new client-method instance */
|
||||
ctx = SSL_CTX_new(method); /* Create new context */
|
||||
SSL_CTX_set_timeout(ctx, gTimeOut);
|
||||
SOCKET sock;
|
||||
SSL_CTX *ctx = SSL_CTX_new(method); /* Create new context */
|
||||
|
||||
if(ctx != NULL)
|
||||
{
|
||||
SOCKET sock;
|
||||
SSL_CTX_set_timeout(ctx, gTimeOut);
|
||||
int result = OpenConnection(&sock, ip, 443);
|
||||
if(result >= 0)
|
||||
{
|
||||
@ -223,7 +223,12 @@ void _baSSLWorker(char *ip, char *request, char *rvBuff)
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("SSL(InitCTX).");
|
||||
char buff1[512] = {0};
|
||||
char buff2[512] = {0};
|
||||
|
||||
ERR_error_string(ERR_peek_error(), buff1);
|
||||
ERR_error_string(ERR_peek_last_error(), buff2);
|
||||
stt->doEmitionRedFoundData(QString(ip) + " SSL(InitCTX) 1:" + QString(buff1) + " 2:" + QString(buff2));
|
||||
};
|
||||
};
|
||||
char *_getAttributeValue(char *str, char *val, char *ip, int port)
|
||||
@ -1239,7 +1244,7 @@ lopaStr _FTPBrute(char *ip, int port, PathStr *ps)
|
||||
|
||||
if(gThreads > 1 && WSAerr != 10060/*Timeout*/ && WSAerr != 10055/*POOLOVERFLOW*/ && WSAerr != 10061/*WSAECONNREFUSED*/ && WSAerr != 10054/*WSACONNABORTED*/ && WSAerr != 0)
|
||||
{
|
||||
stt->doEmitionRedFoundData("[FTPBrute] Cannot connect to " + QString(ip) + " " + QString(std::to_string((long double)WSAerr).c_str()));
|
||||
stt->doEmitionRedFoundData("[FTPBrute] Cannot connect to " + QString(ip) + " " + QString(std::to_string(WSAerr).c_str()));
|
||||
};
|
||||
CSSOCKET(sockFTP);
|
||||
isActive = 0;
|
||||
@ -1284,14 +1289,13 @@ int _sslConnectTo(char *iph, int porth, char *requesth, conSTR *CSTR)
|
||||
int bytes = 0;
|
||||
char *recvBuff2 = 0;
|
||||
int resCode = 0;
|
||||
SOCKET sock;
|
||||
|
||||
SSL_CTX *ctx = NULL;
|
||||
const SSL_METHOD *method = SSLv3_client_method(); /* Create new client-method instance */
|
||||
ctx = SSL_CTX_new(method); /* Create new context */
|
||||
SSL_CTX_set_timeout(ctx, gTimeOut);
|
||||
SSL_CTX *ctx = SSL_CTX_new(method); /* Create new context */
|
||||
if(ctx != NULL)
|
||||
{
|
||||
SOCKET sock;
|
||||
SSL_CTX_set_timeout(ctx, gTimeOut);
|
||||
resCode = OpenConnection(&sock, iph, porth);
|
||||
if(resCode >= 0)
|
||||
{
|
||||
@ -1407,9 +1411,17 @@ int _sslConnectTo(char *iph, int porth, char *requesth, conSTR *CSTR)
|
||||
return 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
stt->doEmitionRedFoundData("SSL(InitCTX).");
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
char buff1[512] = {0};
|
||||
char buff2[512] = {0};
|
||||
|
||||
ERR_error_string(ERR_peek_error(), buff1);
|
||||
ERR_error_string(ERR_peek_last_error(), buff2);
|
||||
stt->doEmitionRedFoundData(QString(iph) + ":" + QString(porth) + " SSL(InitCTX) 1:" + QString(buff1) + " 2:" + QString(buff2));
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
int Connector::_EstablishSSLConnection(char *iph, int porth, char *requesth, conSTR *CSTR)
|
||||
{
|
||||
|
43
finder.cpp
43
finder.cpp
@ -307,6 +307,7 @@ int _mainFinderFirst(char *buffcpy, int f, int port, char *ip)
|
||||
|| strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL
|
||||
|| strstr(buffcpy, "ipcam") != NULL
|
||||
) return 0;
|
||||
|
||||
if(lxf.globalSearchNeg(buffcpy, ip, port) == -1) return -1;
|
||||
if(globalSearchPrnt(buffcpy) == -1) return -1;
|
||||
if(strstr(buffcpy, "<form ") != NULL && strstr(buffcpy, "302 found") == NULL) return 10;
|
||||
@ -380,7 +381,6 @@ int _mainFinderSecond(char *buffcpy, int port, char *ip)
|
||||
if(strstr(buffcpy, "dvr") != NULL && strstr(buffcpy, "ieorforefox") != NULL
|
||||
&& strstr(buffcpy, "sofari") != NULL) return 49; //IEORFOREFOX
|
||||
|
||||
|
||||
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
||||
(strstr(buffcpy, "220 diskStation ftp server ready") != NULL) ||
|
||||
(strstr(buffcpy, "220 ftp server ready") != NULL)
|
||||
@ -786,35 +786,35 @@ void putInFile(int flag, char *ip, char *port, int recd, char *finalstr, char *h
|
||||
strcat(log, ":");
|
||||
strcat(log, port);
|
||||
strcat(log, "</font></a>;</span> <span id=\"recvSpan\">Received: <font color=SteelBlue>");
|
||||
strcat(log, std::to_string((long double)recd).c_str());
|
||||
strcat(log, std::to_string(recd).c_str());
|
||||
strcat(log, "</font>");
|
||||
|
||||
if(flag == 666 || flag == 350)
|
||||
{
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), finalstr, "", "", "", cp, "Strange error");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), finalstr, "", "", "", cp, "Strange error");
|
||||
++PieAnomC1;
|
||||
++AnomC1;
|
||||
}
|
||||
else if(flag == 0 || flag == 15 || flag == -10)
|
||||
{
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), finalstr, "", "", "", cp, "Anomaly");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), finalstr, "", "", "", cp, "Anomaly");
|
||||
++PieAnomC1;
|
||||
++AnomC1;
|
||||
}
|
||||
else if(flag == 3)
|
||||
{
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), finalstr, "", "", "", cp, "Suspicious");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), finalstr, "", "", "", cp, "Suspicious");
|
||||
++PieSusp;
|
||||
++Susp;
|
||||
}
|
||||
else if(flag == 7)
|
||||
{
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), finalstr, "", "", "", cp, "Low load");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), finalstr, "", "", "", cp, "Low load");
|
||||
++PieLowl;
|
||||
}
|
||||
else if(flag == 10)
|
||||
{
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), finalstr, "", "", "", cp, "Login form");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), finalstr, "", "", "", cp, "Login form");
|
||||
++PieWF;
|
||||
};
|
||||
|
||||
@ -1169,14 +1169,14 @@ void _specWFBrute(char *ip, int port, char *hl, char *buff, int flag, char *path
|
||||
else
|
||||
{
|
||||
if(gNegDebugMode) stt->doEmitionFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: No text/password fields found.");
|
||||
///fillGlobalLogData(ip, hl, tport, std::to_string((long double)recd).c_str(), title, "NULL", "NULL", comment, cp, tclass);
|
||||
///fillGlobalLogData(ip, hl, tport, std::to_string(recd).c_str(), title, "NULL", "NULL", comment, cp, tclass);
|
||||
///putInFile(flag, ip, tport, recd, title, hl, cp);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: Cannot find form block.");
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string((long double)recd).c_str(), title, "NULL", "NULL", comment, cp, tclass);
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string(recd).c_str(), title, "NULL", "NULL", comment, cp, tclass);
|
||||
putInFile(flag, ip, tport, recd, title, hl, cp);
|
||||
};
|
||||
|
||||
@ -1244,19 +1244,20 @@ void _specWFBrute(char *ip, int port, char *hl, char *buff, int flag, char *path
|
||||
{
|
||||
_specFillerWF(hl, ip, tport, title, lps.login, lps.pass, flag);
|
||||
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string((long double)recd).c_str(), title, lps.login, lps.pass, comment, cp, tclass);
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string(recd).c_str(), title, lps.login, lps.pass, comment, cp, tclass);
|
||||
putInFile(flag, ip, tport, recd, title, hl, cp);
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
if(gNegDebugMode) stt->doEmitionFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: Cannot find user/pass field.");
|
||||
///fillGlobalLogData(ip, hl, tport, std::to_string((long double)recd).c_str(), title, "", "", "UnknownWebform", cp, tclass);
|
||||
///fillGlobalLogData(ip, hl, tport, std::to_string(recd).c_str(), title, "", "", "UnknownWebform", cp, tclass);
|
||||
///putInFile(flag, ip, tport, recd, title, hl, cp);
|
||||
};
|
||||
};
|
||||
isActive = 0;
|
||||
};
|
||||
|
||||
void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag, char *comment, char *tclass, char *cp, int recd, char *SPEC)
|
||||
{
|
||||
lopaStr lps;
|
||||
@ -1274,7 +1275,7 @@ void _specWEBIPCAMBrute(char *ip, int port, char *hl, char *finalstr, int flag,
|
||||
{
|
||||
_specFillerBA(hl, ip, tport, finalstr, lps.login, lps.pass, flag);
|
||||
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string((long double)recd).c_str(), finalstr, lps.login, lps.pass, comment, cp, "Basic Authorization");
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string(recd).c_str(), finalstr, lps.login, lps.pass, comment, cp, "Basic Authorization");
|
||||
};
|
||||
};
|
||||
void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int flag, char *path, char *comment, char *tclass, char *cp, int recd, char *data)
|
||||
@ -1298,7 +1299,7 @@ void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int
|
||||
{
|
||||
_specFillerBA(hl, ip, tport, finalstr, lps.login, lps.pass, flag);
|
||||
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string((long double)recd).c_str(), finalstr, lps.login, lps.pass, comment, cp, "Basic Authorization");
|
||||
fillGlobalLogData(ip, hl, tport, std::to_string(recd).c_str(), finalstr, lps.login, lps.pass, comment, cp, "Basic Authorization");
|
||||
};
|
||||
|
||||
ZeroMemory(temp, sizeof(temp));
|
||||
@ -1459,7 +1460,7 @@ void _saveSSH(char *ip, int port, int recd, char *buffcpy)
|
||||
char *ptrl2 = strstr(buffcpy, "@");
|
||||
lpsz = ptrl2 - ptrl1;
|
||||
strncpy(passSSH, ptrl1 + 1, lpsz);
|
||||
fillGlobalLogData(ip, "", itoa(port, b, 10), std::to_string((long double)recd).c_str(), "[SSH service]", loginSSH, passSSH, "NULL", "UTF-8", "SSH");
|
||||
fillGlobalLogData(ip, "", itoa(port, b, 10), std::to_string(recd).c_str(), "[SSH service]", loginSSH, passSSH, "NULL", "UTF-8", "SSH");
|
||||
stt->doEmitionFoundData(QString::fromLocal8Bit(logEmit));
|
||||
}
|
||||
else
|
||||
@ -1477,7 +1478,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
||||
char b[16] = {0};
|
||||
|
||||
if( strstr(buffcpy, "[IGNR_ADDR]") != NULL ) return -1;
|
||||
if( strstr(buffcpy, "SSH-2.0-OpenSSH") != NULL )
|
||||
if( strstr(buffcpy, "SSH-2.0-OpenSSH") != NULL || strstr(buffcpy, "SSH-2.0-mod_sftp") != NULL)
|
||||
{
|
||||
Connector con;
|
||||
conSTR CSTR;
|
||||
@ -1567,7 +1568,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
||||
strcat(log, port);
|
||||
strcat(log, "</font>");
|
||||
strcat(log, "; Received: ");
|
||||
strncat(log, std::to_string((long double)recd).c_str(), 100);
|
||||
strncat(log, std::to_string(recd).c_str(), 100);
|
||||
|
||||
lps = con._FTPLobby(ip, p, &ps);
|
||||
|
||||
@ -1609,7 +1610,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
||||
|
||||
fputsf (ip, port, log, flag, "FTP");
|
||||
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), "[FTP service]", lps.login, lps.pass, "Router FTP detected.", cp, "FTP");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), "[FTP service]", lps.login, lps.pass, "Router FTP detected.", cp, "FTP");
|
||||
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
@ -1647,12 +1648,12 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
||||
strcat(logEmit, "@");
|
||||
strcat(logEmit, ip);
|
||||
strcat(logEmit, "</span></a> (F:");
|
||||
strcat(logEmit, std::to_string((long double)ps.directoryCount).c_str());
|
||||
strcat(logEmit, std::to_string(ps.directoryCount).c_str());
|
||||
strcat(logEmit, ")");
|
||||
|
||||
fputsf(ip, port, log, flag, "FTP");
|
||||
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), "[FTP service]", lps.login, lps.pass, "NULL", cp, "FTP");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), "[FTP service]", lps.login, lps.pass, "NULL", cp, "FTP");
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionFoundData(QString::fromLocal8Bit(logEmit));
|
||||
#pragma endregion
|
||||
@ -1841,7 +1842,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
||||
strcat(log, ":");
|
||||
strcat(log, lps.pass);
|
||||
strcat(log, "</font>");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string((long double)recd).c_str(), finalstr, lps.login, lps.pass, "HFS-FTP", cp, "Basic Authorization");
|
||||
fillGlobalLogData(ip, hl, port, std::to_string(recd).c_str(), finalstr, lps.login, lps.pass, "HFS-FTP", cp, "Basic Authorization");
|
||||
fputsf (ip, port, log , flag, "HFS");
|
||||
stt->doEmitionFoundData(QString::fromLocal8Bit(log));
|
||||
ZeroMemory(temp, sizeof(temp));
|
||||
@ -2867,7 +2868,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
||||
strcpy(lol, "http://");
|
||||
strcat(lol, ip);
|
||||
strcat(lol, ":");
|
||||
strcat(lol, std::to_string((long double)port).c_str());
|
||||
strcat(lol, std::to_string(port).c_str());
|
||||
if(script[0] != '/') strcat(lol, "/");
|
||||
strcat(lol, script);
|
||||
}
|
||||
|
22
main.cpp
22
main.cpp
@ -6,18 +6,20 @@
|
||||
#endif
|
||||
|
||||
//--Fixing _ITERATOR_DEBUG_LEVEL 0!=2
|
||||
#if defined(Q_OS_WIN32)
|
||||
int WINAPI WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance, LPSTR lpcmdline, int ncmdshow)
|
||||
{
|
||||
QApplication a(ncmdshow, (char **)lpcmdline);
|
||||
#else
|
||||
//#if defined(Q_OS_WIN32)
|
||||
//int WINAPI WinMain(HINSTANCE hInstance,
|
||||
// HINSTANCE hPrevInstance, LPSTR lpcmdline, int ncmdshow)
|
||||
//{
|
||||
// QApplication a(ncmdshow, (char **)lpcmdline);
|
||||
//#else
|
||||
//int main(int argc, char *argv[])
|
||||
//{
|
||||
// QApplication a(argc, argv);
|
||||
//#endif
|
||||
//#if defined(Q_OS_WIN32)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
#endif
|
||||
#if defined(Q_OS_WIN32)
|
||||
|
||||
QStringList list;
|
||||
list << "Eurostile.ttf";
|
||||
int fontID(-1);
|
||||
@ -36,7 +38,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
//#endif
|
||||
nesca_3 *gui = new nesca_3();
|
||||
|
||||
gui->showNormal();
|
||||
|
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "base64.h"
|
||||
|
||||
#include <libssh\libssh.h>
|
||||
#if defined(Q_OS_WIN32)
|
||||
#pragma once
|
||||
#include "iostream"
|
||||
|
@ -696,7 +696,7 @@ void nesca_3::slotQoSAddLine()
|
||||
fnt.setFamily("Eurostile");
|
||||
fnt.setPixelSize(10);
|
||||
|
||||
QGraphicsTextItem *item = sceneUpper->addText("Max = " + QString(std::to_string((long double)MaxDataVal).c_str()), fnt);
|
||||
QGraphicsTextItem *item = sceneUpper->addText("Max = " + QString(std::to_string(MaxDataVal).c_str()), fnt);
|
||||
item->setX(215);
|
||||
item->setDefaultTextColor(Qt::white);
|
||||
QOSWait = false;
|
||||
@ -2938,6 +2938,10 @@ void RestoreSession()
|
||||
lex = strtok(strstr(resStr, "[SESSION]:") + strlen("[SESSION]:"), " ");
|
||||
gMode = atoi(lex);
|
||||
lex = strtok(NULL, " ");
|
||||
if (lex == nullptr) {
|
||||
stt->doEmitionRedFoundData("Restore file is corrupted.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(gMode == 0)
|
||||
{
|
||||
|
@ -186,7 +186,7 @@ void _SaveBackupToFile()
|
||||
if(strlen(endIP2) > 0)
|
||||
{
|
||||
strcpy(saveStr, "[SESSION]:");
|
||||
strcat(saveStr, std::to_string((long double)gMode).c_str());
|
||||
strcat(saveStr, std::to_string(gMode).c_str());
|
||||
strcat(saveStr, " ");
|
||||
if(gMode == 0) strcat(saveStr, saveStartIP);
|
||||
strcat(saveStr, endStr);
|
||||
@ -196,7 +196,7 @@ void _SaveBackupToFile()
|
||||
strcat(saveStr, top_level_domain);
|
||||
};
|
||||
strcat(saveStr, " ");
|
||||
strcat(saveStr, std::to_string((long double)gThreads).c_str());
|
||||
strcat(saveStr, std::to_string(gThreads).c_str());
|
||||
strcat(saveStr, " ");
|
||||
strcat(saveStr, gPorts);
|
||||
|
||||
@ -220,9 +220,9 @@ void _SaveBackupToFile()
|
||||
{
|
||||
for(int i = 0; i < 4; ++i)
|
||||
{
|
||||
strcat(curIpStart, std::to_string((long double)ipsstartfl[tCounter][i]).c_str());
|
||||
strcat(curIpStart, std::to_string(ipsstartfl[tCounter][i]).c_str());
|
||||
if ( i != 3) strcat(curIpStart, ".");
|
||||
strcat(curIpEnd, std::to_string((long double)ipsendfl[tCounter][i]).c_str());
|
||||
strcat(curIpEnd, std::to_string(ipsendfl[tCounter][i]).c_str());
|
||||
if ( i != 3) strcat(curIpEnd, ".");
|
||||
};
|
||||
|
||||
@ -243,10 +243,10 @@ void _SaveBackupToFile()
|
||||
};
|
||||
|
||||
strcpy(saveStr, "[SESSION]:");
|
||||
strcat(saveStr, std::to_string((long double)gMode).c_str());
|
||||
strcat(saveStr, std::to_string(gMode).c_str());
|
||||
strcat(saveStr, " RESTORE_IMPORT_SESSION");
|
||||
strcat(saveStr, " ");
|
||||
strcat(saveStr, std::to_string((long double)gThreads).c_str());
|
||||
strcat(saveStr, std::to_string(gThreads).c_str());
|
||||
strcat(saveStr, " ");
|
||||
strcat(saveStr, gPorts);
|
||||
|
||||
@ -403,7 +403,7 @@ void *_timer()
|
||||
|
||||
if(ips > 0)
|
||||
{
|
||||
strncpy(dbuffer, std::to_string((long double)((gTargets + 1)/ips/3600/24)).c_str(), 5);
|
||||
strncpy(dbuffer, std::to_string(((gTargets + 1)/ips/3600/24)).c_str(), 5);
|
||||
}
|
||||
else strcpy(dbuffer, "INF");
|
||||
strcpy(metaETA, dbuffer);
|
||||
@ -641,7 +641,7 @@ void *_tracker()
|
||||
strcat(msg, ndbServer);
|
||||
strcat(msg, "\r\nContent-Type: application/json\r\nAccept-Encoding: application/json\r\nContent-Length: ");
|
||||
|
||||
strcat(msg, std::to_string((long double)r.size()).c_str());
|
||||
strcat(msg, std::to_string(r.size()).c_str());
|
||||
strcat(msg, "\r\nConnection: close\r\n\r\n");
|
||||
|
||||
strcat(msg, r.data());
|
||||
@ -850,7 +850,7 @@ unsigned long int numOfIps(int ipsstart[], int ipsend[])
|
||||
// // else
|
||||
// // {
|
||||
// // strcpy(res, "Hostname: ");
|
||||
// // //if(result->h_length != NULL) strcat(res, std::to_string((long double)result->h_length).c_str());
|
||||
// // //if(result->h_length != NULL) strcat(res, std::to_string(result->h_length).c_str());
|
||||
// // //strcat(res, " ");
|
||||
// // //if(result->h_name != NULL) strcat(res, (result->h_name));
|
||||
// // //strcat(res, ":");
|
||||
@ -884,7 +884,7 @@ void *_connect(void* ss)
|
||||
for(int i = 0; i <= overallPorts; ++i)
|
||||
{
|
||||
if(globalScanFlag == false) break;
|
||||
if(con._ConnectToPort( ip, std::to_string((long double)portArr[i]).c_str(), "" ) == -2) break;
|
||||
if(con._ConnectToPort( ip, std::to_string(portArr[i]).c_str(), "" ) == -2) break;
|
||||
};
|
||||
|
||||
ConDec();
|
||||
@ -966,7 +966,7 @@ void _passLoginFapper()
|
||||
};
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionGreenFoundData("Password list loaded (" + QString(std::to_string((long double)MaxPass).c_str()) + " entries)");
|
||||
stt->doEmitionGreenFoundData("Password list loaded (" + QString(std::to_string(MaxPass).c_str()) + " entries)");
|
||||
#pragma endregion
|
||||
|
||||
i = 0;
|
||||
@ -981,7 +981,7 @@ void _passLoginFapper()
|
||||
};
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionGreenFoundData("Login list loaded (" + QString(std::to_string((long double)MaxLogin).c_str()) + " entries)");
|
||||
stt->doEmitionGreenFoundData("Login list loaded (" + QString(std::to_string(MaxLogin).c_str()) + " entries)");
|
||||
#pragma endregion
|
||||
|
||||
fclose(loginList);
|
||||
@ -1047,7 +1047,7 @@ void _passLoginFapper()
|
||||
};
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionGreenFoundData("WFPassword list loaded (" + QString(std::to_string((long double)MaxWFPass).c_str()) + " entries)");
|
||||
stt->doEmitionGreenFoundData("WFPassword list loaded (" + QString(std::to_string(MaxWFPass).c_str()) + " entries)");
|
||||
#pragma endregion
|
||||
|
||||
i = 0;
|
||||
@ -1062,7 +1062,7 @@ void _passLoginFapper()
|
||||
};
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionGreenFoundData("WFLogin list loaded (" + QString(std::to_string((long double)MaxWFLogin).c_str()) + " entries)");
|
||||
stt->doEmitionGreenFoundData("WFLogin list loaded (" + QString(std::to_string(MaxWFLogin).c_str()) + " entries)");
|
||||
#pragma endregion
|
||||
|
||||
fclose(wfLoginList);
|
||||
@ -1113,7 +1113,7 @@ void _passLoginFapper()
|
||||
};
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionGreenFoundData("SSH Password list loaded (" + QString(std::to_string((long double)MaxSSHPass).c_str()) + " entries)");
|
||||
stt->doEmitionGreenFoundData("SSH Password list loaded (" + QString(std::to_string(MaxSSHPass).c_str()) + " entries)");
|
||||
#pragma endregion
|
||||
|
||||
fclose(sshlpList);
|
||||
@ -1128,7 +1128,7 @@ void _passLoginFapper()
|
||||
#pragma endregion
|
||||
|
||||
#pragma region QTGUI_Area
|
||||
stt->doEmitionYellowFoundData("BA: ~" + QString(std::to_string((long double)MaxLogin * MaxPass/gTimeOut/60).c_str()) + "; WF: ~" + QString(std::to_string((long double)MaxWFLogin * MaxWFPass/gTimeOut/60).c_str()) + "; SSH: ~" + QString(std::to_string((long double)MaxSSHPass/gTimeOut/60).c_str()));
|
||||
stt->doEmitionYellowFoundData("BA: ~" + QString(std::to_string(MaxLogin * MaxPass/gTimeOut/60).c_str()) + "; WF: ~" + QString(std::to_string(MaxWFLogin * MaxWFPass/gTimeOut/60).c_str()) + "; SSH: ~" + QString(std::to_string(MaxSSHPass/gTimeOut/60).c_str()));
|
||||
#pragma endregion
|
||||
};
|
||||
void ReadUTF8(FILE* nFile, char *cp)
|
||||
@ -1719,7 +1719,7 @@ void FileLoader(char *str)
|
||||
{
|
||||
char tempMsg[256] = {0};
|
||||
strcpy(tempMsg, "[IP Loader]Wrong list format. Line-> [");
|
||||
strcat(tempMsg, std::to_string((long double)flCounter).c_str());
|
||||
strcat(tempMsg, std::to_string(flCounter).c_str());
|
||||
strcat(tempMsg, "] String-> [");
|
||||
strcat(tempMsg, curIPCopy);
|
||||
strcat(tempMsg, "]");
|
||||
@ -1820,7 +1820,7 @@ void FileLoader(char *str)
|
||||
{
|
||||
char tempMsg[256] = {0};
|
||||
strcpy(tempMsg, "[IP Loader]Wrong list format. Line-> [");
|
||||
strcat(tempMsg, std::to_string((long double)flCounter).c_str());
|
||||
strcat(tempMsg, std::to_string(flCounter).c_str());
|
||||
strcat(tempMsg, "] String-> [");
|
||||
strcat(tempMsg, curIPCopy);
|
||||
strcat(tempMsg, "]");
|
||||
@ -2329,13 +2329,13 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads));
|
||||
if(ipsstart[3] == ipsend[3] && eor2 == 1) eor3 = 1;
|
||||
++indexIP;
|
||||
|
||||
strcat(res, std::to_string((long double)ipsstart[0]).c_str());
|
||||
strcat(res, std::to_string(ipsstart[0]).c_str());
|
||||
strcat(res, ".");
|
||||
strcat(res, std::to_string((long double)ipsstart[1]).c_str());
|
||||
strcat(res, std::to_string(ipsstart[1]).c_str());
|
||||
strcat(res, ".");
|
||||
strcat(res, std::to_string((long double)ipsstart[2]).c_str());
|
||||
strcat(res, std::to_string(ipsstart[2]).c_str());
|
||||
strcat(res, ".");
|
||||
strcat(res, std::to_string((long double)ipsstart[3]).c_str());
|
||||
strcat(res, std::to_string(ipsstart[3]).c_str());
|
||||
|
||||
strcpy(st->argv, res);
|
||||
strcpy(saveStartIP, res);
|
||||
@ -2551,21 +2551,21 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads));
|
||||
sockstruct *st = NULL;
|
||||
for(gC = 0; gC < flCounter; ++gC)
|
||||
{
|
||||
strcpy(metaRange, std::to_string((long double)ipsstartfl[gC][0]).c_str());
|
||||
strcpy(metaRange, std::to_string(ipsstartfl[gC][0]).c_str());
|
||||
strcat(metaRange, ".");
|
||||
strcat(metaRange, std::to_string((long double)ipsstartfl[gC][1]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsstartfl[gC][1]).c_str());
|
||||
strcat(metaRange, ".");
|
||||
strcat(metaRange, std::to_string((long double)ipsstartfl[gC][2]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsstartfl[gC][2]).c_str());
|
||||
strcat(metaRange, ".");
|
||||
strcat(metaRange, std::to_string((long double)ipsstartfl[gC][3]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsstartfl[gC][3]).c_str());
|
||||
strcat(metaRange, "-");
|
||||
strcat(metaRange, std::to_string((long double)ipsendfl[gC][0]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsendfl[gC][0]).c_str());
|
||||
strcat(metaRange, ".");
|
||||
strcat(metaRange, std::to_string((long double)ipsendfl[gC][1]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsendfl[gC][1]).c_str());
|
||||
strcat(metaRange, ".");
|
||||
strcat(metaRange, std::to_string((long double)ipsendfl[gC][2]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsendfl[gC][2]).c_str());
|
||||
strcat(metaRange, ".");
|
||||
strcat(metaRange, std::to_string((long double)ipsendfl[gC][3]).c_str());
|
||||
strcat(metaRange, std::to_string(ipsendfl[gC][3]).c_str());
|
||||
|
||||
eor0 = 0, eor1 = 0, eor2 = 0, eor3 = 0;
|
||||
while ((eor0 == 0 || eor1 == 0 || eor2 == 0 || eor3 == 0) && globalScanFlag)
|
||||
@ -2596,13 +2596,13 @@ stt->doEmitionThreads(QString::number(0) + "/" + QString::number(gThreads));
|
||||
|
||||
++indexIP;
|
||||
|
||||
strcat(res, std::to_string((long double)ipsstartfl[gC][0]).c_str());
|
||||
strcat(res, std::to_string(ipsstartfl[gC][0]).c_str());
|
||||
strcat(res, ".");
|
||||
strcat(res, std::to_string((long double)ipsstartfl[gC][1]).c_str());
|
||||
strcat(res, std::to_string(ipsstartfl[gC][1]).c_str());
|
||||
strcat(res, ".");
|
||||
strcat(res, std::to_string((long double)ipsstartfl[gC][2]).c_str());
|
||||
strcat(res, std::to_string(ipsstartfl[gC][2]).c_str());
|
||||
strcat(res, ".");
|
||||
strcat(res, std::to_string((long double)ipsstartfl[gC][3]).c_str());
|
||||
strcat(res, std::to_string(ipsstartfl[gC][3]).c_str());
|
||||
|
||||
strcpy(st->argv, res);
|
||||
strcpy(saveStartIP, res);
|
||||
|
Loading…
Reference in New Issue
Block a user