diff --git a/00000036.wav b/00000036.wav new file mode 100644 index 0000000..8466549 Binary files /dev/null and b/00000036.wav differ diff --git a/CheckKey_Th.cpp b/CheckKey_Th.cpp index 6ee1ba7..64dccb8 100644 --- a/CheckKey_Th.cpp +++ b/CheckKey_Th.cpp @@ -212,9 +212,15 @@ int KeyCheckerMain() if(strstr(msg, "202 Accepted") != NULL) { +<<<<<<< HEAD stt->doEmitionGreenFoundData("[Key check] -OK. Key is valid!"); +======= +#pragma region QTGUI_Area + stt->doEmitionGreenFoundData("[Key check] -OK. Key is valid!"); +#pragma endregion +>>>>>>> 1f26df077976493c1916f7764c83dc03da1445fa CSSOCKET(sock); if(emitIfOK == 0) stt->doEmitionStartScanIP(); @@ -224,11 +230,19 @@ int KeyCheckerMain() } else if(strstr(msg, "400 Bad Request") != NULL) { +<<<<<<< HEAD QString errorDef = GetNSErrorDefinition(msg, "notify"); if(errorDef == "Invalid access key") stt->doEmitionYellowFoundData("[NS-Track] [Key is unauthorized] A valid key is required."); else stt->doEmitionYellowFoundData("[NS-Track] -FAIL! [400 Bad Request : " + GetNSErrorDefinition(msg, "notify") + "]"); +======= +#pragma region QTGUI_Area + QString errorDef = GetNSErrorDefinition(msg, "notify"); + if(errorDef == "Invalid access key") stt->doEmitionYellowFoundData("[NS-Track] [Key is unauthorized] A valid key is required."); + else stt->doEmitionYellowFoundData("[NS-Track] -FAIL! [400 Bad Request : " + GetNSErrorDefinition(msg, "notify") + "]"); +#pragma endregion +>>>>>>> 1f26df077976493c1916f7764c83dc03da1445fa CSSOCKET(sock); return -1; } @@ -240,12 +254,20 @@ int KeyCheckerMain() } else { +<<<<<<< HEAD +======= +#pragma region QTGUI_Area +>>>>>>> 1f26df077976493c1916f7764c83dc03da1445fa char header[64] = {0}; getSubStrEx(msg, "http/1.1 ", "\r\n", header, 64); stt->doEmitionYellowFoundData("[Key check] -FAIL! An error occured. (" + QString::number(WSAGetLastError()) + ") Header: " + QString::fromLocal8Bit(header) + ""); if(gDebugMode) stt->doEmitionDebugFoundData(QString(msg)); +<<<<<<< HEAD +======= +#pragma endregion +>>>>>>> 1f26df077976493c1916f7764c83dc03da1445fa CSSOCKET(sock); return -1; }; @@ -255,12 +277,20 @@ int KeyCheckerMain() } else { +<<<<<<< HEAD +======= +#pragma region QTGUI_Area +>>>>>>> 1f26df077976493c1916f7764c83dc03da1445fa stt->doEmitionRedFoundData("[Key check] -Balancer replied with invalid string."); if(gDebugMode) stt->doEmitionDebugFoundData(QString(msg)); CSSOCKET(sock); return -1; +<<<<<<< HEAD +======= +#pragma endregion +>>>>>>> 1f26df077976493c1916f7764c83dc03da1445fa }; }; diff --git a/ClassDiagram1.cd b/ClassDiagram1.cd new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/ClassDiagram1.cd @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/debugData.txt b/debugData.txt new file mode 100644 index 0000000..e190a25 --- /dev/null +++ b/debugData.txt @@ -0,0 +1,227 @@ +========================== +SSH-2.0-dropbear_0.48 + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.124.6:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220-MegaBit Gear TE4121C FTP server ready +220 FTE4121_0113C (Tue Jan 14 18:20:09 JST 2003) +530 USER and PASS required +530 USER and PASS required + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.124.25:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 (vsFTPd 1.2.0) +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. +530 Please login with USER and PASS. + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.124.44:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220-MegaBit Gear TE4121C FTP server ready +220 FTE4121_0113C (Tue Jan 14 18:20:09 JST 2003) +530 USER and PASS required +530 USER and PASS required + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.124.65:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220-MegaBit Gear TE4121C FTP server ready +220 FTE4121_0113C (Tue Jan 14 18:20:09 JST 2003) +530 USER and PASS required +530 USER and PASS required + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.124.200:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220-MegaBit Gear TE4121C FTP server ready +220 FTE4121_0113C (Tue Jan 14 18:20:09 JST 2003) +530 USER and PASS required +530 USER and PASS required + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.144.207:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 Simple FTPd welcomes you. + + + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.147.250:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 FTP server ready. +500 'GET' command not understood. + +========================== +========================== + +========================== +SSH-2.0-dropbear + +========================== +========================== + +========================== +SSH-2.0-dropbear + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.175.116:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 FTP server ready. +500 'GET' command not understood. + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.175.94:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 Simple FTPd welcomes you. + + + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.2.189.106:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 Simple FTPd welcomes you. + + + +========================== +========================== + +========================== +SSH-2.0-OpenSSH_6.6p1-hpn14v4 + +========================== +========================== + +GET / HTTP/1.1 +Host: 222.3.13.167:21 +Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1 +Accept-Language: us-US,ru;q=0.9,en;q=0.8 +Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1 +Accept-Encoding: text, identity, *;q=0 +User-Agent: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11 +Connection: close + +========================== +220 ibs-soho FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready. +500 'GET / HTTP/1.1': command not understood. +500 'HOST: 222.3.13.167:21': command not understood. +500 'ACCEPT: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1': command not understood. +500 'ACCEPT-LANGUAGE: us-US,ru;q=0.9,en;q=0.8': command not understood. +500 'ACCEPT-CHARSET: iso-8859-1, utf-8, utf-16, *;q=0.1': command not understood. +500 'ACCEPT-ENCODING: text, identity, *;q=0': command not understood. +500 'USER-AGENT: Mozilla/5.0 (X11; U; Linux i686; us; rv:1.9.0.11) Gecko/2009060308 Ubuntu/9.04 (jaunty) Firefox/3.0.11': command not understood. +500 'CONNECTION: close': command not understood. +500 '': command not understood. + +========================== +========================== + diff --git a/finder.cpp b/finder.cpp new file mode 100644 index 0000000..0660acb --- /dev/null +++ b/finder.cpp @@ -0,0 +1,3045 @@ +#pragma once +#include "STh.h" +#include "mainResources.h" +#include "externFunctions.h" +#include "externData.h" + +char* __cdecl strstri(char *_Str, const char *_SubStr) +{ + if(_Str != NULL) + { + std::string _lowStr = toLowerStr(_Str); + std::string _lowSubStr = toLowerStr(_SubStr); + const char *resChar = strstr(_lowStr.c_str(), _lowSubStr.c_str()); + int offset = resChar - _lowStr.c_str(); + if(offset < 0) return NULL; + else return (char*)(_Str + offset); + }; +}; + +bool gGlobalTrackLocked = false; +char *_findFirst(char *str, char *delim) +{ + int sz = strlen(str); + int dsz = strlen(delim); + for(int i = 0; i < sz; ++i) + { + for(int j = 0; j < dsz; ++j) + { + if(str[i] == delim[j]) return (char *)(str + i); + }; + }; + + return NULL; +}; +char *_findLast(char *str, char *delim) +{ + int sz = strlen(str); + int dsz = strlen(delim); + int savedPosition = 0; + for(int i = 0; i < sz; ++i) + { + for(int j = 0; j < dsz; ++j) + { + if(str[i] == delim[j]) savedPosition = i; + }; + }; + + return (char *)(str + savedPosition); +}; +char *GetCodePage(char *str) +{ + char cdpg[32] = {0}; + if(strstri(str, "\n\r"); + if(temp4 != NULL) + { + int ln = (int)(temp4 - temp3 - strlen("charset=")); + if(ln > 16) + { + return "WTF?"; + }; + strncpy(cdpg, (char *)(temp3 + strlen("charset=")), (ln > 32) ? 32 : ln ); + if(strstri(cdpg, "%s") != NULL) return "UTF-8"; + return cdpg; + } + else + { + stt->doEmitionRedFoundData("[GetCodePage] [" + QString(temp3).mid(0, 16) + "]"); + }; + } + else if(strstri((char *)(temp2 + strlen("\n\r"); + if(temp4 != NULL) + { + int ln = (int)(temp4 - temp3 - strlen("charset = ")); + if(ln > 16) + { + return "WTF?"; + }; + strncpy(cdpg, (char *)(temp3 + strlen("charset = ")), (ln > 32) ? 32 : ln ); + if(strstri(cdpg, "%s") != NULL) return "UTF-8"; + return cdpg; + } + else + { + stt->doEmitionRedFoundData("[GetCodePage] [" + QString(temp3).mid(0, 16) + "]"); + }; + } + else if(strstri((char *)(temp2 + strlen("\n\r"); + if(temp4 != NULL) + { + int ln = (int)(temp4 - temp3 - strlen("charset =")); + if(ln > 16) + { + return "WTF?"; + }; + strncpy(cdpg, (char *)(temp3 + strlen("charset =")), (ln > 32) ? 32 : ln ); + if(strstri(cdpg, "%s") != NULL) return "UTF-8"; + return cdpg; + } + else + { + stt->doEmitionRedFoundData("[GetCodePage] [" + QString(temp3).mid(0, 16) + "]"); + }; + } + else + { + if(strstri(str, "charset=") != NULL) + { + char *temp2 = strstri(str, "charset="); + char *temp3 = _findFirst((char *)(temp2 + strlen("charset=")), " \"'>\n\r"); + if(temp3 != NULL) + { + int ln = (int)(temp3 - temp2 - strlen("charset=")); + if(ln > 16) + { + return "WTF?"; + }; + strncpy(cdpg, (char *)(temp2 + strlen("charset=")), (ln > 32) ? 32 : ln ); + if(strstri(cdpg, "%s") != NULL) return "UTF-8"; + return cdpg; + } + else + { + stt->doEmitionRedFoundData("[GetCodePage] [" + QString(temp3).mid(0, 16) + "]"); + } + } + else + { + return "NULL"; + }; + }; + } + else if(strstri(str, "charset=") != NULL) + { + char *temp2 = strstri(str, "charset="); + char *temp3 = _findFirst((char *)(temp2 + strlen("charset=")), " \"'\n\r"); + if(temp3 != NULL) + { + int ln = (int)(temp3 - temp2 - strlen("charset=")); + if(ln > 16) + { + return "WTF?"; + }; + strncpy(cdpg, (char *)(temp2 + strlen("charset=")), (ln > 32) ? 32 : ln ); + if(strstri(cdpg, "%s") != NULL) return "UTF-8"; + return cdpg; + } + else + { + stt->doEmitionRedFoundData("[GetCodePage] [" + QString(temp3).mid(0, 16) + "]"); + }; + } + else + { + return "NULL"; + }; +}; +int Lexems::globalSearchNeg(const char *buffcpy, char *ip, int port) +{ + if(strlen(buffcpy) == 0) return -1; + + char negWord[256] = {0}; + for(int i = 0; i < GlobalNegativeSize; i++) + { + if(globalScanFlag) + { + strcpy(negWord, GlobalNegatives[i]); + if(strstr(buffcpy, negWord) != NULL) + { + if(gNegDebugMode) + { + stt->doEmitionDebugFoundData("[" + QString(ip) + ":" + QString::number(port) + "" + "]\tNegative hit: \"" + QString::fromLocal8Bit(negWord).toHtmlEscaped() + "\""); + if(strlen(negWord) < 2) + { + stt->doEmitionDebugFoundData(" Len:" + QString::number(strlen(negWord))); + }; + if(strcmp(negWord, "") == 0) + { + stt->doEmitionDebugFoundData("Empty hit!"); + }; + if(strcmp(negWord, " ") == 0) + { + stt->doEmitionDebugFoundData("Space hit!"); + }; + }; + ++Filt; + return -1; + }; + }; + ZeroMemory(negWord, 256); + }; + return 0; +}; +int globalSearchPrnt(char *buffcpy) +{ + if(strstr(buffcpy, "en/_top.htm") != NULL || strstr(buffcpy, "cannon http server") != NULL + || strstr(buffcpy, "konica minolta") != NULL || strstr(buffcpy, "/eng/home_frm.htm") != NULL + || strstr(buffcpy, "networkScanner webserver") != NULL || strstr(buffcpy, "/eng/htm/top.htm") != NULL + || strstr(buffcpy, "pages/t_ixdmy.htm") != NULL + || strstr(buffcpy, "/web/guest/") != NULL || strstr(buffcpy, "printerInfo") != NULL + || strstr(buffcpy, "hp photosmart") != NULL + || strstr(buffcpy, "menu and") != NULL + || strstr(buffcpy, "hewlett packard") != NULL + || strstr(buffcpy, "laserjet") != NULL || strstr(buffcpy, "supplies summary") != NULL + || strstr(buffcpy, "seiko epson") != NULL || strstr(buffcpy, "ink_y.png") != NULL + || strstr(buffcpy, "epsonnet") != NULL || strstr(buffcpy, "printer name") != NULL + ) + { + if(gNegDebugMode) + { + stt->doEmitionDebugFoundData("Printer detected."); + }; + return -1; + }; +}; + +// 500 < 1600 +Lexems lxf; +int _mainFinderFirst(char *buffcpy, int f, int port, char *ip) +{ + if((strstr(buffcpy, "401 authorization") != NULL || strstr(buffcpy, "401 unauthorized") != NULL || (strstr(buffcpy, "www-authenticate") != NULL && strstr(buffcpy, "401 ") != NULL ) + || strstr(buffcpy, "401 unauthorized access denied") != NULL || strstr(buffcpy, "401 unauthorised") != NULL || (strstr(buffcpy, "www-authenticate") != NULL && strstr(buffcpy, " 401\r\n") != NULL) + ) + && strstr(buffcpy, "digest realm") != NULL + && strstr(buffcpy, "basic realm") == NULL + ) return 101; + if(strstr(buffcpy, "401 authorization") != NULL || strstr(buffcpy, "401 unauthorized") != NULL || (strstr(buffcpy, "www-authenticate") != NULL && strstr(buffcpy, "401 ") != NULL ) + || strstr(buffcpy, "401 unauthorized access denied") != NULL || strstr(buffcpy, "401 unauthorised") != NULL || (strstr(buffcpy, "www-authenticate") != NULL && strstr(buffcpy, " 401\r\n") != NULL) + ) return 1; + if(strstr(buffcpy, "netwave ip camera")) return 11; + if(strstr(buffcpy, "live view / - axis")) return 12; + if(strstr(buffcpy, "vilar ipcamera")) return 13; + if(strstr(buffcpy, "window.location = \"rdr.cgi\"")) return 14; + if(strstr(buffcpy, "httpfileserver")) return 15; + if(((strstr(buffcpy, "220") != NULL && port == 21) || + strstr(buffcpy, "220 diskstation ftp server ready") != NULL || + strstr(buffcpy, "220 ftp server ready") != NULL || + strstr(buffcpy, "500 'get': command not understood") != NULL + ) + && strstr(buffcpy, "firewall authentication required") == NULL) return 16; // 16 - FTP + if(strstr(buffcpy, "real-time ip camera monitoring system") != NULL || + strstr(buffcpy, "server push mode") != NULL + ) return 17; //Real-time IP Camera Monitoring System + if(strstr(buffcpy, "linksys.com") != NULL && strstr(buffcpy, "tm05") != NULL) return 18; //linksys.com cameras + if(strstr(buffcpy, "reecam ip camera") != NULL) return 19; //reecam cameras + if(strstr(buffcpy, "/view/viewer_index.shtml") != NULL) return 20; //axis cameras + if(strstr(buffcpy, "bridge eyeon") != NULL) return 21; //Bridge Eyeon + if(strstr(buffcpy, "ip camera control webpage") != NULL && strstr(buffcpy, "/main/cs_motion.asp") != NULL) return 22; //ip camera control + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/live/index2.html") != NULL) return 23; //network camera BB-SC384 + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/viewer/live/en/live.html") != NULL) return 24; //Network Camera VB-M40 + if(strstr(buffcpy, "panasonic ") != NULL && strstr(buffcpy, ":60002/snapshotjpeg") != NULL) return 25; //Panasonic wtfidonteven-camera + if(strstr(buffcpy, "sony network camera") != NULL && strstr(buffcpy, "/command/inquiry.cgi?") != NULL) return 26; //Sony Network Camera + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "src=\"webs.cgi?") != NULL) return 27; //UA Network Camera + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/viewer/live/index.html") != NULL) return 28; //Network Camera VB-M40 + if(strstr(buffcpy, "lg smart ip device") != NULL) return 29; //LG Smart IP Device Camera + if(strstr(buffcpy, "nas") != NULL && strstr(buffcpy, "/cgi-bin/data/viostor-220/viostor/viostor.cgi") != NULL) return 30; //NAX + if(strstr(buffcpy, "ip camera") != NULL && strstr(buffcpy, "check_user.cgi") != NULL) return 31; //ip cams + if(strstr(buffcpy, "ws(\"user\");") != NULL && strstr(buffcpy, "src=\"/tool.js") != NULL + && strstr(buffcpy, "") != NULL) return 32; //IPC web ip cam + if(strstr(buffcpy, "geovision") != NULL && (strstr(buffcpy, "ip camera") != NULL + || strstr(buffcpy, "ssi.cgi/login.htm") != NULL)) return 33; //GEO web ip cam + if(strstr(buffcpy, "hikvision-webs") != NULL || (strstr(buffcpy, "hikvision digital") != NULL + && strstr(buffcpy, "dvrdvs-webs") != NULL) + || (strstr(buffcpy, "lapassword") != NULL && strstr(buffcpy, "lausername") != NULL + && strstr(buffcpy, "dologin()") != NULL)) return 34; //hikvision cam + if((strstr(buffcpy, "easy cam") != NULL && strstr(buffcpy, "easy life") != NULL) + || strstr(buffcpy, "ipcamera") != NULL && strstr(buffcpy, "/tool.js") != NULL) return 35; //EasyCam + if(strstr(buffcpy, "/config/cam_portal.cgi") != NULL || strstr(buffcpy, "/config/easy_index.cgi") != NULL) return 36; //Panasonic Cam + if(strstr(buffcpy, "panasonic") != NULL && strstr(buffcpy, "/view/getuid.cgi") != NULL) return 37; //Panasonic Cam WJ-HD180 + if(strstr(buffcpy, "ipcam client") != NULL && strstr(buffcpy, "plugins.xpi") != NULL + && strstr(buffcpy, "js/upfile.js") != NULL) return 38; //Foscam + if(strstr(buffcpy, "ip surveillance") != NULL && strstr(buffcpy, "customer login") != NULL) return 39; //EagleEye + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/admin/index.shtml?") != NULL) return 40; //Network Camera VB-C300 + if(strstr(buffcpy, "sq-webcam") != NULL && strstr(buffcpy, "liveview.html") != NULL) return 41; //AVIOSYS-camera + if(strstr(buffcpy, "nw_camera") != NULL && strstr(buffcpy, "/cgi-bin/getuid") != NULL) return 42; //NW_camera + if(strstr(buffcpy, "micros") != NULL && strstr(buffcpy, "/gui/gui_outer_frame.shtml") != NULL) return 43; //NW_camera + if(strstr(buffcpy, "lapassword") != NULL + && strstr(buffcpy, "lausername") != NULL + && strstr(buffcpy, "g_ologin.dologin()") != NULL + ) return 44; //hikvision cam 2 + 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, "dvr") != NULL && strstr(buffcpy, "ieorforefox") != NULL + && strstr(buffcpy, "sofari") != NULL) return 49; //IEORFOREFOX + + 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 + || strstr(buffcpy, "network camera") != NULL + || strstr(buffcpy, "$lock extended") != NULL || strstr(buffcpy, "ip camera") != NULL + || strstr(buffcpy, "/viewer/video.jpg") != NULL || strstr(buffcpy, "smart ip device") != NULL + || strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL + || strstr(buffcpy, "ipcam") != NULL + ) return 0; + + if(lxf.globalSearchNeg(buffcpy, ip, port) == -1) return -1; + if(globalSearchPrnt(buffcpy) == -1) return -1; + if(strstr(buffcpy, "
1600 +int _mainFinderSecond(char *buffcpy, int port, char *ip) +{ + if((strstr(buffcpy, "401 authorization") != NULL || strstr(buffcpy, "401 unauthorized") != NULL + || (strstr(buffcpy, "www-authenticate") != NULL && strstr(buffcpy, "401 ") != NULL ) + || strstr(buffcpy, "401 unauthorized access denied") != NULL + || strstr(buffcpy, "401 unauthorised") != NULL || (strstr(buffcpy, "www-authenticate") != NULL + && strstr(buffcpy, " 401\r\n") != NULL) + ) + && strstr(buffcpy, "digest realm") != NULL && strstr(buffcpy, "basic realm") == NULL + ) return 101; + if(strstr(buffcpy, "401 authorization") != NULL || strstr(buffcpy, "401 unauthorized") != NULL + || (strstr(buffcpy, "www-authenticate") != NULL && strstr(buffcpy, "401 ") != NULL ) + || strstr(buffcpy, "401 unauthorized access denied") != NULL + || strstr(buffcpy, "401 unauthorised") != NULL || (strstr(buffcpy, "www-authenticate") != NULL + && strstr(buffcpy, " 401\r\n") != NULL) + ) return 1; + if(strstr(buffcpy, "netwave ip camera")) return 11; + if(strstr(buffcpy, "live view / - axis")) return 12; + if(strstr(buffcpy, "vilar ipcamera")) return 13; + if(strstr(buffcpy, "window.location = \"rdr.cgi\"")) return 14; + if(strstr(buffcpy, "httpfileserver")) return 15; + if(strstr(buffcpy, "real-time ip camera monitoring system") != NULL || + strstr(buffcpy, "server push mode") != NULL + ) return 17; //Real-time IP Camera Monitoring System + if(strstr(buffcpy, "linksys.com") != NULL && strstr(buffcpy, "tm05") != NULL) return 18; //linksys.com cameras + if(strstr(buffcpy, "reecam ip camera") != NULL) return 19; //reecam cameras + if(strstr(buffcpy, "/view/viewer_index.shtml") != NULL) return 20; //axis cameras + if(strstr(buffcpy, "bridge eyeon") != NULL) return 21; //Bridge Eyeon + if(strstr(buffcpy, "ip camera control webpage") != NULL && strstr(buffcpy, "/main/cs_motion.asp") != NULL) return 22; //ip camera control + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/live/index2.html") != NULL) return 23; //network camera BB-SC384 + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/viewer/live/en/live.html") != NULL) return 24; //Network Camera VB-M40 + if(strstr(buffcpy, "panasonic ") != NULL && strstr(buffcpy, ":60002/snapshotjpeg") != NULL) return 25; //Panasonic wtfidonteven-camera + if(strstr(buffcpy, "sony network camera") != NULL && strstr(buffcpy, "/command/inquiry.cgi?") != NULL) return 26; //Sony Network Camera + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "src=\"webs.cgi?") != NULL) return 27; //UA Network Camera + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/viewer/live/index.html") != NULL) return 28; //Network Camera VB-M40 + if(strstr(buffcpy, "lg smart ip device") != NULL) return 29; //LG Smart IP Device Camera + if(strstr(buffcpy, "/view/viewer_index.shtml") != NULL) return 20; //axis cameras + if(strstr(buffcpy, "nas") != NULL && strstr(buffcpy, "/cgi-bin/data/viostor-220/viostor/viostor.cgi") != NULL) return 30; //NAX + if(strstr(buffcpy, "ip camera") != NULL && strstr(buffcpy, "check_user.cgi") != NULL) return 31; //axis cameras + if(strstr(buffcpy, "ws(\"user\");") != NULL && strstr(buffcpy, "src=\"/tool.js") != NULL && strstr(buffcpy, "") != NULL) return 32; //web ip cam + if(strstr(buffcpy, "geovision") != NULL && (strstr(buffcpy, "ip camera") != NULL || strstr(buffcpy, "ssi.cgi/login.htm") != NULL)) return 33; //GEO web ip cam + if(strstr(buffcpy, "hikvision-webs") != NULL || (strstr(buffcpy, "hikvision digital") != NULL && strstr(buffcpy, "dvrdvs-webs") != NULL) + || (strstr(buffcpy, "lapassword") != NULL && strstr(buffcpy, "lausername") != NULL && strstr(buffcpy, "dologin()") != NULL)) return 34; //hikvision cam + if((strstr(buffcpy, "easy cam") != NULL && strstr(buffcpy, "easy life") != NULL) + || strstr(buffcpy, "ipcamera") != NULL && strstr(buffcpy, "/tool.js") != NULL) return 35; //EasyCam + if(strstr(buffcpy, "/config/cam_portal.cgi") != NULL || strstr(buffcpy, "/config/easy_index.cgi") != NULL) return 36; //Panasonic Cam + if(strstr(buffcpy, "panasonic") != NULL && strstr(buffcpy, "/view/getuid.cgi") != NULL) return 37; //Panasonic Cam WJ-HD180 + if(strstr(buffcpy, "ipcam client") != NULL && strstr(buffcpy, "plugins.xpi") != NULL && strstr(buffcpy, "js/upfile.js") != NULL) return 38; //Foscam + if(strstr(buffcpy, "ip surveillance") != NULL && strstr(buffcpy, "customer login") != NULL) return 39; //EagleEye + if(strstr(buffcpy, "network camera") != NULL && strstr(buffcpy, "/admin/index.shtml?") != NULL) return 40; //Network Camera VB-C300 + if(strstr(buffcpy, "sq-webcam") != NULL && strstr(buffcpy, "liveview.html") != NULL) return 41; //AVIOSYS-camera + if(strstr(buffcpy, "nw_camera") != NULL && strstr(buffcpy, "/cgi-bin/getuid") != NULL) return 42; //NW_camera + if(strstr(buffcpy, "micros") != NULL && strstr(buffcpy, "/gui/gui_outer_frame.shtml") != NULL) return 43; //NW_camera + if(strstr(buffcpy, "lapassword") != NULL + && strstr(buffcpy, "lausername") != NULL + && strstr(buffcpy, "g_ologin.dologin()") != NULL + ) return 44; //hikvision cam 2 + 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, "dvr") != NULL && strstr(buffcpy, "ieorforefox") != NULL + && strstr(buffcpy, "sofari") != NULL) return 49; //IEORFOREFOX + + if(((strstr(buffcpy, "220") != NULL) && (port == 21)) || + (strstr(buffcpy, "220 diskStation ftp server ready") != NULL) || + (strstr(buffcpy, "220 ftp server ready") != NULL) + || strstr(buffcpy, "500 'get': command not understood") != NULL + ) return 16; // 16 - FTP + + 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 + || strstr(buffcpy, "network camera") != NULL + || strstr(buffcpy, "$lock extended") != NULL || strstr(buffcpy, "ip camera") != NULL + || strstr(buffcpy, "/viewer/video.jpg") != NULL || strstr(buffcpy, "smart ip device") != NULL + || strstr(buffcpy, "sanpshot_icon") != NULL || strstr(buffcpy, "snapshot_icon") != NULL + || strstr(buffcpy, "ipcam") != NULL + ) return 0; + + if(lxf.globalSearchNeg(buffcpy, ip, port) == -1) return -1; + if(globalSearchPrnt(buffcpy) == -1) return -1; + if(strstr(buffcpy, "