mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 10:42:21 +00:00
Massive refactoring.
This commit is contained in:
parent
082bde227b
commit
e051fea5da
@ -1,5 +1,4 @@
|
|||||||
#include <Connector.h>
|
#include <Connector.h>
|
||||||
#include <Utils.h>
|
|
||||||
|
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||||
int _pingMyTarget(char *ip)
|
int _pingMyTarget(char *ip)
|
||||||
@ -34,7 +33,6 @@ int _pingMyTarget(char *ip)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData),
|
dwRetVal = IcmpSendEcho(hIcmpFile, ipaddr, SendData, sizeof(SendData),
|
||||||
NULL, ReplyBuffer, ReplySize, gPingTimeout*1000);
|
NULL, ReplyBuffer, ReplySize, gPingTimeout*1000);
|
||||||
if (dwRetVal != 0) {
|
if (dwRetVal != 0) {
|
||||||
@ -196,7 +194,7 @@ int _EstablishSSHConnection(char *host, int port, std::string *buffer, const cha
|
|||||||
if(i == 0) return -2; //Failhit
|
if(i == 0) return -2; //Failhit
|
||||||
BConDec();
|
BConDec();
|
||||||
isActive = 0;
|
isActive = 0;
|
||||||
return 0;
|
return 1;
|
||||||
}
|
}
|
||||||
else if(res == -2)
|
else if(res == -2)
|
||||||
{
|
{
|
||||||
@ -384,18 +382,8 @@ int Connector::_ConnectToPort(char *ip, int port, char *hl)
|
|||||||
++Alive;
|
++Alive;
|
||||||
++found;
|
++found;
|
||||||
stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(found));
|
stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(found));
|
||||||
|
|
||||||
conSTR CSTR;
|
|
||||||
CSTR.lowerBuff = new char[size + 1];
|
|
||||||
CSTR.size = size;
|
|
||||||
memcpy(CSTR.lowerBuff, buffer.c_str(), size);
|
|
||||||
memset(CSTR.lowerBuff + size, '\0', 1);
|
|
||||||
|
|
||||||
Lexems lx;
|
Lexems lx;
|
||||||
lx._filler(port, (char *)buffer.c_str(), ip, size, &lx, hl);
|
lx._filler(port, buffer.c_str(), ip, size, &lx, hl);
|
||||||
|
|
||||||
delete []CSTR.lowerBuff;
|
|
||||||
CSTR.lowerBuff = NULL;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
10
Connector.h
10
Connector.h
@ -1,9 +1,17 @@
|
|||||||
#ifndef CONNECTOR_H
|
#ifndef CONNECTOR_H
|
||||||
#define CONNECTOR_H
|
#define CONNECTOR_H
|
||||||
|
|
||||||
#include <mainResources.h>
|
|
||||||
#include <externData.h>
|
#include <externData.h>
|
||||||
#include <STh.h>
|
#include <STh.h>
|
||||||
|
#include <Utils.h>
|
||||||
|
|
||||||
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||||
|
#include <iphlpapi.h>
|
||||||
|
#include <icmpapi.h>
|
||||||
|
#pragma comment(lib, "iphlpapi.lib")
|
||||||
|
#pragma comment(lib,"curllib.lib")
|
||||||
|
#endif
|
||||||
|
#include <mainResources.h>
|
||||||
|
|
||||||
class Connector {
|
class Connector {
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef DRAWERTH_HORNET_H
|
#ifndef DRAWERTH_HORNET_H
|
||||||
#define DRAWERTH_HORNET_H
|
#define DRAWERTH_HORNET_H
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "nesca_3.h"
|
#include "nesca_3.h"
|
||||||
|
|
||||||
class DrawerTh_HorNet : public QThread
|
class DrawerTh_HorNet : public QThread
|
||||||
|
@ -3,6 +3,9 @@
|
|||||||
#include "externData.h"
|
#include "externData.h"
|
||||||
#include <WebformWorker.h>
|
#include <WebformWorker.h>
|
||||||
|
|
||||||
|
QList<QGraphicsPathItem*> DrawerTh_ME2Scanner::itmList;
|
||||||
|
QVector<QPointF> DrawerTh_ME2Scanner::polyVect;
|
||||||
|
|
||||||
void DrawerTh_ME2Scanner::doEmitDrawTextPlacers()
|
void DrawerTh_ME2Scanner::doEmitDrawTextPlacers()
|
||||||
{
|
{
|
||||||
emit dtME2->sDrawTextPlacers();
|
emit dtME2->sDrawTextPlacers();
|
||||||
@ -15,12 +18,12 @@ void DrawerTh_ME2Scanner::doEmitionAddPolyLine()
|
|||||||
|
|
||||||
void MakePolygonLine(int gWidth)
|
void MakePolygonLine(int gWidth)
|
||||||
{
|
{
|
||||||
vect.clear();
|
DrawerTh_ME2Scanner::polyVect.clear();
|
||||||
int x = 0;
|
int x = 0;
|
||||||
int tx = 0;
|
int tx = 0;
|
||||||
int xtx = 0;
|
int xtx = 0;
|
||||||
QPointF qp(0, 20);
|
QPointF qp(0, ME2YPOS);
|
||||||
vect.append(qp);
|
DrawerTh_ME2Scanner::polyVect.append(qp);
|
||||||
int fact1 = 0,
|
int fact1 = 0,
|
||||||
fact2 = 0,
|
fact2 = 0,
|
||||||
fact3 = 0,
|
fact3 = 0,
|
||||||
@ -36,7 +39,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
xtx = x + tx;
|
xtx = x + tx;
|
||||||
if(xtx > 1 && xtx < 31)
|
if(xtx > 1 && xtx < 31)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - AnomC1*2 - fact1 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - AnomC1 * 2 - fact1 : ME2YPOS);
|
||||||
if(AnomC1 > 0)
|
if(AnomC1 > 0)
|
||||||
{
|
{
|
||||||
if(xtx < 16 ) fact1+=2;
|
if(xtx < 16 ) fact1+=2;
|
||||||
@ -46,7 +49,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
|
|
||||||
if(xtx > 34 && xtx < 72)
|
if(xtx > 34 && xtx < 72)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - WF*2 - fact2 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - WF * 2 - fact2 : ME2YPOS);
|
||||||
|
|
||||||
if(WF > 0)
|
if(WF > 0)
|
||||||
{
|
{
|
||||||
@ -57,7 +60,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
|
|
||||||
if(xtx > 74 && xtx < 112)
|
if(xtx > 74 && xtx < 112)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - BA*2 - fact3 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - BA * 2 - fact3 : ME2YPOS);
|
||||||
|
|
||||||
if(BA > 0)
|
if(BA > 0)
|
||||||
{
|
{
|
||||||
@ -68,7 +71,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
|
|
||||||
if(xtx > 114 && xtx < 152)
|
if(xtx > 114 && xtx < 152)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Susp*2 - fact4 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - Susp * 2 - fact4 : ME2YPOS);
|
||||||
|
|
||||||
if(Susp > 0)
|
if(Susp > 0)
|
||||||
{
|
{
|
||||||
@ -79,7 +82,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
|
|
||||||
if(xtx > 154 && xtx < 192)
|
if(xtx > 154 && xtx < 192)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Overl*2 - fact5 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - Overl * 2 - fact5 : ME2YPOS);
|
||||||
|
|
||||||
if(Overl > 0)
|
if(Overl > 0)
|
||||||
{
|
{
|
||||||
@ -90,7 +93,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
|
|
||||||
if(xtx > 194 && xtx < 232)
|
if(xtx > 194 && xtx < 232)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Lowl*2 - fact6 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - Lowl * 2 - fact6 : ME2YPOS);
|
||||||
|
|
||||||
if(Lowl > 0)
|
if(Lowl > 0)
|
||||||
{
|
{
|
||||||
@ -101,7 +104,7 @@ void MakePolygonLine(int gWidth)
|
|||||||
|
|
||||||
if(xtx > 234 && xtx < 269)
|
if(xtx > 234 && xtx < 269)
|
||||||
{
|
{
|
||||||
qp = QPointF(xtx, state ? qrand() % 3 - 3 + 20 - Alive*2 - fact7 : 20);
|
qp = QPointF(xtx, state ? qrand() % 3 - 3 + ME2YPOS - Alive * 2 - fact7 : ME2YPOS);
|
||||||
|
|
||||||
if(Alive > 0)
|
if(Alive > 0)
|
||||||
{
|
{
|
||||||
@ -110,9 +113,10 @@ void MakePolygonLine(int gWidth)
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
vect.append(qp);
|
DrawerTh_ME2Scanner::polyVect.append(qp);
|
||||||
tx = x;
|
tx = x;
|
||||||
};
|
};
|
||||||
|
|
||||||
AnomC1 = 0;
|
AnomC1 = 0;
|
||||||
WF = 0;
|
WF = 0;
|
||||||
BA = 0;
|
BA = 0;
|
||||||
@ -121,20 +125,24 @@ void MakePolygonLine(int gWidth)
|
|||||||
Lowl = 0;
|
Lowl = 0;
|
||||||
Alive = 0;
|
Alive = 0;
|
||||||
Susp = 0;
|
Susp = 0;
|
||||||
vect.append(QPointF(gWidth, 20));
|
|
||||||
|
DrawerTh_ME2Scanner::polyVect.append(QPointF(gWidth, ME2YPOS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawerTh_ME2Scanner::run()
|
void DrawerTh_ME2Scanner::run()
|
||||||
{
|
{
|
||||||
int gWidth = ui->graphicLog->width();
|
int gWidth = ui->graphicLog->width();
|
||||||
dtME2->doEmitDrawTextPlacers();
|
dtME2->doEmitDrawTextPlacers();
|
||||||
|
|
||||||
while(ME2ScanFlag)
|
while(ME2ScanFlag)
|
||||||
{
|
{
|
||||||
if (widgetIsHidden == false && tray->isVisible() == false)
|
if (widgetIsHidden == false && tray->isVisible() == false)
|
||||||
{
|
{
|
||||||
|
if (itmList.count() < 39) {
|
||||||
MakePolygonLine(gWidth);
|
MakePolygonLine(gWidth);
|
||||||
dtME2->doEmitionAddPolyLine();
|
dtME2->doEmitionAddPolyLine();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
msleep(1000);
|
msleep(1000);
|
||||||
@ -147,6 +155,8 @@ void DrawerTh_ME2Scanner::run()
|
|||||||
Alive = 0;
|
Alive = 0;
|
||||||
Susp = 0;
|
Susp = 0;
|
||||||
};
|
};
|
||||||
msleep(90);
|
msleep(100);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
itmList.clear();
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
#ifndef DRAWERTH_ME2SCANNER_H
|
#ifndef DRAWERTH_ME2SCANNER_H
|
||||||
#define DRAWERTH_ME2SCANNER_H
|
#define DRAWERTH_ME2SCANNER_H
|
||||||
|
|
||||||
#pragma once
|
#define ME2YPOS 100
|
||||||
|
#define ME2GRADPOS 10
|
||||||
#include "STh.h"
|
#include "STh.h"
|
||||||
|
|
||||||
class DrawerTh_ME2Scanner : public QThread
|
class DrawerTh_ME2Scanner : public QThread
|
||||||
@ -9,6 +10,9 @@ class DrawerTh_ME2Scanner : public QThread
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
static QList<QGraphicsPathItem*> itmList;
|
||||||
|
static QVector<QPointF> polyVect;
|
||||||
|
|
||||||
static void doEmitionAddPolyLine();
|
static void doEmitionAddPolyLine();
|
||||||
static void doEmitDrawTextPlacers();
|
static void doEmitDrawTextPlacers();
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
#include <Utils.h>
|
#include <Utils.h>
|
||||||
|
|
||||||
char *getSystemProxy() {
|
char *getSystemProxy() {
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
int Utils::getProxyPort() {
|
int Utils::getProxyPort() {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
char * Utils::getProxy() {
|
char * Utils::getProxy() {
|
||||||
@ -12,4 +13,5 @@ char * Utils::getProxy() {
|
|||||||
#else
|
#else
|
||||||
getSystemProxy();
|
getSystemProxy();
|
||||||
#endif
|
#endif
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
|
14
Utils.h
14
Utils.h
@ -4,14 +4,20 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
template<typename charT>
|
template<typename charT>
|
||||||
struct my_equal {
|
struct my_equal {
|
||||||
my_equal( const std::locale loc ) : loc_(loc) {}
|
my_equal( const locale loc ) : loc_(loc) {}
|
||||||
bool operator()(charT ch1, charT ch2) {
|
bool operator()(charT ch1, charT ch2) {
|
||||||
return std::toupper(ch1, loc_) == std::toupper(ch2, loc_);
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||||
|
return toupper(ch1) == toupper(ch2);
|
||||||
|
#else
|
||||||
|
return toupper(ch1, loc_) == toupper(ch2, loc_);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
const std::locale& loc_;
|
const locale& loc_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Utils {
|
class Utils {
|
||||||
@ -19,7 +25,7 @@ public:
|
|||||||
// find substring (case insensitive)
|
// find substring (case insensitive)
|
||||||
template<typename T> static int ci_find_substr(const T& str1,
|
template<typename T> static int ci_find_substr(const T& str1,
|
||||||
const T& str2,
|
const T& str2,
|
||||||
const std::locale& loc = std::locale()) {
|
const locale& loc = locale()) {
|
||||||
|
|
||||||
auto it = std::search(str1.begin(), str1.end(), str2.begin(), str2.end(),
|
auto it = std::search(str1.begin(), str1.end(), str2.begin(), str2.end(),
|
||||||
my_equal<typename T::value_type>(loc));
|
my_equal<typename T::value_type>(loc));
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
#ifndef WEBFORMWORKER_H
|
#ifndef WEBFORMWORKER_H
|
||||||
#define WEBFORMWORKER_H
|
#define WEBFORMWORKER_H
|
||||||
|
|
||||||
#include <mainResources.h>
|
|
||||||
#include <externData.h>
|
|
||||||
#include <externFunctions.h>
|
|
||||||
#include <Utils.h>
|
#include <Utils.h>
|
||||||
#include "STh.h"
|
#include "STh.h"
|
||||||
#include "Connector.h"
|
#include "Connector.h"
|
||||||
|
#include <mainResources.h>
|
||||||
|
#include <externData.h>
|
||||||
|
#include <externFunctions.h>
|
||||||
|
|
||||||
class WFClass {
|
class WFClass {
|
||||||
|
|
||||||
|
@ -270,10 +270,10 @@ char *_getAttributeValue(char *str, char *val, char *ip, int port)
|
|||||||
if(ptrStart != NULL)
|
if(ptrStart != NULL)
|
||||||
{
|
{
|
||||||
if(strstri(ptrStart, "qop=auth") != NULL) return "auth";
|
if(strstri(ptrStart, "qop=auth") != NULL) return "auth";
|
||||||
ptrS1End = _findFirst(ptrStart, "\"");
|
// ptrS1End = _findFirst(ptrStart, "\"");
|
||||||
if(ptrS1End != NULL)
|
if(ptrS1End != NULL)
|
||||||
{
|
{
|
||||||
ptrS2End = _findFirst(ptrS1End + 1, "\"");
|
// ptrS2End = _findFirst(ptrS1End + 1, "\"");
|
||||||
if(ptrS2End != NULL)
|
if(ptrS2End != NULL)
|
||||||
{
|
{
|
||||||
int sz = ptrS2End - ptrS1End - 1;
|
int sz = ptrS2End - ptrS1End - 1;
|
||||||
@ -599,7 +599,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
|
|||||||
if (strcmp(method, "[DIGEST]") == 0 && strstr(localBuff, "nonce=") != NULL)
|
if (strcmp(method, "[DIGEST]") == 0 && strstr(localBuff, "nonce=") != NULL)
|
||||||
{
|
{
|
||||||
ZeroMemory(attribute, sizeof(attribute));
|
ZeroMemory(attribute, sizeof(attribute));
|
||||||
strcpy(attribute, _getAttribute(localBuff, "WWW-Authenticate:"));
|
// strcpy(attribute, _getAttribute(localBuff, "WWW-Authenticate:"));
|
||||||
ZeroMemory(nonce, sizeof(nonce));
|
ZeroMemory(nonce, sizeof(nonce));
|
||||||
strcpy(nonce, _getAttributeValue(attribute, "nonce=", ip, port));
|
strcpy(nonce, _getAttributeValue(attribute, "nonce=", ip, port));
|
||||||
ZeroMemory(realm, sizeof(realm));
|
ZeroMemory(realm, sizeof(realm));
|
||||||
@ -888,7 +888,7 @@ lopaStr _BABrute(char *cookie, char *ip, int port, char *pathT, char *method)
|
|||||||
if(strstr(recvBuff, "Set-Cookie:") != NULL)
|
if(strstr(recvBuff, "Set-Cookie:") != NULL)
|
||||||
{
|
{
|
||||||
ZeroMemory(cookie, COOKIE_MAX_SIZE);
|
ZeroMemory(cookie, COOKIE_MAX_SIZE);
|
||||||
strncpy(cookie, _getAttribute(recvBuff, "Set-Cookie:"), COOKIE_MAX_SIZE);
|
// strncpy(cookie, _getAttribute(recvBuff, "Set-Cookie:"), COOKIE_MAX_SIZE);
|
||||||
cookieLen = strlen(cookie);
|
cookieLen = strlen(cookie);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#ifndef EF_H
|
||||||
|
#define EF_H
|
||||||
|
|
||||||
extern std::string toLowerStr(const char *str);
|
extern std::string toLowerStr(const char *str);
|
||||||
extern int recvS(int lSock, char *recvBuffT, int len);
|
extern int recvS(int lSock, char *recvBuffT, int len);
|
||||||
extern int sendS(int lSock, char *msg, int len, int mode);
|
extern int sendS(int lSock, char *msg, int len, int mode);
|
||||||
@ -9,11 +12,12 @@ extern void BConDec();
|
|||||||
extern QString GetNSErrorDefinition(const char *str, const char *defin);
|
extern QString GetNSErrorDefinition(const char *str, const char *defin);
|
||||||
extern void _SaveBackupToFile();
|
extern void _SaveBackupToFile();
|
||||||
extern char* strstri(const char *_Str, const char *_SubStr);
|
extern char* strstri(const char *_Str, const char *_SubStr);
|
||||||
extern char* _getAttribute(char *str, char *attrib);
|
|
||||||
extern char *_findFirst(char *str, char *delim);
|
|
||||||
extern void nCleanup();
|
extern void nCleanup();
|
||||||
extern void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest);
|
extern void getSubStr(char *src, char *startStr, char *endStr, char *dest, int szDest);
|
||||||
extern void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest);
|
extern void getSubStrEx(char *src, char *startStr, char *endStr, char *dest, int szDest);
|
||||||
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage);
|
extern std::string xcode(LPCSTR src, UINT srcCodePage, UINT dstCodePage);
|
||||||
extern void _SaveBackupToFile();
|
extern void _SaveBackupToFile();
|
||||||
//extern int nConnect(char *ip, int port, std::string *buffer);
|
//extern int nConnect(char *ip, int port, std::string *buffer);
|
||||||
|
|
||||||
|
|
||||||
|
#endif // EF_H
|
||||||
|
268
finder.cpp
268
finder.cpp
@ -23,7 +23,7 @@ char* strstri(const char *_Str, const char *_SubStr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool gGlobalTrackLocked = false;
|
bool gGlobalTrackLocked = false;
|
||||||
char *_findFirst(char *str, char *delim)
|
char *_findFirst(const char *str, char *delim)
|
||||||
{
|
{
|
||||||
int sz = strlen(str);
|
int sz = strlen(str);
|
||||||
int dsz = strlen(delim);
|
int dsz = strlen(delim);
|
||||||
@ -54,8 +54,7 @@ char *_findLast(char *str, char *delim)
|
|||||||
return (char *)(str + savedPosition);
|
return (char *)(str + savedPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *GetCodePage(const char *str)
|
||||||
char *GetCodePage(char *str)
|
|
||||||
{
|
{
|
||||||
char cdpg[32] = {0};
|
char cdpg[32] = {0};
|
||||||
char *ptr1 = strstri(str, "<meta ");
|
char *ptr1 = strstri(str, "<meta ");
|
||||||
@ -186,8 +185,6 @@ char *GetCodePage(char *str)
|
|||||||
|
|
||||||
int Lexems::globalSearchNeg(const char *buffcpy, char *ip, int port)
|
int Lexems::globalSearchNeg(const char *buffcpy, char *ip, int port)
|
||||||
{
|
{
|
||||||
if(strlen(buffcpy) == 0) return -1;
|
|
||||||
|
|
||||||
char negWord[256] = {0};
|
char negWord[256] = {0};
|
||||||
for(int i = 0; i < GlobalNegativeSize; i++)
|
for(int i = 0; i < GlobalNegativeSize; i++)
|
||||||
{
|
{
|
||||||
@ -435,7 +432,7 @@ int _mainFinderSecond(char *buffcpy, int port, char *ip)
|
|||||||
return 3; //Suspicious
|
return 3; //Suspicious
|
||||||
}
|
}
|
||||||
|
|
||||||
int ContentFilter(char *buff, int port, char *ip, char *cp)
|
int ContentFilter(const char *buff, int port, char *ip, char *cp)
|
||||||
{
|
{
|
||||||
if(buff != NULL)
|
if(buff != NULL)
|
||||||
{
|
{
|
||||||
@ -911,6 +908,9 @@ void _specFillerWF(char *hl, char *ip, char *port, char *finalstr, char *login,
|
|||||||
|
|
||||||
++PieWF;
|
++PieWF;
|
||||||
|
|
||||||
|
sprintf(log, "[WF]:<span id=\"hostSpan\"><a href=\"http://%s:%d\"><font color=MediumSeaGreen>%s:%d</font></a></span> T: <font color=GoldenRod>%s</font> Pass: <font color=SteelBlue>%s:%s</font>\n"
|
||||||
|
, ip, port, ip, port, finalstr, login, pass);
|
||||||
|
|
||||||
strcpy(log, "[WF]:");
|
strcpy(log, "[WF]:");
|
||||||
strcat(log, "<span id=\"hostSpan\"><a href=\"http://");
|
strcat(log, "<span id=\"hostSpan\"><a href=\"http://");
|
||||||
strcat(log, ip);
|
strcat(log, ip);
|
||||||
@ -1069,7 +1069,7 @@ std::vector<std::string> vecUser (arrUser, arrUser + sizeof(arrUser) / sizeof(ar
|
|||||||
static const std::string arrPass[] = {"pass", "pw", "password", "code", "param2", "param4", "secret", "login_p", "A2", "admin_pw", "pws", "secretkey"};
|
static const std::string arrPass[] = {"pass", "pw", "password", "code", "param2", "param4", "secret", "login_p", "A2", "admin_pw", "pws", "secretkey"};
|
||||||
std::vector<std::string> vecPass (arrPass, arrPass + sizeof(arrPass) / sizeof(arrPass[0]) );
|
std::vector<std::string> vecPass (arrPass, arrPass + sizeof(arrPass) / sizeof(arrPass[0]) );
|
||||||
|
|
||||||
char *_getAttribute(char *str, char *attrib)
|
char *_getAttribute(const char *str, char *attrib)
|
||||||
{
|
{
|
||||||
if(strstri(str, attrib) != NULL)
|
if(strstri(str, attrib) != NULL)
|
||||||
{
|
{
|
||||||
@ -1347,11 +1347,12 @@ void _specBrute(char *cookie, char *ip, int port, char *hl, char *finalstr, int
|
|||||||
ZeroMemory(temp, sizeof(temp));
|
ZeroMemory(temp, sizeof(temp));
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *GetTitle(char* str)
|
const char *GetTitle(const char* str)
|
||||||
{
|
{
|
||||||
char delimiterT[] = "<title id=titletext>";
|
char delimiterT[] = "<title id=titletext>";
|
||||||
char delimiterT2[] = "<title id=\"title\">";
|
char delimiterT2[] = "<title id=\"title\">";
|
||||||
char *firstStr, *secondStr, finalstr[512] = {0};
|
const char *firstStr, *secondStr;
|
||||||
|
char finalstr[512] = { 0 };
|
||||||
|
|
||||||
if (strstri(str, "realm") != NULL)
|
if (strstri(str, "realm") != NULL)
|
||||||
{
|
{
|
||||||
@ -1462,7 +1463,7 @@ const char *GetTitle(char* str)
|
|||||||
return finalstr;
|
return finalstr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _saveSSH(char *ip, int port, int recd, char *buffcpy)
|
void _saveSSH(char *ip, int port, int recd, const char *buffcpy)
|
||||||
{
|
{
|
||||||
if(buffcpy != NULL)
|
if(buffcpy != NULL)
|
||||||
{
|
{
|
||||||
@ -1471,7 +1472,7 @@ void _saveSSH(char *ip, int port, int recd, char *buffcpy)
|
|||||||
char goodStr[256] = {0};
|
char goodStr[256] = {0};
|
||||||
char banner[256] = {0};
|
char banner[256] = {0};
|
||||||
|
|
||||||
char *ptr1 = strstr(buffcpy, "|+|");
|
const char *ptr1 = strstr(buffcpy, "|+|");
|
||||||
if(ptr1 != NULL)
|
if(ptr1 != NULL)
|
||||||
{
|
{
|
||||||
int gsz = ptr1 - buffcpy;
|
int gsz = ptr1 - buffcpy;
|
||||||
@ -1482,31 +1483,15 @@ void _saveSSH(char *ip, int port, int recd, char *buffcpy)
|
|||||||
sprintf(log, "[SSH] <font color=\"#00a8ff\"> %s:%d </font><font color=\"#323232\">; Banner:</font> <font color=\"#9cff00\"> %s </font>", goodStr, port, banner);
|
sprintf(log, "[SSH] <font color=\"#00a8ff\"> %s:%d </font><font color=\"#323232\">; Banner:</font> <font color=\"#9cff00\"> %s </font>", goodStr, port, banner);
|
||||||
sprintf(logEmit, "[SSH] <span style=\"color: #00a8ff;\"> %s:%d </span>", goodStr, port);
|
sprintf(logEmit, "[SSH] <span style=\"color: #00a8ff;\"> %s:%d </span>", goodStr, port);
|
||||||
|
|
||||||
// strcpy(log, "[SSH] <font color=\"#00a8ff\">");
|
|
||||||
// strcat(log, goodStr);
|
|
||||||
// strcat(log, ":");
|
|
||||||
// strcat(log, itoa(port, b, 10));
|
|
||||||
// strcat(log, "</font>");
|
|
||||||
// strcat(log, "<font color=\"#323232\">; Banner:</font> <font color=\"#9cff00\">");
|
|
||||||
// strcat(log, banner);
|
|
||||||
// strcat(log, "</font>");
|
|
||||||
|
|
||||||
++PieSSH;
|
++PieSSH;
|
||||||
|
|
||||||
// strcpy(logEmit, "[SSH] ");
|
|
||||||
// strcat(logEmit, "<span style=\"color: #00a8ff;\">");
|
|
||||||
// strcat(logEmit, goodStr);
|
|
||||||
// strcat(logEmit, ":");
|
|
||||||
// strcat(logEmit, itoa(port, b, 10));
|
|
||||||
// strcat(logEmit, "</span>");
|
|
||||||
|
|
||||||
fputsf (log, -22, "SSH");
|
fputsf (log, -22, "SSH");
|
||||||
char loginSSH[128] = {0};
|
char loginSSH[128] = {0};
|
||||||
char passSSH[128] = {0};
|
char passSSH[128] = {0};
|
||||||
char *ptrl1 = strstr(buffcpy, ":");
|
const char *ptrl1 = strstr(buffcpy, ":");
|
||||||
int lpsz = ptrl1 - buffcpy;
|
int lpsz = ptrl1 - buffcpy;
|
||||||
strncpy(loginSSH, buffcpy, lpsz);
|
strncpy(loginSSH, buffcpy, lpsz);
|
||||||
char *ptrl2 = strstr(buffcpy, "@");
|
const char *ptrl2 = strstr(buffcpy, "@");
|
||||||
lpsz = ptrl2 - ptrl1;
|
lpsz = ptrl2 - ptrl1;
|
||||||
strncpy(passSSH, ptrl1 + 1, lpsz);
|
strncpy(passSSH, ptrl1 + 1, lpsz);
|
||||||
fillGlobalLogData(ip, "", portString, std::to_string(recd).c_str(), "[SSH service]", loginSSH, passSSH, "NULL", "UTF-8", "SSH");
|
fillGlobalLogData(ip, "", portString, std::to_string(recd).c_str(), "[SSH service]", loginSSH, passSSH, "NULL", "UTF-8", "SSH");
|
||||||
@ -1523,9 +1508,8 @@ void _saveSSH(char *ip, int port, int recd, char *buffcpy)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *hl)
|
int Lexems::_filler(int p, const char* buffcpy, char* ip, int recd, Lexems *lx, char *hl)
|
||||||
{
|
{
|
||||||
if( strstr(buffcpy, "[IGNR_ADDR]") != NULL ) return -1;
|
|
||||||
if( strstr(buffcpy, "SSH-2.0-OpenSSH") != NULL || strstr(buffcpy, "SSH-2.0-mod_sftp") != NULL)
|
if( strstr(buffcpy, "SSH-2.0-OpenSSH") != NULL || strstr(buffcpy, "SSH-2.0-mod_sftp") != NULL)
|
||||||
{
|
{
|
||||||
std::string sshBuff;
|
std::string sshBuff;
|
||||||
@ -1596,7 +1580,7 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
|||||||
sprintf(port, "%d", p);
|
sprintf(port, "%d", p);
|
||||||
|
|
||||||
if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr);
|
if(strstr(finalstr, ps.headr) == NULL) strcat(finalstr, ps.headr);
|
||||||
if(flag == -1 || flag == 6 || strstr(finalstr, "[IGNR_ADDR]") != NULL) return -1;
|
if(flag == -1 || flag == 6) return -1;
|
||||||
|
|
||||||
if(flag == 16)
|
if(flag == 16)
|
||||||
{
|
{
|
||||||
@ -2012,7 +1996,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if(ls->flag == -1)
|
if(ls->flag == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -2040,7 +2023,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
|
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -2133,7 +2115,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if(ls->flag == -1)
|
if(ls->flag == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -2162,7 +2143,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
|
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -2210,7 +2190,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if(ls->flag == -1)
|
if(ls->flag == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -2;
|
return -2;
|
||||||
@ -2240,7 +2219,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
|
if (ls->_header(tempIP, tempPort, buff, ls, ps, redirStrLst, buff) == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -2282,7 +2260,6 @@ int redirectReconnect(char *cookie, char *ip, int port, char *str, Lexems *ls, P
|
|||||||
if(ls->flag == -1)
|
if(ls->flag == -1)
|
||||||
{
|
{
|
||||||
ps->flag = -1;
|
ps->flag = -1;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, tempPath);
|
strcpy(ps->path, tempPath);
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
@ -2458,7 +2435,7 @@ void _getLinkFromJSLocation(char *dataBuff, char *str, char *tag, char *ip, int
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
void _getJSCookie(char *dataBuff, char *str, char *ip, int port)
|
void _getJSCookie(char *dataBuff, const char *str, char *ip, int port)
|
||||||
{
|
{
|
||||||
char *ptr1 = strstri(str, "document.cookie");
|
char *ptr1 = strstri(str, "document.cookie");
|
||||||
if(ptr1 != NULL)
|
if(ptr1 != NULL)
|
||||||
@ -2480,36 +2457,11 @@ void _getJSCookie(char *dataBuff, char *str, char *ip, int port)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std::vector<std::string> *redirStrLst, char *rBuff)
|
int Lexems::_header(char *ip, int port, const char str[], Lexems *l, PathStr *ps, std::vector<std::string> *redirStrLst, char *rBuff)
|
||||||
{
|
{
|
||||||
std::string redirectStr = "";
|
std::string redirectStr = "";
|
||||||
if(strstr(str, "Set-Cookie:") != NULL) strncpy(ps->cookie, _getAttribute(str, "Set-Cookie:"), COOKIE_MAX_SIZE);
|
if(strstr(str, "Set-Cookie:") != NULL) strncpy(ps->cookie, _getAttribute(str, "Set-Cookie:"), COOKIE_MAX_SIZE);
|
||||||
|
|
||||||
#pragma region Prechecks
|
|
||||||
if(strstr(str, "[IGNR_ADDR]") != NULL)
|
|
||||||
{
|
|
||||||
if(gNegDebugMode) stt->doEmitionDebugFoundData("[<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\"><font color=\"#0084ff\">" + QString(ip) + ":" + QString::number(port) + "</font></a>" + "] Rejecting in _header::Precheck.");
|
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, "/");
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
strcpy(ps->codepage, GetCodePage(str));
|
strcpy(ps->codepage, GetCodePage(str));
|
||||||
|
|
||||||
if(strstr(str, "[CONN_LOWLOAD_OMG]") != NULL)
|
|
||||||
{
|
|
||||||
strcpy(ps->headr, "[CONN_LOWLOAD_OMG]");
|
|
||||||
strcpy(ps->path, "/");
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
if(strlen(str) == 0)
|
|
||||||
{
|
|
||||||
strcpy(ps->headr, "[No data!]");
|
|
||||||
strcpy(ps->path, "/");
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
char finalstr[512] = {0};
|
char finalstr[512] = {0};
|
||||||
|
|
||||||
if(strstri(str, "notice auth :*** looking up your hostname...")
|
if(strstri(str, "notice auth :*** looking up your hostname...")
|
||||||
@ -2520,7 +2472,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
strcpy(ps->path, "/"); return 1;
|
strcpy(ps->path, "/"); return 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
if((strstri(str, "ip camera") != NULL || strstri(str, "+tm01+") != NULL
|
if((strstri(str, "ip camera") != NULL || strstr(str, "+tm01+") != NULL
|
||||||
|| strstri(str, "camera web server") != NULL || strstri(str, "ipcam_language") != NULL
|
|| strstri(str, "camera web server") != NULL || strstri(str, "ipcam_language") != NULL
|
||||||
|| strstri(str, "/viewer/video.jpg") != NULL || strstri(str, "network camera") != NULL
|
|| strstri(str, "/viewer/video.jpg") != NULL || strstri(str, "network camera") != NULL
|
||||||
|| strstri(str, "sanpshot_icon") != NULL || strstri(str, "snapshot_icon") != NULL
|
|| strstri(str, "sanpshot_icon") != NULL || strstri(str, "snapshot_icon") != NULL
|
||||||
@ -2534,171 +2486,31 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
&& strstr(str, "company") == NULL
|
&& strstr(str, "company") == NULL
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
strcpy(ps->headr, "[IP Camera detected]");
|
if (strstr(str, "CgiStart?page=Single") != NULL) {
|
||||||
|
strcpy(ps->headr, "[IP Camera (Unibrowser)]");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
strcpy(ps->headr, "[IP Camera]");
|
||||||
|
}
|
||||||
l->flag = 0;
|
l->flag = 0;
|
||||||
ps->flag = 0;
|
ps->flag = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
if(strstri(str, "get_status.cgi") != NULL)
|
if(strstri(str, "get_status.cgi") != NULL) strcpy(ps->headr, "[It may be ip camera]");
|
||||||
{ strcpy(ps->headr, "[It may be ip camera]"); };
|
|
||||||
if(strstri(str, "vo_logo.gif") != NULL
|
if(strstri(str, "vo_logo.gif") != NULL
|
||||||
|| strstri(str, "vo logo.gif") != NULL
|
|| strstri(str, "vo logo.gif") != NULL
|
||||||
)
|
) strcpy(ps->headr, "[VIVOTEK camera detected?]");
|
||||||
{ strcpy(ps->headr, "[VIVOTEK camera detected?]"); };
|
|
||||||
if(strstri(str, "$lock extended") != NULL)
|
if(strstri(str, "$lock extended") != NULL)
|
||||||
{ strcpy(ps->headr, "[DChub detected.]"); strcpy(ps->path, "/"); return 0; };
|
{
|
||||||
|
strcpy(ps->headr, "[DChub detected.]");
|
||||||
|
strcpy(ps->path, "/");
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
if(strstri(str, "top.htm?currenttime") != NULL
|
if(strstri(str, "top.htm?currenttime") != NULL
|
||||||
|| strstri(str, "top.htm?") != NULL
|
|| strstri(str, "top.htm?") != NULL
|
||||||
) strcat(finalstr, " [?][SecCam detected]");
|
) strcat(finalstr, " [?][SecCam detected]");
|
||||||
|
|
||||||
|
|
||||||
#pragma region 302 Redirects
|
|
||||||
if( strstri(str, "http/1.0 301") != NULL || strstri(str, "http/1.1 301") != NULL
|
|
||||||
|| strstri(str, "http/1.0 302") != NULL || strstri(str, "http/1.1 302") != NULL
|
|
||||||
|| strstri(str, "http/1.0 307") != NULL || strstri(str, "http/1.1 307") != NULL
|
|
||||||
|| strstri(str, "303 see other") != NULL
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *temp = NULL, *temp2 = NULL;
|
|
||||||
int res = 127;
|
|
||||||
if(strstri(str, "location: ") != NULL)
|
|
||||||
{
|
|
||||||
temp = strstri(str, "location: ");
|
|
||||||
if( strstr(temp + 10, "\r\n") != NULL ) temp2 = strstr(temp + 10, "\r\n");
|
|
||||||
else if( strstr(temp + 10, "\n") != NULL ) temp2 = strstr(temp + 10, "\n");
|
|
||||||
|
|
||||||
if(temp2 != NULL)
|
|
||||||
{
|
|
||||||
res = temp2 - temp - 10;
|
|
||||||
char newLoc[256] = {0};
|
|
||||||
char *tmp = strstr(temp, "/");
|
|
||||||
|
|
||||||
if(tmp != NULL)
|
|
||||||
{
|
|
||||||
strncat(newLoc, temp + 10, res < 256 ? res : 255);
|
|
||||||
if(strstri(newLoc, "http://") == NULL && strstri(newLoc, "https://") == NULL)
|
|
||||||
{
|
|
||||||
if(newLoc[0] != '.')
|
|
||||||
{
|
|
||||||
if(newLoc[0] != '/')
|
|
||||||
{
|
|
||||||
int sz = strlen(newLoc);
|
|
||||||
if (sz > 255)
|
|
||||||
{
|
|
||||||
stt->doEmitionRedFoundData("Huge redirect string detected! " + QString(ip) + ":" + QString::number(port));
|
|
||||||
sz = 255;
|
|
||||||
};
|
|
||||||
char tnewLoc[256] = {0};
|
|
||||||
strcpy(tnewLoc, "/");
|
|
||||||
strncat(tnewLoc, newLoc, sz);
|
|
||||||
strncpy(newLoc, tnewLoc, sz);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
redirectStr = std::string(newLoc);
|
|
||||||
if(std::find(redirStrLst->begin(), redirStrLst->end(), redirectStr) == redirStrLst->end())
|
|
||||||
{
|
|
||||||
redirStrLst->push_back(redirectStr);
|
|
||||||
return redirectReconnect(ps->cookie, ip, port, newLoc, l, ps, redirStrLst, rBuff);
|
|
||||||
} return -1;
|
|
||||||
return -2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else if(strstri(str, "location:") != NULL)
|
|
||||||
{
|
|
||||||
temp = strstri(str, "location:");
|
|
||||||
if( strstr(temp + 9, "\r\n") != NULL ) temp2 = strstr(temp + 9, "\r\n");
|
|
||||||
else if( strstr(temp + 9, "\n") != NULL ) temp2 = strstr(temp + 9, "\n");
|
|
||||||
|
|
||||||
if(temp != NULL)
|
|
||||||
{
|
|
||||||
res = temp2 - temp - 9;
|
|
||||||
char newLoc[128] = {0};
|
|
||||||
char *tmp = strstr(temp, "/");
|
|
||||||
|
|
||||||
if(tmp != NULL)
|
|
||||||
{
|
|
||||||
strncat(newLoc, temp + 9, res < 128 ? res : 127);
|
|
||||||
redirectStr = std::string(newLoc);
|
|
||||||
if(std::find(redirStrLst->begin(), redirStrLst->end(), redirectStr) == redirStrLst->end())
|
|
||||||
{
|
|
||||||
redirStrLst->push_back(redirectStr);
|
|
||||||
return redirectReconnect(ps->cookie, ip, port, newLoc, l, ps, redirStrLst, rBuff);
|
|
||||||
} return -1;
|
|
||||||
return -2;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if(strstri(str, "http-equiv=\"refresh\"") != NULL
|
|
||||||
|| strstri(str, "http-equiv=refresh") != NULL
|
|
||||||
|| strstri(str, "http-equiv='refresh'") != NULL
|
|
||||||
)
|
|
||||||
{
|
|
||||||
char *temp = NULL;
|
|
||||||
char *strTmp = NULL;
|
|
||||||
|
|
||||||
if(strstri(str, "http-equiv=\"refresh\"") != NULL) strTmp = strstri(str, "ttp-equiv=\"refresh\"");
|
|
||||||
else if(strstri(str, "http-equiv=refresh") != NULL) strTmp = strstri(str, "http-equiv=refresh");
|
|
||||||
else if(strstri(str, "http-equiv='refresh'") != NULL) strTmp = strstri(str, "http-equiv='refresh'");
|
|
||||||
|
|
||||||
if(strstri(strTmp, "url=") != NULL )
|
|
||||||
{
|
|
||||||
if((int)(strstri(strTmp, "url=") - strTmp) < 100)
|
|
||||||
{
|
|
||||||
temp = strstri(strTmp, "url=");
|
|
||||||
|
|
||||||
char *temp2 = NULL, temp3[128] = {0};
|
|
||||||
int sz = 0;
|
|
||||||
|
|
||||||
if(temp[4] == '"' || temp[4] == '\'' || temp[4] == ' ' || temp[4] == '\n' || temp[4] == '\r')
|
|
||||||
{
|
|
||||||
temp2 = _findFirst(temp + 6, " \n>\"'");
|
|
||||||
if(temp2 != NULL)
|
|
||||||
{
|
|
||||||
sz = (int)(temp2 - temp) - 5;
|
|
||||||
strncpy(temp3, (char*)(temp + 5), (sz < 128 ? sz : 127));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
temp2 = _findFirst(temp + 4, " \n>\"'");
|
|
||||||
if(temp2 != NULL)
|
|
||||||
{
|
|
||||||
sz = (int)(temp2 - temp) - 4;
|
|
||||||
strncpy(temp3, (char*)(temp + 4), sz < 128 ? sz : 127);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
if(strstri(temp3, "http://") == NULL && strstri(temp3, "https://") == NULL)
|
|
||||||
{
|
|
||||||
if(temp3[0] != '.')
|
|
||||||
{
|
|
||||||
if(temp3[0] != '/')
|
|
||||||
{
|
|
||||||
char temp4[128] = {0};
|
|
||||||
strcpy(temp4, "/");
|
|
||||||
strncat(temp4, temp3, 127);
|
|
||||||
strncpy(temp3, temp4, 128);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
redirectStr = std::string(temp3);
|
|
||||||
if(std::find(redirStrLst->begin(), redirStrLst->end(), redirectStr) == redirStrLst->end())
|
|
||||||
{
|
|
||||||
redirStrLst->push_back(redirectStr);
|
|
||||||
return redirectReconnect(ps->cookie, ip, port, temp3, l, ps, redirStrLst, rBuff);
|
|
||||||
} return -1;
|
|
||||||
strcat(ps->headr, " ");
|
|
||||||
return -2;
|
|
||||||
};
|
|
||||||
strcat(ps->headr, finalstr);
|
|
||||||
strcat(ps->headr, " ");
|
|
||||||
return 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if(strstri(str, "<script") != NULL)
|
if(strstri(str, "<script") != NULL)
|
||||||
{
|
{
|
||||||
if(strstri(str, "document.cookie") != NULL)
|
if(strstri(str, "document.cookie") != NULL)
|
||||||
@ -2706,9 +2518,11 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
ZeroMemory(ps->cookie, sizeof(ps->cookie));
|
ZeroMemory(ps->cookie, sizeof(ps->cookie));
|
||||||
_getJSCookie(ps->cookie, str, ip, port);
|
_getJSCookie(ps->cookie, str, ip, port);
|
||||||
};
|
};
|
||||||
|
|
||||||
char *ptr1 = strstri(str, "<script");
|
char *ptr1 = strstri(str, "<script");
|
||||||
char *ptr2 = NULL;
|
char *ptr2 = NULL;
|
||||||
char linkPtr[512] = {0};
|
char linkPtr[512] = {0};
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
ZeroMemory(linkPtr, 512);
|
ZeroMemory(linkPtr, 512);
|
||||||
@ -2798,7 +2612,6 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
if(strstri(str, "ActiveXObject") != NULL
|
if(strstri(str, "ActiveXObject") != NULL
|
||||||
|| strstri(str, ".cab") != NULL
|
|| strstri(str, ".cab") != NULL
|
||||||
|| strstri(str, "clsid:") != NULL
|
|| strstri(str, "clsid:") != NULL
|
||||||
@ -2806,6 +2619,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
{
|
{
|
||||||
strcat(ps->headr, "[ActiveX]");
|
strcat(ps->headr, "[ActiveX]");
|
||||||
};
|
};
|
||||||
|
|
||||||
if(strstri(str, "<applet") != NULL
|
if(strstri(str, "<applet") != NULL
|
||||||
&& strstri(str, ".jar") != NULL
|
&& strstri(str, ".jar") != NULL
|
||||||
)
|
)
|
||||||
@ -2823,7 +2637,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
|
|
||||||
if(strstri(str, "<frameset") != NULL || strstri(str, "<frame") != NULL || strstri(str, "<iframe") != NULL)
|
if(strstri(str, "<frameset") != NULL || strstri(str, "<frame") != NULL || strstri(str, "<iframe") != NULL)
|
||||||
{
|
{
|
||||||
char *str1 = str;
|
const char *str1 = str;
|
||||||
char *str2 = NULL;
|
char *str2 = NULL;
|
||||||
char lol[128] = {0};
|
char lol[128] = {0};
|
||||||
int AreaLen = 0;
|
int AreaLen = 0;
|
||||||
@ -2899,7 +2713,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
{
|
{
|
||||||
redirStrLst->push_back(redirectStr);
|
redirStrLst->push_back(redirectStr);
|
||||||
return redirectReconnect(ps->cookie, ip, port, lol, l, ps, redirStrLst, rBuff);
|
return redirectReconnect(ps->cookie, ip, port, lol, l, ps, redirStrLst, rBuff);
|
||||||
} return -1;
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2919,7 +2733,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stt->doEmitionRedFoundData("[FrameLocator] Corrupted tag! [" + QString(ip) +":" + QString::number(port) + "]");
|
stt->doEmitionRedFoundData("[FrameLocator] Corrupted tag. [" + QString(ip) +":" + QString::number(port) + "]");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -2993,7 +2807,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
|
|
||||||
if(strstr(str, "\r\n\r\n") != NULL)
|
if(strstr(str, "\r\n\r\n") != NULL)
|
||||||
{
|
{
|
||||||
char *tempStr = strstr(str, "\r\n\r\n");
|
const char *tempStr = strstr(str, "\r\n\r\n");
|
||||||
if(strlen(tempStr) - 4 >= 250)
|
if(strlen(tempStr) - 4 >= 250)
|
||||||
{
|
{
|
||||||
if(strstr(str, "Content-Encoding: gzip") != NULL)
|
if(strstr(str, "Content-Encoding: gzip") != NULL)
|
||||||
@ -3024,7 +2838,6 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
};
|
};
|
||||||
|
|
||||||
++Filt;
|
++Filt;
|
||||||
strcpy(ps->headr, "[IGNR_ADDR]");
|
|
||||||
strcpy(ps->path, "/");
|
strcpy(ps->path, "/");
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
@ -3036,6 +2849,7 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
strcat(ps->headr, "]");
|
strcat(ps->headr, "]");
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ps->flag = ContentFilter(str, port, ip, ps->codepage);
|
ps->flag = ContentFilter(str, port, ip, ps->codepage);
|
||||||
|
|
||||||
if(strstri(str, "window.open(") != NULL)
|
if(strstri(str, "window.open(") != NULL)
|
||||||
|
16
main.cpp
16
main.cpp
@ -1,22 +1,7 @@
|
|||||||
#include "nesca_3.h"
|
#include "nesca_3.h"
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <qfontdatabase.h>
|
#include <qfontdatabase.h>
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
|
||||||
#include <windows.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//--Fixing _ITERATOR_DEBUG_LEVEL 0!=2
|
|
||||||
//#if defined(Q_OS_WIN32)
|
|
||||||
//int WINAPI WinMain(HINSTANCE hInstance,
|
|
||||||
// HINSTANCE hPrevInstance, LPSTR lpcmdline, int ncmdshow)
|
|
||||||
//{
|
|
||||||
// QApplication a(ncmdshow, (char **)lpcmdline);
|
|
||||||
//#else
|
|
||||||
//int main(int argc, char *argv[])
|
|
||||||
//{
|
|
||||||
// QApplication a(argc, argv);
|
|
||||||
//#endif
|
|
||||||
//#if defined(Q_OS_WIN32)
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
@ -38,7 +23,6 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//#endif
|
|
||||||
nesca_3 *gui = new nesca_3();
|
nesca_3 *gui = new nesca_3();
|
||||||
|
|
||||||
gui->showNormal();
|
gui->showNormal();
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
#include <libssh/libssh.h>
|
#include <libssh/libssh.h>
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
|
#include <vector>
|
||||||
#include <curl/curl.h>
|
#include <curl/curl.h>
|
||||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||||
#pragma once
|
|
||||||
#include "iostream"
|
#include "iostream"
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
@ -13,7 +13,6 @@
|
|||||||
#else
|
#else
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
@ -129,12 +128,12 @@ class Lexems
|
|||||||
|
|
||||||
int _header(char *ip,
|
int _header(char *ip,
|
||||||
int port,
|
int port,
|
||||||
char str[],
|
const char str[],
|
||||||
Lexems *l,
|
Lexems *l,
|
||||||
PathStr *ps,
|
PathStr *ps,
|
||||||
std::vector<std::string> *lst,
|
std::vector<std::string> *lst,
|
||||||
char *rBuff);
|
char *rBuff);
|
||||||
int _filler(int p, char *buffcpy, char* ipi, int recd, Lexems *lx, char *hl);
|
int _filler(int p, const char *buffcpy, char* ipi, int recd, Lexems *lx, char *hl);
|
||||||
int globalSearchNeg(const char *buffcpy, char *ip, int port);
|
int globalSearchNeg(const char *buffcpy, char *ip, int port);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
116
negatives.txt
116
negatives.txt
@ -1,13 +1,39 @@
|
|||||||
yadro.ru
|
Adapto CMS
|
||||||
|
баланс
|
||||||
|
средств
|
||||||
|
на вашем счету
|
||||||
|
абонент
|
||||||
|
RFB 009
|
||||||
|
00;39;49mroot:
|
||||||
Authorization Required
|
Authorization Required
|
||||||
Firewall Authentication required before
|
.swf
|
||||||
|
yadro.ru
|
||||||
liveinternet
|
liveinternet
|
||||||
#[Dlink]
|
#[Dlink]
|
||||||
|
DIR-100
|
||||||
|
DIR-615
|
||||||
|
DIR-140
|
||||||
session_login.php?reload=1
|
session_login.php?reload=1
|
||||||
|
Firewall Authentication required before
|
||||||
|
Piolink Web
|
||||||
|
You are not welcome to use
|
||||||
|
Permission error
|
||||||
|
sample.org
|
||||||
|
421 FTP connection refused
|
||||||
|
No HTTP resource was found
|
||||||
|
RTDVR ActiveX
|
||||||
D-RMS
|
D-RMS
|
||||||
|
command not understood
|
||||||
|
baZsDJAabybWQby
|
||||||
|
report abuse
|
||||||
atwiki
|
atwiki
|
||||||
studio
|
studio
|
||||||
McMyAdmin
|
McMyAdmin
|
||||||
|
500 Syntax error
|
||||||
|
Starting WebDVR
|
||||||
|
530 Connection refused
|
||||||
|
I can break rules, too
|
||||||
|
this system is engaged
|
||||||
Aviso de Bloqueio
|
Aviso de Bloqueio
|
||||||
Servico nao disponivel
|
Servico nao disponivel
|
||||||
Content-Encoding: gzip
|
Content-Encoding: gzip
|
||||||
@ -73,8 +99,10 @@ MELOOK
|
|||||||
/welcome/
|
/welcome/
|
||||||
application/x-shockwave-flash
|
application/x-shockwave-flash
|
||||||
/customer
|
/customer
|
||||||
|
e-Learn
|
||||||
/esi.cgi?page=status-index.xml
|
/esi.cgi?page=status-index.xml
|
||||||
/guarantee
|
/guarantee
|
||||||
|
.ac.jp
|
||||||
/html/index.asp
|
/html/index.asp
|
||||||
/iisstart.asp
|
/iisstart.asp
|
||||||
/images/final-hp
|
/images/final-hp
|
||||||
@ -92,6 +120,7 @@ application/x-shockwave-flash
|
|||||||
site introuvable
|
site introuvable
|
||||||
shop
|
shop
|
||||||
sell
|
sell
|
||||||
|
test server
|
||||||
/company
|
/company
|
||||||
/brand
|
/brand
|
||||||
/signin
|
/signin
|
||||||
@ -360,7 +389,12 @@ customer
|
|||||||
is functioning normally
|
is functioning normally
|
||||||
is under construction
|
is under construction
|
||||||
ispmanager control panel
|
ispmanager control panel
|
||||||
it works
|
it work
|
||||||
|
error404
|
||||||
|
404err
|
||||||
|
error500
|
||||||
|
500err
|
||||||
|
407 Proxy
|
||||||
ibm websphere
|
ibm websphere
|
||||||
is now configured
|
is now configured
|
||||||
is currently undergoing
|
is currently undergoing
|
||||||
@ -441,6 +475,7 @@ olvido su password
|
|||||||
oncell warning
|
oncell warning
|
||||||
one time payment
|
one time payment
|
||||||
one web server
|
one web server
|
||||||
|
Welcome to nginx
|
||||||
online dating
|
online dating
|
||||||
online store
|
online store
|
||||||
oracle application server
|
oracle application server
|
||||||
@ -454,6 +489,7 @@ Directory Listing Denied
|
|||||||
page=about
|
page=about
|
||||||
pagerrorimg
|
pagerrorimg
|
||||||
pagos
|
pagos
|
||||||
|
CodeIgniter
|
||||||
parkerad
|
parkerad
|
||||||
parking.
|
parking.
|
||||||
paradox ip module
|
paradox ip module
|
||||||
@ -592,8 +628,17 @@ sww link
|
|||||||
synology
|
synology
|
||||||
taobao
|
taobao
|
||||||
TopPageFinder.com
|
TopPageFinder.com
|
||||||
|
Sun Microsystems, Inc
|
||||||
|
421 Service is unavailable
|
||||||
|
404 Page not found
|
||||||
|
Echo Service
|
||||||
|
CareerVision
|
||||||
teamportal
|
teamportal
|
||||||
teamviewer
|
teamviewer
|
||||||
|
AW+ GUI Applet
|
||||||
|
Technotree Web
|
||||||
|
SI-TEC
|
||||||
|
desknet
|
||||||
technical support
|
technical support
|
||||||
teles.igate
|
teles.igate
|
||||||
tellion
|
tellion
|
||||||
@ -601,6 +646,8 @@ tell
|
|||||||
tell.
|
tell.
|
||||||
TEL(
|
TEL(
|
||||||
fax(
|
fax(
|
||||||
|
Web Management Login
|
||||||
|
IBM HTTP Server
|
||||||
no server available
|
no server available
|
||||||
tell:
|
tell:
|
||||||
tell :
|
tell :
|
||||||
@ -612,6 +659,8 @@ tel :
|
|||||||
tel:
|
tel:
|
||||||
tel?
|
tel?
|
||||||
tel ?
|
tel ?
|
||||||
|
tel)
|
||||||
|
AirLibro
|
||||||
fax?
|
fax?
|
||||||
fax ?
|
fax ?
|
||||||
termos de uso
|
termos de uso
|
||||||
@ -706,7 +755,19 @@ www.ibm.com
|
|||||||
www.lacie.com
|
www.lacie.com
|
||||||
www.sedo.com
|
www.sedo.com
|
||||||
xenserver
|
xenserver
|
||||||
|
CommuniGate Pro
|
||||||
|
MACROSCOP
|
||||||
|
Бухгалтер
|
||||||
|
бюджет
|
||||||
|
Welcome to WildFly
|
||||||
|
Welcome to jboss
|
||||||
|
VoIP Router
|
||||||
|
Can't connect to
|
||||||
xfinity
|
xfinity
|
||||||
|
строй
|
||||||
|
строит
|
||||||
|
VoIP Telephone
|
||||||
|
This site requires JavaScript
|
||||||
xtreamer
|
xtreamer
|
||||||
yahoo
|
yahoo
|
||||||
you are not logged in
|
you are not logged in
|
||||||
@ -721,20 +782,23 @@ wkrotce
|
|||||||
архив новостей
|
архив новостей
|
||||||
в стадии разработки
|
в стадии разработки
|
||||||
в разработке
|
в разработке
|
||||||
|
фильм
|
||||||
|
film
|
||||||
|
Не удается отобразить страницу
|
||||||
|
page does not exist
|
||||||
права защищены
|
права защищены
|
||||||
дача
|
дач
|
||||||
даче
|
дешев
|
||||||
дешевы
|
дешёв
|
||||||
дешёвы
|
pm2-web
|
||||||
домен продается
|
домен продается
|
||||||
домены на продажу
|
домены на продажу
|
||||||
доставка
|
доставка
|
||||||
заказать доставку
|
заказать доставку
|
||||||
заработок в сети
|
заработок в сети
|
||||||
знакомства
|
знакомства
|
||||||
истек срок регистрации
|
истек срок
|
||||||
карикатуры
|
карикатуры
|
||||||
код регистрации
|
|
||||||
конкурс
|
конкурс
|
||||||
контакты
|
контакты
|
||||||
кухни
|
кухни
|
||||||
@ -745,24 +809,29 @@ wkrotce
|
|||||||
мода
|
мода
|
||||||
мы предоставляем
|
мы предоставляем
|
||||||
на реконструкции
|
на реконструкции
|
||||||
|
позже
|
||||||
найти работу
|
найти работу
|
||||||
находится в разработке
|
находится в разработке
|
||||||
наш баннер
|
наш баннер
|
||||||
наша компания
|
компани
|
||||||
низкие цены
|
низкие цены
|
||||||
|
Некорректный URL
|
||||||
|
Невозможно подключиться
|
||||||
новый адрес
|
новый адрес
|
||||||
о компании
|
магаз
|
||||||
о нас
|
о нас
|
||||||
остев
|
остев
|
||||||
партнерк
|
партнерк
|
||||||
перевод текстов
|
перевод текстов
|
||||||
перееха
|
перееха
|
||||||
персональный сайт
|
персональный сайт
|
||||||
пиши мне
|
пиши
|
||||||
пиши нам
|
подержан
|
||||||
пишите мне
|
отключен
|
||||||
пишите нам
|
профилактические работы
|
||||||
подержанные
|
временные неудобства
|
||||||
|
Неверный ключ
|
||||||
|
Seo
|
||||||
подписаться
|
подписаться
|
||||||
поиск работы
|
поиск работы
|
||||||
приколы
|
приколы
|
||||||
@ -791,6 +860,21 @@ wkrotce
|
|||||||
технические работы
|
технические работы
|
||||||
услуги
|
услуги
|
||||||
флешки
|
флешки
|
||||||
|
Произошла ошибка
|
||||||
|
на хостинге
|
||||||
|
Fatal error:
|
||||||
|
mc.yandex.ru/watch
|
||||||
|
mc.yandex.ru/metrika
|
||||||
|
UNKNOWN HOST
|
||||||
|
host not found
|
||||||
|
Сайт закрыт
|
||||||
|
?partner
|
||||||
|
хокке
|
||||||
|
|
||||||
|
добро пожаловать в
|
||||||
|
статусы
|
||||||
|
высказывани
|
||||||
|
|
||||||
флэшки
|
флэшки
|
||||||
футбол
|
футбол
|
||||||
юмор
|
юмор
|
||||||
|
168
nesca_3.cpp
168
nesca_3.cpp
@ -35,8 +35,6 @@ int ver = 100*(100*(date.year()%100) + date.month()) + date.day();
|
|||||||
#define WIDGET_WIDTH 500
|
#define WIDGET_WIDTH 500
|
||||||
//#define IRC_CHAN "iskopasi_lab01"
|
//#define IRC_CHAN "iskopasi_lab01"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bool utfIRCFlag = true;
|
bool utfIRCFlag = true;
|
||||||
bool HTMLDebugMode = false;
|
bool HTMLDebugMode = false;
|
||||||
bool code160 = false;
|
bool code160 = false;
|
||||||
@ -151,15 +149,11 @@ QVector<int> vLowlLst;
|
|||||||
QVector<int> vBALst;
|
QVector<int> vBALst;
|
||||||
QVector<int> vSSHLst;
|
QVector<int> vSSHLst;
|
||||||
QVector<int> vOvrlLst;
|
QVector<int> vOvrlLst;
|
||||||
QVector<QPointF> vect;
|
|
||||||
|
|
||||||
QMenu *menuPS;
|
QMenu *menuPS;
|
||||||
|
|
||||||
QVector<QRect> NodeDots;
|
QVector<QRect> NodeDots;
|
||||||
QVector<QString> NodeAddrs;
|
QVector<QString> NodeAddrs;
|
||||||
|
|
||||||
int u = 1;
|
|
||||||
|
|
||||||
const nesca_3 *gthis;
|
const nesca_3 *gthis;
|
||||||
bool BALogSwitched = false;
|
bool BALogSwitched = false;
|
||||||
bool widgetIsHidden = false;
|
bool widgetIsHidden = false;
|
||||||
@ -171,8 +165,6 @@ QList<QString> PhraseLog;
|
|||||||
bool ME2ScanFlag = true, QoSScanFlag = false, VoiceScanFlag = false, PieStatFlag = false;
|
bool ME2ScanFlag = true, QoSScanFlag = false, VoiceScanFlag = false, PieStatFlag = false;
|
||||||
|
|
||||||
Ui::nesca_3Class *ui = new Ui::nesca_3Class;
|
Ui::nesca_3Class *ui = new Ui::nesca_3Class;
|
||||||
|
|
||||||
|
|
||||||
void setSceneArea()
|
void setSceneArea()
|
||||||
{
|
{
|
||||||
delete ui->graphicsVoice;
|
delete ui->graphicsVoice;
|
||||||
@ -193,6 +185,15 @@ void setSceneArea()
|
|||||||
sceneUpper->setSceneRect(0, 0, ui->graphicLog_Upper->width(), ui->graphicLog_Upper->height());
|
sceneUpper->setSceneRect(0, 0, ui->graphicLog_Upper->width(), ui->graphicLog_Upper->height());
|
||||||
sceneGrid->setSceneRect(0, 0, ui->graphicLog_Upper->width(), ui->graphicLog_Upper->height());
|
sceneGrid->setSceneRect(0, 0, ui->graphicLog_Upper->width(), ui->graphicLog_Upper->height());
|
||||||
|
|
||||||
|
QLinearGradient gradient(0, 0, 0, 94);
|
||||||
|
gradient.setColorAt(0, QColor(255, 0, 0));
|
||||||
|
gradient.setColorAt(0.7, QColor(255, 0, 0));
|
||||||
|
gradient.setColorAt(0.85, QColor(255, 255, 0));
|
||||||
|
gradient.setColorAt(0.9, QColor(0, 255, 0));
|
||||||
|
gradient.setColorAt(1, QColor(255, 255, 255, 60));
|
||||||
|
pen2i.setBrush(gradient);
|
||||||
|
sceneGraph->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||||
|
|
||||||
sceneActivity = new QGraphicsScene();
|
sceneActivity = new QGraphicsScene();
|
||||||
sceneActivityGrid = new QGraphicsScene();
|
sceneActivityGrid = new QGraphicsScene();
|
||||||
sceneTextPlacer = new QGraphicsScene();
|
sceneTextPlacer = new QGraphicsScene();
|
||||||
@ -740,41 +741,44 @@ void nesca_3::slotAddLine(int x1, int y1, int x2, int y2)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void nesca_3::slotAddPolyLine()
|
void nesca_3::slotAddPolyLine()
|
||||||
{
|
{
|
||||||
sceneGraph->setItemIndexMethod(QGraphicsScene::NoIndex);
|
|
||||||
if(ME2ScanFlag)
|
if(ME2ScanFlag)
|
||||||
{
|
{
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
if(vect.size() > 0)
|
if (DrawerTh_ME2Scanner::polyVect.size() > 0)
|
||||||
{
|
{
|
||||||
path.moveTo(vect[0]);
|
path.moveTo(DrawerTh_ME2Scanner::polyVect[0]);
|
||||||
for(int i = 1; i < vect.size(); ++i)
|
for (int i = 1; i < DrawerTh_ME2Scanner::polyVect.count(); ++i)
|
||||||
{
|
{
|
||||||
path.lineTo(vect[i]);
|
path.lineTo(DrawerTh_ME2Scanner::polyVect[i]);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
QGraphicsPathItem* itm = new QGraphicsPathItem(path);
|
QGraphicsPathItem* itm = new QGraphicsPathItem(path);
|
||||||
itm->setPen(pen2i);
|
itm->setPen(pen2i);
|
||||||
|
DrawerTh_ME2Scanner::itmList.push_front(itm);
|
||||||
|
|
||||||
|
int u = 0;
|
||||||
|
double uu = 1.0;
|
||||||
|
for (int i = 0; i < DrawerTh_ME2Scanner::itmList.count(); ++i)
|
||||||
|
{
|
||||||
|
itm = DrawerTh_ME2Scanner::itmList[i];
|
||||||
|
int y = u - i - 1;
|
||||||
|
itm->setY(y);
|
||||||
|
itm->setOpacity(uu);
|
||||||
sceneGraph->addItem(itm);
|
sceneGraph->addItem(itm);
|
||||||
|
uu -= 0.027;
|
||||||
double uu = 0.0;
|
u -= 1;
|
||||||
int vSz = sceneGraph->items().count();
|
|
||||||
for(int i = 0; i < vSz; ++i)
|
|
||||||
{
|
|
||||||
sceneGraph->items()[i]->setY(u + i + 1);
|
|
||||||
sceneGraph->items()[i]->setOpacity(0 + uu);
|
|
||||||
uu += 0.027;
|
|
||||||
u += 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
while(sceneGraph->items().count() > 38)
|
while (DrawerTh_ME2Scanner::itmList.count() > 38)
|
||||||
{
|
{
|
||||||
sceneGraph->removeItem(sceneGraph->items().first());
|
sceneGraph->removeItem(DrawerTh_ME2Scanner::itmList[38]);
|
||||||
|
delete DrawerTh_ME2Scanner::itmList[38];
|
||||||
|
DrawerTh_ME2Scanner::itmList.pop_back();
|
||||||
};
|
};
|
||||||
|
|
||||||
if(u > 10) u = 1;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,7 +857,6 @@ void nesca_3::activateME2ScanScene()
|
|||||||
ui->PieStatBut->setStyleSheet("color: rgb(130, 130, 130);background-color: rgba(2, 2, 2, 0);border: 1px solid rgba(130, 130, 130, 80);");
|
ui->PieStatBut->setStyleSheet("color: rgb(130, 130, 130);background-color: rgba(2, 2, 2, 0);border: 1px solid rgba(130, 130, 130, 80);");
|
||||||
|
|
||||||
sceneUpper->clear();
|
sceneUpper->clear();
|
||||||
|
|
||||||
sceneGrid->clear();
|
sceneGrid->clear();
|
||||||
sceneGrid2->clear();
|
sceneGrid2->clear();
|
||||||
sceneGraph->clear();
|
sceneGraph->clear();
|
||||||
@ -874,21 +877,11 @@ void nesca_3::activateME2ScanScene()
|
|||||||
VoiceScanFlag = false;
|
VoiceScanFlag = false;
|
||||||
PieStatFlag = false;
|
PieStatFlag = false;
|
||||||
|
|
||||||
for(int i = 0; i < sceneGrid->items().size(); ++i)
|
|
||||||
{
|
|
||||||
sceneGrid->removeItem(sceneGrid->items()[i]);
|
|
||||||
sceneGrid->items().clear();
|
|
||||||
};
|
|
||||||
for(int i = 0; i < sceneGrid2->items().size(); ++i)
|
|
||||||
{
|
|
||||||
sceneGrid2->removeItem(sceneGrid2->items()[i]);
|
|
||||||
sceneGrid2->items().clear();
|
|
||||||
};
|
|
||||||
|
|
||||||
if(dtHN->isRunning() == false)
|
if(dtHN->isRunning() == false)
|
||||||
{
|
{
|
||||||
dtHN->start();
|
dtHN->start();
|
||||||
};
|
};
|
||||||
|
|
||||||
if(dtME2->isRunning() == false)
|
if(dtME2->isRunning() == false)
|
||||||
{
|
{
|
||||||
dtME2->start();
|
dtME2->start();
|
||||||
@ -947,7 +940,7 @@ void nesca_3::activateQoSScanBut()
|
|||||||
sceneUpper->clear();
|
sceneUpper->clear();
|
||||||
sceneTextPlacer->clear();
|
sceneTextPlacer->clear();
|
||||||
sceneVoice->clear();
|
sceneVoice->clear();
|
||||||
vect.clear();
|
DrawerTh_ME2Scanner::polyVect.clear();
|
||||||
|
|
||||||
if(dtQoS->isRunning() == false) dtQoS->start();
|
if(dtQoS->isRunning() == false) dtQoS->start();
|
||||||
if(dtGridQoS->isRunning() == false) dtGridQoS->start();
|
if(dtGridQoS->isRunning() == false) dtGridQoS->start();
|
||||||
@ -1869,48 +1862,6 @@ void nesca_3::slotIRCGetTopic(QString str)
|
|||||||
ui->ircText->append(rData);
|
ui->ircText->append(rData);
|
||||||
}
|
}
|
||||||
|
|
||||||
//unsigned char jpgHeader[623] = {
|
|
||||||
// 0xFF, 0xD8, 0xFF, 0xE0, 0x00, 0x10, 0x4A, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x01, 0x00, 0x60,
|
|
||||||
// 0x00, 0x60, 0x00, 0x00, 0xFF, 0xDB, 0x00, 0x43, 0x00, 0x02, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02,
|
|
||||||
// 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x03, 0x05, 0x03, 0x03, 0x03, 0x03, 0x03, 0x06, 0x04,
|
|
||||||
// 0x04, 0x03, 0x05, 0x07, 0x06, 0x07, 0x07, 0x07, 0x06, 0x07, 0x07, 0x08, 0x09, 0x0B, 0x09, 0x08,
|
|
||||||
// 0x08, 0x0A, 0x08, 0x07, 0x07, 0x0A, 0x0D, 0x0A, 0x0A, 0x0B, 0x0C, 0x0C, 0x0C, 0x0C, 0x07, 0x09,
|
|
||||||
// 0x0E, 0x0F, 0x0D, 0x0C, 0x0E, 0x0B, 0x0C, 0x0C, 0x0C, 0xFF, 0xDB, 0x00, 0x43, 0x01, 0x02, 0x02,
|
|
||||||
// 0x02, 0x03, 0x03, 0x03, 0x06, 0x03, 0x03, 0x06, 0x0C, 0x08, 0x07, 0x08, 0x0C, 0x0C, 0x0C, 0x0C,
|
|
||||||
// 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
|
|
||||||
// 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C,
|
|
||||||
// 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0xFF, 0xC0,
|
|
||||||
// 0x00, 0x11, 0x08, 0x00, 0x64, 0x00, 0x80, 0x03, 0x01, 0x22, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11,
|
|
||||||
// 0x01, 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
|
|
||||||
// 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09,
|
|
||||||
// 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02, 0x04, 0x03, 0x05,
|
|
||||||
// 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21,
|
|
||||||
// 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1, 0x08, 0x23,
|
|
||||||
// 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17,
|
|
||||||
// 0x18, 0x19, 0x1A, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A,
|
|
||||||
// 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A,
|
|
||||||
// 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,
|
|
||||||
// 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99,
|
|
||||||
// 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7,
|
|
||||||
// 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5,
|
|
||||||
// 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1,
|
|
||||||
// 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F, 0x01, 0x00, 0x03,
|
|
||||||
// 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
|
||||||
// 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5, 0x11, 0x00,
|
|
||||||
// 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05, 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00,
|
|
||||||
// 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, 0x13,
|
|
||||||
// 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1, 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15,
|
|
||||||
// 0x62, 0x72, 0xD1, 0x0A, 0x16, 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27,
|
|
||||||
// 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49,
|
|
||||||
// 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69,
|
|
||||||
// 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88,
|
|
||||||
// 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
|
|
||||||
// 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA, 0xC2, 0xC3, 0xC4,
|
|
||||||
// 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2,
|
|
||||||
// 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9,
|
|
||||||
// 0xFA, 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11, 0x00, 0x3F, 0x00
|
|
||||||
//};
|
|
||||||
//
|
|
||||||
int c = 1;
|
int c = 1;
|
||||||
|
|
||||||
void nesca_3::slotSaveImage(QAction *qwe)
|
void nesca_3::slotSaveImage(QAction *qwe)
|
||||||
@ -2414,7 +2365,6 @@ void nesca_3::slotIncData(QString ip, QString str)
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma region SM_Buts
|
|
||||||
void nesca_3::smReaction()
|
void nesca_3::smReaction()
|
||||||
{
|
{
|
||||||
QObject *smB = this->sender();
|
QObject *smB = this->sender();
|
||||||
@ -2849,7 +2799,6 @@ void nesca_3::changeNSTrackLabel(bool status)
|
|||||||
else ui->NSTrackStatusLabel->setStyleSheet("background-color: black; border: 1px solid white;");
|
else ui->NSTrackStatusLabel->setStyleSheet("background-color: black; border: 1px solid white;");
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma region "Signal assignments"
|
|
||||||
void nesca_3::ConnectEvrthng()
|
void nesca_3::ConnectEvrthng()
|
||||||
{
|
{
|
||||||
connect ( pbTh, SIGNAL(upd()), this, SLOT(slotPBUpdate()));
|
connect ( pbTh, SIGNAL(upd()), this, SLOT(slotPBUpdate()));
|
||||||
@ -2891,7 +2840,7 @@ void nesca_3::ConnectEvrthng()
|
|||||||
connect ( ui->startScanButton_4, SIGNAL( clicked() ), this, SLOT( startScanButtonClickedDNS() ) );
|
connect ( ui->startScanButton_4, SIGNAL( clicked() ), this, SLOT( startScanButtonClickedDNS() ) );
|
||||||
connect ( ui->shuffle_onoff, SIGNAL(toggled(bool)), this, SLOT(ChangeShuffle(bool)));
|
connect ( ui->shuffle_onoff, SIGNAL(toggled(bool)), this, SLOT(ChangeShuffle(bool)));
|
||||||
connect ( ui->trackerOnOff, SIGNAL(toggled(bool)), this, SLOT(ChangeTrackerOK(bool)));
|
connect ( ui->trackerOnOff, SIGNAL(toggled(bool)), this, SLOT(ChangeTrackerOK(bool)));
|
||||||
connect ( ui->pingingOnOff, SIGNAL( toggled(bool) ), this, SLOT( ChangePingerOK(bool) ) );
|
// connect ( ui->pingingOnOff, SIGNAL( toggled(bool) ), this, SLOT( ChangePingerOK(bool) ) );
|
||||||
connect ( ui->debugFileOnOff, SIGNAL( toggled(bool) ), this, SLOT( ChangeDebugFileState(bool) ) );
|
connect ( ui->debugFileOnOff, SIGNAL( toggled(bool) ), this, SLOT( ChangeDebugFileState(bool) ) );
|
||||||
connect ( ui->importThreads, SIGNAL( textChanged(QString) ), this, SLOT( ChangeLabelThreads_ValueChanged(QString) ) );
|
connect ( ui->importThreads, SIGNAL( textChanged(QString) ), this, SLOT( ChangeLabelThreads_ValueChanged(QString) ) );
|
||||||
connect ( ui->threadLine, SIGNAL( textChanged(QString) ), this, SLOT( ChangeLabelThreads_ValueChanged(QString) ) );
|
connect ( ui->threadLine, SIGNAL( textChanged(QString) ), this, SLOT( ChangeLabelThreads_ValueChanged(QString) ) );
|
||||||
@ -3108,25 +3057,34 @@ void RestoreSession()
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (strstr(resStr, "[NDBSERVER]:") != NULL) ui->lineTrackerSrv->setText(loadNescaSetup(resStr, "[NDBSERVER]:").simplified());
|
if (strstr(resStr, "[NDBSERVER]:") != NULL) ui->lineTrackerSrv->setText(loadNescaSetup(resStr, "[NDBSERVER]:").simplified());
|
||||||
if(strstr(resStr, "[NDBSCRIPT]:") != NULL) ui->lineTrackerScr->setText(loadNescaSetup(resStr, "[NDBSCRIPT]:").simplified());
|
else if (strstr(resStr, "[NDBSCRIPT]:") != NULL) ui->lineTrackerScr->setText(loadNescaSetup(resStr, "[NDBSCRIPT]:").simplified());
|
||||||
if(strstr(resStr, "[NDBPORT]:") != NULL) ui->trcSrvPortLine->setText(loadNescaSetup(resStr, "[NDBPORT]:").simplified());
|
else if (strstr(resStr, "[NDBPORT]:") != NULL) ui->trcSrvPortLine->setText(loadNescaSetup(resStr, "[NDBPORT]:").simplified());
|
||||||
if(strstr(resStr, "[PING]:") != NULL) ui->pingingOnOff->setText(loadNescaSetup(resStr, "[PING]:").simplified());
|
else if (strstr(resStr, "[PING]:") != NULL) {
|
||||||
if(strstr(resStr, "[PING_TO]:") != NULL) ui->PingTO->setText(loadNescaSetup(resStr, "[PING_TO]:").simplified());
|
lex = strstr(resStr, "[PING]:") + strlen("[PING]:");
|
||||||
if(strstr(resStr, "[THREAD_DELAY]:") != NULL) ui->threadDelayBox->setText(loadNescaSetup(resStr, "[THREAD_DELAY]:").simplified());
|
|
||||||
if(strstr(resStr, "[TIMEOUT]:") != NULL) {
|
if (strlen(lex) > 1)
|
||||||
ui->iptoLine_value->setText(loadNescaSetup(resStr, "[TIMEOUT]:"));
|
{
|
||||||
ui->iptoLine_value_2->setText(loadNescaSetup(resStr, "[TIMEOUT]:"));
|
lex[strlen(lex) - 1] = '\0';
|
||||||
ui->iptoLine_value_3->setText(loadNescaSetup(resStr, "[TIMEOUT]:"));
|
ui->pingingOnOff->setChecked(strcmp(lex, "true") == 0 ? true : false);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
if(strstr(resStr, "[MAXBTHR]:") != NULL) ui->maxBrutingThrBox->setText(loadNescaSetup(resStr, "[MAXBTHR]:").simplified());
|
else if (strstr(resStr, "[PING_TO]:") != NULL) ui->PingTO->setText(loadNescaSetup(resStr, "[PING_TO]:").simplified());
|
||||||
if(strstr(resStr, "[PERSKEY]:") != NULL) ui->linePersKey->setText(loadNescaSetup(resStr, "[PERSKEY]:").simplified());
|
else if (strstr(resStr, "[THREAD_DELAY]:") != NULL) ui->threadDelayBox->setText(loadNescaSetup(resStr, "[THREAD_DELAY]:").simplified());
|
||||||
if(strstr(resStr, "[IRCSERVER]:") != NULL) ui->ircServerBox->setText(loadNescaSetup(resStr, "[IRCSERVER]:").simplified());
|
else if (strstr(resStr, "[TIMEOUT]:") != NULL) {
|
||||||
if(strstr(resStr, "[IRCPORT]:") != NULL) ui->serverPortBox->setText(loadNescaSetup(resStr, "[IRCPORT]:").simplified());
|
const QString &tempLex = loadNescaSetup(resStr, "[TIMEOUT]:");
|
||||||
if(strstr(resStr, "[IRCPROXY]:") != NULL) ui->ircProxy->setText(loadNescaSetup(resStr, "[IRCPROXY]:").simplified());
|
ui->iptoLine_value->setText(tempLex);
|
||||||
if(strstr(resStr, "[IRCPROXYPORT]:") != NULL) ui->ircProxyPort->setText(loadNescaSetup(resStr, "[IRCPROXYPORT]:").simplified());
|
ui->iptoLine_value_2->setText(tempLex);
|
||||||
if(strstr(resStr, "[SYSTEMPROXYIP]:") != NULL) ui->systemProxyIP->setText(loadNescaSetup(resStr, "[SYSTEMPROXYIP]:").simplified());
|
ui->iptoLine_value_3->setText(tempLex);
|
||||||
if(strstr(resStr, "[SYSTEMPROXYPORT]:") != NULL) ui->systemProxyPort->setText(loadNescaSetup(resStr, "[SYSTEMPROXYPORT]:").simplified());
|
}
|
||||||
if(strstr(resStr, "[IRCNICK]:") != NULL) ui->ircNickBox->setText(loadNescaSetup(resStr, "[IRCNICK]:").simplified());
|
else if (strstr(resStr, "[MAXBTHR]:") != NULL) ui->maxBrutingThrBox->setText(loadNescaSetup(resStr, "[MAXBTHR]:").simplified());
|
||||||
|
else if (strstr(resStr, "[PERSKEY]:") != NULL) ui->linePersKey->setText(loadNescaSetup(resStr, "[PERSKEY]:").simplified());
|
||||||
|
else if (strstr(resStr, "[IRCSERVER]:") != NULL) ui->ircServerBox->setText(loadNescaSetup(resStr, "[IRCSERVER]:").simplified());
|
||||||
|
else if (strstr(resStr, "[IRCPORT]:") != NULL) ui->serverPortBox->setText(loadNescaSetup(resStr, "[IRCPORT]:").simplified());
|
||||||
|
else if (strstr(resStr, "[IRCPROXY]:") != NULL) ui->ircProxy->setText(loadNescaSetup(resStr, "[IRCPROXY]:").simplified());
|
||||||
|
else if (strstr(resStr, "[IRCPROXYPORT]:") != NULL) ui->ircProxyPort->setText(loadNescaSetup(resStr, "[IRCPROXYPORT]:").simplified());
|
||||||
|
else if (strstr(resStr, "[SYSTEMPROXYIP]:") != NULL) ui->systemProxyIP->setText(loadNescaSetup(resStr, "[SYSTEMPROXYIP]:").simplified());
|
||||||
|
else if (strstr(resStr, "[SYSTEMPROXYPORT]:") != NULL) ui->systemProxyPort->setText(loadNescaSetup(resStr, "[SYSTEMPROXYPORT]:").simplified());
|
||||||
|
else if (strstr(resStr, "[IRCNICK]:") != NULL) ui->ircNickBox->setText(loadNescaSetup(resStr, "[IRCNICK]:").simplified());
|
||||||
ZeroMemory(resStr, sizeof(resStr));
|
ZeroMemory(resStr, sizeof(resStr));
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3237,12 +3195,6 @@ void _startMsgCheck()
|
|||||||
QTime time = QTime::currentTime();
|
QTime time = QTime::currentTime();
|
||||||
qsrand((uint)time.msec());
|
qsrand((uint)time.msec());
|
||||||
|
|
||||||
QLinearGradient gradient(0, 0, 0, 20);
|
|
||||||
gradient.setColorAt(0, QColor(0,255,0));
|
|
||||||
gradient.setColorAt(0.5, QColor(100,100,100, 100));
|
|
||||||
gradient.setColorAt(1, QColor(255,255,255, 60));
|
|
||||||
pen2i.setBrush(gradient);
|
|
||||||
|
|
||||||
ui->ircNickBox->setText("nsa_" + QString::number(qrand() % 8999 + 1000));
|
ui->ircNickBox->setText("nsa_" + QString::number(qrand() % 8999 + 1000));
|
||||||
|
|
||||||
char rVer[32] = {0};
|
char rVer[32] = {0};
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#ifndef nesca_3_H
|
#ifndef nesca_3_H
|
||||||
#define nesca_3_H
|
#define nesca_3_H
|
||||||
|
|
||||||
#pragma once
|
//Include windows.h ONLY *after* qdatetime.h
|
||||||
|
//Bug: https://bugreports.qt.io/browse/QTBUG-31469
|
||||||
|
|
||||||
|
#include <qdatetime.h>
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <qapplication.h>
|
#include <qapplication.h>
|
||||||
#include <qgraphicsitem.h>
|
#include <qgraphicsitem.h>
|
||||||
@ -12,7 +15,6 @@
|
|||||||
#include <QSystemTrayIcon>
|
#include <QSystemTrayIcon>
|
||||||
#include <QtGui/qevent.h>
|
#include <QtGui/qevent.h>
|
||||||
#include <qthread.h>
|
#include <qthread.h>
|
||||||
#include <qdatetime.h>
|
|
||||||
#include <qjsonobject.h>
|
#include <qjsonobject.h>
|
||||||
#include <qjsonvalue.h>
|
#include <qjsonvalue.h>
|
||||||
#include <qjsonarray.h>
|
#include <qjsonarray.h>
|
||||||
@ -31,7 +33,6 @@ extern char endIP2[128], 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;
|
||||||
extern QVector<QPointF> vect;
|
|
||||||
extern QList<int> lstOfLabels;
|
extern QList<int> lstOfLabels;
|
||||||
extern QSystemTrayIcon *tray;
|
extern QSystemTrayIcon *tray;
|
||||||
|
|
||||||
|
16
nesca_3.ui
16
nesca_3.ui
@ -91,7 +91,7 @@
|
|||||||
<enum>QTabWidget::Rounded</enum>
|
<enum>QTabWidget::Rounded</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="elideMode">
|
<property name="elideMode">
|
||||||
<enum>Qt::ElideMiddle</enum>
|
<enum>Qt::ElideMiddle</enum>
|
||||||
@ -1186,13 +1186,13 @@ border-radius: 3px;</string>
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="whatsThis">
|
<property name="whatsThis">
|
||||||
<string>Ping hosts before connection attempts. (For bad internet-providers)</string>
|
<string>Ping hosts before connection attempts.</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color: rgb(216, 216, 216); background-color: rgba(2, 2, 2, 0);</string>
|
<string notr="true">color: rgb(216, 216, 216); background-color: rgba(2, 2, 2, 0);</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Ping hosts:</string>
|
<string>Ping hosts</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="shortcut">
|
<property name="shortcut">
|
||||||
<string>Ctrl+S</string>
|
<string>Ctrl+S</string>
|
||||||
@ -1340,7 +1340,7 @@ border-radius: 3px;</string>
|
|||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>390</x>
|
<x>390</x>
|
||||||
<y>89</y>
|
<y>90</y>
|
||||||
<width>51</width>
|
<width>51</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
@ -1774,7 +1774,7 @@ border-radius: 3px;</string>
|
|||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Consolas'; font-size:11pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'Consolas'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="cursorWidth">
|
<property name="cursorWidth">
|
||||||
@ -2537,7 +2537,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Eurostile'; font-size:11pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'Eurostile'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="cursorWidth">
|
<property name="cursorWidth">
|
||||||
@ -3521,7 +3521,7 @@ background-color: #000000;</string>
|
|||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Eurostile'; font-size:11pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'Eurostile'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="acceptRichText">
|
<property name="acceptRichText">
|
||||||
@ -3657,7 +3657,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||||
p, li { white-space: pre-wrap; }
|
p, li { white-space: pre-wrap; }
|
||||||
</style></head><body style=" font-family:'Eurostile'; font-size:11pt; font-weight:400; font-style:normal;">
|
</style></head><body style=" font-family:'Eurostile'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||||
<p style="-qt-paragraph-type:empty; margin-top:2px; margin-bottom:2px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
<p style="-qt-paragraph-type:empty; margin-top:2px; margin-bottom:2px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"><br /></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="acceptRichText">
|
<property name="acceptRichText">
|
||||||
|
@ -2282,6 +2282,7 @@ int _GetDNSFromMask(char *mask, char *saveMask, char *saveMaskEnder)
|
|||||||
|
|
||||||
int startScan(char* args)
|
int startScan(char* args)
|
||||||
{
|
{
|
||||||
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
OpenSSL_add_all_algorithms(); /* Load cryptos, et.al. */
|
OpenSSL_add_all_algorithms(); /* Load cryptos, et.al. */
|
||||||
SSL_load_error_strings(); /* Bring in and register error messages */
|
SSL_load_error_strings(); /* Bring in and register error messages */
|
||||||
|
@ -549,7 +549,6 @@ void IRCLoop()
|
|||||||
}
|
}
|
||||||
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, " 433 ") > 0 || strstr(comStr, "Nickname is already") > 0) )
|
else if(strstr(comStr, serverRealName) != NULL && (strstr(comStr, " 433 ") > 0 || strstr(comStr, "Nickname is already") > 0) )
|
||||||
{
|
{
|
||||||
|
|
||||||
QTime time = QTime::currentTime();
|
QTime time = QTime::currentTime();
|
||||||
qsrand((uint)time.msec());
|
qsrand((uint)time.msec());
|
||||||
ircTh->doEmitChangeRedIRCData("[Nope] Nickname is already in use.");
|
ircTh->doEmitChangeRedIRCData("[Nope] Nickname is already in use.");
|
||||||
|
Loading…
Reference in New Issue
Block a user