Verbose codepage fixed.

This commit is contained in:
cora32 2015-04-02 22:07:25 +03:00
parent 886fa0aa02
commit a17ba5a4b2
10 changed files with 1281 additions and 1016 deletions

View File

@ -36,7 +36,6 @@ 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');
res.erase(std::remove(res.begin(), res.end(), '\r'), res.end()); res.erase(std::remove(res.begin(), res.end(), '\r'), res.end());
std::ofstream out(fileName); std::ofstream out(fileName);
out << std::string(res); out << std::string(res);

View File

@ -22,10 +22,13 @@ void Threader::fireThread(std::string ip, void *func(void)) {
} }
void Threader::cleanUp() { void Threader::cleanUp() {
ready = true;
cv.notify_one();
std::unique_lock<std::mutex> lk(m); std::unique_lock<std::mutex> lk(m);
lk.unlock(); lk.unlock();
lk.release(); lk.release();
threadId = 0; threadId = 0;
std::queue<std::string> empty = {}; std::queue<std::string> empty = {};
std::swap(ipQueue, empty); std::swap(ipQueue, empty);
ready = false;
} }

View File

@ -1 +0,0 @@


View File

@ -7,7 +7,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv); QApplication a(argc, argv);
QStringList list; QStringList list;
list << "Eurostile.ttf"; list << "small_font.ttf";
int fontID(-1); int fontID(-1);
bool fontWarningShown(false); bool fontWarningShown(false);
for (QStringList::const_iterator constIterator = list.constBegin(); constIterator != list.constEnd(); ++constIterator) { for (QStringList::const_iterator constIterator = list.constBegin(); constIterator != list.constEnd(); ++constIterator) {

View File

@ -1,6 +1,6 @@
<RCC> <RCC>
<qresource prefix="/nesca_3"> <qresource prefix="/nesca_3">
<file>Eurostile.ttf</file> <file>small_font.ttf</file>
<file>nesca.ico</file> <file>nesca.ico</file>
</qresource> </qresource>
</RCC> </RCC>

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -88,7 +88,8 @@ std::string toLowerStr(const char *str)
std::string tstr = std::string(strr); std::string tstr = std::string(strr);
delete[]strr; delete[]strr;
return tstr; return tstr;
} else return ""; }
else return "";
} }
void SaveErrorLog(char *sender, char *MesSent, char *ReplRecv) void SaveErrorLog(char *sender, char *MesSent, char *ReplRecv)
@ -716,7 +717,7 @@ unsigned long int numOfIps(int ipsstart[], int ipsend[]) {
gTargets += 65536 * (ipsend[1] - ipsstart[1]); gTargets += 65536 * (ipsend[1] - ipsstart[1]);
gTargets += 256 * (ipsend[2] - ipsstart[2]); gTargets += 256 * (ipsend[2] - ipsstart[2]);
gTargets += (ipsend[3] - ipsstart[3]); gTargets += (ipsend[3] - ipsstart[3]);
gTargetsOverall = gTargets - 1; gTargetsOverall = gTargets;
//unsigned long ip1 = (ipsstart[0] * 16777216) + (ipsstart[1] * 65536) + (ipsstart[2] * 256) + ipsstart[3]; //unsigned long ip1 = (ipsstart[0] * 16777216) + (ipsstart[1] * 65536) + (ipsstart[2] * 256) + ipsstart[3];
//unsigned long ip2 = (ipsend[0] * 16777216) + (ipsend[1] * 65536) + (ipsend[2] * 256) + ipsend[3]; //unsigned long ip2 = (ipsend[0] * 16777216) + (ipsend[1] * 65536) + (ipsend[2] * 256) + ipsend[3];
@ -1725,7 +1726,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder) {
++indexIP; ++indexIP;
sprintf(currentIP, "%s%s", mask, gTLD); sprintf(currentIP, "%s%s", mask, gTLD);
verboseProgress(--gTargets); verboseProgress(gTargets--);
Threader::fireThread(currentIP, (void*(*)(void))_connect); Threader::fireThread(currentIP, (void*(*)(void))_connect);
}; };
@ -1832,7 +1833,7 @@ int startScan(char* args) {
strcpy(currentIP, ipVec[0].c_str()); strcpy(currentIP, ipVec[0].c_str());
ipVec.erase(ipVec.begin()); ipVec.erase(ipVec.begin());
verboseProgress(--gTargets); verboseProgress(gTargets--);
Threader::fireThread(currentIP, (void*(*)(void))_connect); Threader::fireThread(currentIP, (void*(*)(void))_connect);
} }
@ -1853,7 +1854,7 @@ int startScan(char* args) {
tAddr.s_addr = ntohl(i); tAddr.s_addr = ntohl(i);
strcpy(currentIP, inet_ntoa(tAddr)); strcpy(currentIP, inet_ntoa(tAddr));
verboseProgress(--gTargets); verboseProgress(gTargets--);
Threader::fireThread(currentIP, (void*(*)(void))_connect); Threader::fireThread(currentIP, (void*(*)(void))_connect);
} }
@ -2035,7 +2036,7 @@ int startScan(char* args) {
++indexIP; ++indexIP;
strcpy(currentIP, ipVec[0].c_str()); strcpy(currentIP, ipVec[0].c_str());
ipVec.erase(ipVec.begin()); ipVec.erase(ipVec.begin());
verboseProgress(--gTargets); verboseProgress(gTargets--);
Threader::fireThread(currentIP, (void*(*)(void))_connect); Threader::fireThread(currentIP, (void*(*)(void))_connect);
} }
@ -2055,7 +2056,7 @@ int startScan(char* args) {
tAddr.s_addr = ntohl(i); tAddr.s_addr = ntohl(i);
strcpy(currentIP, inet_ntoa(tAddr)); strcpy(currentIP, inet_ntoa(tAddr));
verboseProgress(--gTargets); verboseProgress(gTargets--);
Threader::fireThread(currentIP, (void*(*)(void))_connect); Threader::fireThread(currentIP, (void*(*)(void))_connect);
} }
break; break;

BIN
small_font.ttf Normal file

Binary file not shown.

View File

@ -1 +1 @@
24B82-836 24B82-89C