mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-12-26 09:21:47 +00:00
DNS mode session restoration fix
This commit is contained in:
parent
1541b22ce1
commit
b70c77ecbd
@ -43,7 +43,7 @@ extern unsigned int Activity;
|
||||
extern char trcSrv[256], trcScr[256], trcProxy[128], trcPersKey[64],
|
||||
ircServer[32], ircPort[32], ircProxy[64], ircProxyPort[8], ircNick[32],
|
||||
trcPort[32], trcSrvPortLine[32], saveEndIP[128],
|
||||
gRange[128], gFirstDom[128], gPorts[65536], endIP2[128],
|
||||
gRange[128], gFirstDom[128], gPorts[65536],
|
||||
gVER[16],
|
||||
gProxyIP[64], gProxyPort[8],
|
||||
currentIP[MAX_ADDR_LEN],
|
||||
|
10
nesca_3.cpp
10
nesca_3.cpp
@ -2941,7 +2941,6 @@ void nesca_3::ConnectEvrthng()
|
||||
}
|
||||
|
||||
void _LoadPersInfoToLocalVars(int savedTabIndex) {
|
||||
ZeroMemory(endIP2, sizeof(endIP2));
|
||||
ZeroMemory(top_level_domain, sizeof(top_level_domain));
|
||||
ZeroMemory(gPorts, sizeof(gPorts));
|
||||
|
||||
@ -2957,16 +2956,15 @@ void _LoadPersInfoToLocalVars(int savedTabIndex) {
|
||||
QList<QString> splittedTargetLine = targetLine.split("-");
|
||||
strcpy(currentIP, splittedTargetLine[0].toLocal8Bit().data());
|
||||
strcpy(finalIP, splittedTargetLine[1].toLocal8Bit().data());
|
||||
strcpy(endIP2, ui->ipLine->text().toLocal8Bit().data());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ui->ipLine->text().indexOf("/") < 0)
|
||||
{
|
||||
strcpy(endIP2, ui->ipLine->text().toLocal8Bit().data());
|
||||
strcat(endIP2, "-");
|
||||
strcat(endIP2, ui->ipLine->text().toLocal8Bit().data());
|
||||
strcpy(currentIP, ui->ipLine->text().toLocal8Bit().data());
|
||||
strcat(currentIP, "-");
|
||||
strcat(currentIP, ui->ipLine->text().toLocal8Bit().data());
|
||||
};
|
||||
};
|
||||
|
||||
@ -2978,7 +2976,7 @@ void _LoadPersInfoToLocalVars(int savedTabIndex) {
|
||||
gMode = 1;
|
||||
gThreads = ui->lineEditThread->text().toInt();
|
||||
|
||||
strcpy(endIP2, ui->lineEditStartIPDNS->text().toLocal8Bit().data());
|
||||
strcpy(currentIP, ui->lineEditStartIPDNS->text().toLocal8Bit().data());
|
||||
strcpy(top_level_domain, ui->lineILVL->text().toLocal8Bit().data());
|
||||
strncpy(gPorts, ("-p" + ui->lineEditPort->text()).toLocal8Bit().data(), 65536);
|
||||
gPorts[ui->lineEditPort->text().size()] = '\0';
|
||||
|
@ -29,7 +29,7 @@ extern bool widgetIsHidden, IRCLogToggled, blinkFlag, disableBlink, debugFileOK,
|
||||
smBit_8, smBit_7, smBit_6, smBit_5, smBit_4, smBit_3, smBit_2, smBit_1, printDelimiter;
|
||||
extern float QoSStep;
|
||||
extern int MaxDataVal;
|
||||
extern char endIP2[128], inputStr[256];
|
||||
extern char inputStr[256];
|
||||
extern SOCKET lSock;
|
||||
|
||||
extern QVector<int> vAlivLst, vAnomLst, vWFLst, vSuspLst, vLowlLst, vBALst, vSSHLst, vOvrlLst, actLst;
|
||||
|
@ -32,7 +32,6 @@ unsigned int Activity = 0;
|
||||
unsigned char **ipsstartfl = NULL, **ipsendfl = NULL, **starterIP = NULL;
|
||||
double ips = 0;
|
||||
char top_level_domain[128] = {0};
|
||||
char endIP2[128] = {0};
|
||||
char **GlobalNegatives = 0;
|
||||
char **loginLst, **passLst;
|
||||
char **wfLoginLst, **wfPassLst;
|
||||
@ -805,14 +804,10 @@ void _connect() {
|
||||
}
|
||||
}
|
||||
|
||||
void verboseProgress(long long unsigned int target, const char *ip) {
|
||||
|
||||
inline void progressOutput(long long unsigned int target) {
|
||||
char targetNPers[128] = {0};
|
||||
float percent = (gTargetsOverall != 0 ? (100 - target/(double)gTargetsOverall * 100) : 0);
|
||||
|
||||
stt->doEmitionIPRANGE(QString(ip));
|
||||
strcpy(currentIP, ip);
|
||||
|
||||
sprintf(targetNPers, "%Lu (%.1f%%)", target, percent);
|
||||
stt->doEmitionTargetsLeft(QString(targetNPers));
|
||||
|
||||
@ -820,34 +815,26 @@ void verboseProgress(long long unsigned int target, const char *ip) {
|
||||
sprintf(metaPercent, "%.1f",
|
||||
percent);
|
||||
}
|
||||
void verboseProgress(long long unsigned int target, const char *ip) {
|
||||
|
||||
stt->doEmitionIPRANGE(QString(ip));
|
||||
progressOutput(target);
|
||||
}
|
||||
void verboseProgressDNS(long long unsigned int target, const char *ip, const char *TLD) {
|
||||
|
||||
char targetNPers[128] = { 0 };
|
||||
float percent = (gTargetsOverall != 0 ? (100 - target / (double)gTargetsOverall * 100) : 0);
|
||||
|
||||
stt->doEmitionIPRANGE(QString(ip) + QString(TLD));
|
||||
strcpy(currentIP, ip);
|
||||
|
||||
sprintf(targetNPers, "%Lu (%.1f%%)", target, percent);
|
||||
stt->doEmitionTargetsLeft(QString(targetNPers));
|
||||
|
||||
sprintf(metaTargets, "%Lu", target);
|
||||
sprintf(metaPercent, "%.1f",
|
||||
percent);
|
||||
stt->doEmitionIPRANGE(QString(ip) + QString(TLD));
|
||||
progressOutput(target);
|
||||
}
|
||||
|
||||
void _passLoginLoader() {
|
||||
MaxLogin = 0;
|
||||
MaxPass = 0;
|
||||
|
||||
FILE *loginList;
|
||||
FILE *passList;
|
||||
|
||||
char buffFG[32] = {0};
|
||||
int i = 0;
|
||||
|
||||
loginList = fopen("login.txt", "r");
|
||||
passList = fopen("pass.txt", "r");
|
||||
FILE *loginList = fopen("login.txt", "r");
|
||||
FILE *passList = fopen("pass.txt", "r");
|
||||
|
||||
if(passList != NULL && loginList != NULL)
|
||||
{
|
||||
@ -1898,7 +1885,6 @@ int ParseArgs(int argc, char *argv[]) {
|
||||
};
|
||||
|
||||
strcpy(saveEndIP, gRange);
|
||||
strcpy(endIP2, gRange);
|
||||
strcpy(finalIP, strstr(gRange, "-") + 1);
|
||||
}
|
||||
else if(gMode == 1)
|
||||
@ -1906,14 +1892,12 @@ int ParseArgs(int argc, char *argv[]) {
|
||||
if(strstr(argv[2], "/") != NULL)
|
||||
{
|
||||
strcpy(gRange, argv[2]);
|
||||
strcpy(saveEndIP, argv[2]);
|
||||
strcpy(endIP2, argv[2]);
|
||||
strcpy(saveEndIP, argv[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(gRange, argv[2]);
|
||||
strcpy(saveEndIP, gRange);
|
||||
strcpy(endIP2, gRange);
|
||||
strcpy(saveEndIP, gRange);
|
||||
};
|
||||
|
||||
};
|
||||
@ -2037,8 +2021,9 @@ int _getChunkCount(char *data) {
|
||||
}
|
||||
|
||||
int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
|
||||
|
||||
if(strstr(mask, "[") != NULL)
|
||||
{
|
||||
{
|
||||
char maskEnd[1024] = {0};
|
||||
char maskRes[1024] = {0};
|
||||
char *ptr1 = strstr(mask, "[");
|
||||
@ -2095,7 +2080,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
|
||||
}
|
||||
else
|
||||
{
|
||||
strcpy(endIP2, saveMask);
|
||||
strcpy(currentIP, saveMask);
|
||||
|
||||
while(cons >= gThreads && globalScanFlag) Sleep(300);
|
||||
if(!globalScanFlag) return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user