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