Lists download fix.

This commit is contained in:
cora32 2015-04-02 21:04:19 +03:00
parent 01aa04d53e
commit ad036ca03a
10 changed files with 1202 additions and 1080 deletions

View File

@ -1,5 +1,6 @@
#include "FileDownloader.h" #include "FileDownloader.h"
#include "fstream" #include "fstream"
#include <algorithm>
std::string FileDownloader::lastModifiedNeg = ""; std::string FileDownloader::lastModifiedNeg = "";
std::string FileDownloader::lastModifiedL = ""; std::string FileDownloader::lastModifiedL = "";
@ -35,6 +36,7 @@ void checkWeb(const char *fileName, std::string *oldLM) {
if(lm.compare(*oldLM) != 0) { if(lm.compare(*oldLM) != 0) {
*oldLM = lm; *oldLM = lm;
std::string res(buffer.substr(buffer.find("\r\n\r\n") + 4).c_str()); std::string res(buffer.substr(buffer.find("\r\n\r\n") + 4).c_str());
std::replace(res.begin(), res.end(), '\r', '\n');
std::ofstream out(fileName); std::ofstream out(fileName);
out << std::string(res); out << std::string(res);
out.close(); out.close();

View File

@ -1,28 +1,55 @@
admin admin
root
123123 root
123456
12345 123123
cisco 123456
super
meinsm 12345
monitor
test
ftp
1234 cisco
administrator
qwerty super
recovery
Polycom meinsm
system
naadmin monitor
telecom
dreambox test
master
Admin ftp
guest
backup 1234
cgadmin
0000 administrator
qwerty
recovery
Polycom
system
naadmin
telecom
dreambox
master
Admin
guest
backup
cgadmin
0000
1111 1111

File diff suppressed because it is too large Load Diff

View File

@ -67,8 +67,6 @@ char trcPersKey[64] = {0};
char gProxyIP[64] = {0}; char gProxyIP[64] = {0};
char gProxyPort[8] = {0}; char gProxyPort[8] = {0};
SOCKET lSock;
VerCheckerThread *vct = new VerCheckerThread(); VerCheckerThread *vct = new VerCheckerThread();
MSGCheckerThread *mct = new MSGCheckerThread(); MSGCheckerThread *mct = new MSGCheckerThread();
STh *stt = new STh(); STh *stt = new STh();
@ -147,6 +145,69 @@ int PhraseIndex = 0;
QList<QString> PhraseLog; QList<QString> PhraseLog;
bool ME2ScanFlag = true, QoSScanFlag = false, VoiceScanFlag = false, PieStatFlag = false; bool ME2ScanFlag = true, QoSScanFlag = false, VoiceScanFlag = false, PieStatFlag = false;
void _LoadPersInfoToLocalVars(int savedTabIndex) {
ZeroMemory(currentIP, sizeof(currentIP));
ZeroMemory(finalIP, sizeof(finalIP));
ZeroMemory(gPorts, sizeof(gPorts));
ZeroMemory(gTLD, sizeof(gTLD));
if (savedTabIndex == 0)
{
gMode = 0;
gThreads = ui->threadLine->text().toInt();
QString targetLine = ui->ipLine->text();
if (ui->ipLine->text().indexOf("-") > 0)
{
if (ui->ipLine->text().indexOf("/") < 0) {
QList<QString> splittedTargetLine = targetLine.split("-");
strcpy(currentIP, splittedTargetLine[0].toLocal8Bit().data());
strcpy(finalIP, splittedTargetLine[1].toLocal8Bit().data());
}
}
else
{
if (ui->ipLine->text().indexOf("/") < 0)
{
strcpy(currentIP, ui->ipLine->text().toLocal8Bit().data());
strcat(currentIP, "-");
strcat(currentIP, ui->ipLine->text().toLocal8Bit().data());
};
};
strncpy(gPorts, ("-p" + ui->portLine->text()).toLocal8Bit().data(), 65536);
gPorts[ui->lineEditPort->text().length() + 2] = '\0';
}
else if (savedTabIndex == 1)
{
gMode = 1;
gThreads = ui->lineEditThread->text().toInt();
strcpy(currentIP, ui->lineEditStartIPDNS->text().toLocal8Bit().data());
strcpy(gTLD, ui->lineILVL->text().toLocal8Bit().data());
strncpy(gPorts, ("-p" + ui->lineEditPort->text()).toLocal8Bit().data(), 65536);
gPorts[ui->lineEditPort->text().length() + 2] = '\0';
}
else if (savedTabIndex == 2)
{
gMode = -1;
gThreads = ui->importThreads->text().toInt();
strncpy(gPorts, ("-p" + ui->importPorts->text()).toLocal8Bit().data(), 65536);
};
strcpy(trcSrv, ui->lineTrackerSrv->text().toLocal8Bit().data());
strcpy(trcScr, ui->lineTrackerScr->text().toLocal8Bit().data());
strncpy(trcPersKey, ui->linePersKey->text().toLocal8Bit().data(), 32);
memset(trcPersKey + 32, '\0', 1);
strcpy(trcSrvPortLine, ui->trcSrvPortLine->text().toLocal8Bit().data());
strncpy(gProxyIP, ui->systemProxyIP->text().toLocal8Bit().data(), 64);
gProxyIP[ui->systemProxyIP->text().size()] = '\0';
strncpy(gProxyPort, ui->systemProxyPort->text().toLocal8Bit().data(), 8);
gProxyPort[ui->systemProxyPort->text().size()] = '\0';
}
Ui::nesca_3Class *ui = new Ui::nesca_3Class; Ui::nesca_3Class *ui = new Ui::nesca_3Class;
void setSceneArea() void setSceneArea()
{ {
@ -1919,7 +1980,7 @@ void nesca_3::IPScanSeq()
{ {
if(ui->portLine->text() != "") if(ui->portLine->text() != "")
{ {
saveOptions(); _LoadPersInfoToLocalVars(savedTabIndex);
ui->labelParsed_Value->setText("0/0"); ui->labelParsed_Value->setText("0/0");
ui->labelOffline_Value->setText("0"); ui->labelOffline_Value->setText("0");
stopFirst = false; stopFirst = false;
@ -2004,7 +2065,7 @@ void nesca_3::DNSScanSeq()
{ {
if(ui->lineEditPort->text() != "") if(ui->lineEditPort->text() != "")
{ {
saveOptions(); _LoadPersInfoToLocalVars(savedTabIndex);
ui->labelParsed_Value->setText("0/0"); ui->labelParsed_Value->setText("0/0");
ui->labelOffline_Value->setText("0"); ui->labelOffline_Value->setText("0");
if(ui->lineEditStartIPDNS->text().indexOf(".") > 0) if(ui->lineEditStartIPDNS->text().indexOf(".") > 0)
@ -2063,7 +2124,7 @@ void nesca_3::ImportScanSeq()
if(fileName != "") if(fileName != "")
{ {
saveOptions(); _LoadPersInfoToLocalVars(savedTabIndex);
ui->tabMainWidget->setTabEnabled(0, false); ui->tabMainWidget->setTabEnabled(0, false);
ui->tabMainWidget->setTabEnabled(1, false); ui->tabMainWidget->setTabEnabled(1, false);
@ -2298,67 +2359,6 @@ void nesca_3::ConnectEvrthng()
//connect ( irc_nmb, SIGNAL(sBlinkMessage()), this, SLOT(slotBlinkMessage()) ); //connect ( irc_nmb, SIGNAL(sBlinkMessage()), this, SLOT(slotBlinkMessage()) );
} }
void _LoadPersInfoToLocalVars(int savedTabIndex) {
ZeroMemory(currentIP, sizeof(currentIP));
ZeroMemory(finalIP, sizeof(finalIP));
ZeroMemory(gPorts, sizeof(gPorts));
ZeroMemory(gTLD, sizeof(gTLD));
if(savedTabIndex == 0)
{
gMode = 0;
gThreads = ui->threadLine->text().toInt();
QString targetLine = ui->ipLine->text();
if(ui->ipLine->text().indexOf("-") > 0)
{
if(ui->ipLine->text().indexOf("/") < 0) {
QList<QString> splittedTargetLine = targetLine.split("-");
strcpy(currentIP, splittedTargetLine[0].toLocal8Bit().data());
strcpy(finalIP, splittedTargetLine[1].toLocal8Bit().data());
}
}
else
{
if(ui->ipLine->text().indexOf("/") < 0)
{
strcpy(currentIP, ui->ipLine->text().toLocal8Bit().data());
strcat(currentIP, "-");
strcat(currentIP, ui->ipLine->text().toLocal8Bit().data());
};
};
strncpy(gPorts, ("-p" + ui->portLine->text()).toLocal8Bit().data(), 65536);
gPorts[ui->lineEditPort->text().length() + 2] = '\0';
}
else if(savedTabIndex == 1)
{
gMode = 1;
gThreads = ui->lineEditThread->text().toInt();
strcpy(currentIP, ui->lineEditStartIPDNS->text().toLocal8Bit().data());
strcpy(gTLD, ui->lineILVL->text().toLocal8Bit().data());
strncpy(gPorts, ("-p" + ui->lineEditPort->text()).toLocal8Bit().data(), 65536);
gPorts[ui->lineEditPort->text().length() + 2] = '\0';
}
else if(savedTabIndex == 2)
{
gMode = -1;
gThreads = ui->importThreads->text().toInt();
strncpy(gPorts, ("-p" + ui->importPorts->text()).toLocal8Bit().data(), 65536);
};
strcpy(trcSrv, ui->lineTrackerSrv->text().toLocal8Bit().data());
strcpy(trcScr, ui->lineTrackerScr->text().toLocal8Bit().data());
strncpy(trcPersKey, ui->linePersKey->text().toLocal8Bit().data(), 32);
memset(trcPersKey + 32, '\0', 1);
strcpy(trcSrvPortLine, ui->trcSrvPortLine->text().toLocal8Bit().data());
strncpy(gProxyIP, ui->systemProxyIP->text().toLocal8Bit().data(), 64);
gProxyIP[ui->systemProxyIP->text().size()] = '\0';
strncpy(gProxyPort, ui->systemProxyPort->text().toLocal8Bit().data(), 8);
gProxyPort[ui->systemProxyPort->text().size()] = '\0';
}
void nesca_3::saveOptions() void nesca_3::saveOptions()
{ {
_LoadPersInfoToLocalVars(savedTabIndex); _LoadPersInfoToLocalVars(savedTabIndex);
@ -2779,13 +2779,12 @@ void nesca_3::ChangePingerOK(bool val)
void nesca_3::STTTerminate() void nesca_3::STTTerminate()
{ {
while (__savingBackUpFile) Sleep(100);
importFileName = ""; importFileName = "";
startFlag = false; startFlag = false;
globalScanFlag = false; globalScanFlag = false;
nCleanup(); nCleanup();
while(__savingBackUpFile) Sleep(100);
ui->tabMainWidget->setTabEnabled(0, true); ui->tabMainWidget->setTabEnabled(0, true);
ui->tabMainWidget->setTabEnabled(1, true); ui->tabMainWidget->setTabEnabled(1, true);
ui->tabMainWidget->setTabEnabled(2, true); ui->tabMainWidget->setTabEnabled(2, true);

View File

@ -307,7 +307,7 @@ void _SaveBackupToFile()
void _saver() void _saver()
{ {
Sleep(100); Sleep(1000);
while(globalScanFlag) while(globalScanFlag)
{ {
__savingBackUpFile = true; __savingBackUpFile = true;
@ -2080,6 +2080,8 @@ int startScan(char* args) {
stt->doEmitionGreenFoundData("Done. Saved: " + QString::number(saved) + "; Alive: " + QString::number(found) + "."); stt->doEmitionGreenFoundData("Done. Saved: " + QString::number(saved) + "; Alive: " + QString::number(found) + ".");
stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(found)); stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(found));
stt->doEmitionChangeStatus("Idle"); stt->doEmitionChangeStatus("Idle");
Sleep(1000); //Wait for lock release
stt->doEmitionKillSttThread(); stt->doEmitionKillSttThread();
} }

156
pass.txt
View File

@ -1,53 +1,105 @@
root root
admin
password admin
123456
1234 password
12345
123456
ADMIN
1234
cisco
ftp 12345
ROOT
123123
pass
passwd ADMIN
qwerty
meinsm
monitor
user cisco
test
sysadm ftp
admin123
Admin ROOT
123321
12344321 123123
toor
qwerty123 pass
1q2w3e4r
987654321 passwd
system
telecom qwerty
dreambox
111111 meinsm
1111
654321 monitor
!@#$%^
0000 user
000000
master test
12345678
666666 sysadm
123123123
123454321 admin123
0123456789
qqqqqq Admin
administrator
sys 123321
guest
backup 12344321
fujiyama
super toor
P@ssw0rd
qwerty123
1q2w3e4r
987654321
system
telecom
dreambox
111111
1111
654321
!@#$%^
0000
000000
master
12345678
666666
123123123
123454321
0123456789
qqqqqq
administrator
sys
guest
backup
fujiyama
super
P@ssw0rd
passw0rd passw0rd

View File

@ -1,26 +1,51 @@
hw230f8034t:17932yhf823 hw230f8034t:17932yhf823
root:root
root:admin root:root
admin:admin
admin:root root:admin
backup:backup
guest:guest admin:admin
root:master
root:1234 admin:root
admin:master
admin:111111 backup:backup
root:12345
root:123456 guest:guest
admin:1234
admin:12345 root:master
root:12345678
root:123123 root:1234
admin:123456
admin:12345678 admin:master
root:654321
admin:123123 admin:111111
admin:654321
root:password root:12345
admin:pasword
root:1qazXSW@ root:123456
admin:1234
admin:12345
root:12345678
root:123123
admin:123456
admin:12345678
root:654321
admin:123123
admin:654321
root:password
admin:pasword
root:1qazXSW@
test:test test:test

View File

@ -1 +1 @@
24B82-7EA 24B82-836

View File

@ -1,3 +1,5 @@
[FAIL] [FAIL]
admin
admin
root root

View File

@ -1,10 +1,19 @@
[FAIL] [FAIL]
admin
root admin
pass
password root
toor
123123 pass
123456
12345 password
toor
123123
123456
12345
qwerty qwerty