diff --git a/MainStarter.h b/MainStarter.h
index 655a8d5..fabba06 100644
--- a/MainStarter.h
+++ b/MainStarter.h
@@ -51,7 +51,7 @@ public:
curl_global_init(CURL_GLOBAL_ALL);
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
- CreateDirectoryA(RESULT_DIR_NAME, NULL);
+ bool res = CreateDirectoryA(RESULT_DIR_NAME, NULL);
#else
struct stat str = { 0 };
if (stat(RESULT_DIR_NAME, &str) == -1) {
diff --git a/finder.cpp b/finder.cpp
index 50c8f39..4bf03eb 100644
--- a/finder.cpp
+++ b/finder.cpp
@@ -516,7 +516,7 @@ void fputsf(char *text, int flag, char *msg)
else if(flag == 7)
{
if(ftsLL) ftsLL = __checkFileExistence(flag);
- file = fopen(RESULT_DIR_NAME"/low_loads.html", "a");
+ file = fopen(RESULT_DIR_NAME"/low_loads.html", "a");
}
else if(flag == 10)
{
@@ -535,10 +535,7 @@ void fputsf(char *text, int flag, char *msg)
if(ftsBA) ftsBA = __checkFileExistence(flag);
file = fopen(RESULT_DIR_NAME"/Basicauth.html", "a");
}
- else
- {
- stt->doEmitionRedFoundData("[WUT!?] Unknown flag [FLAG: " + QString::number(flag) + "]");
- };
+ else stt->doEmitionRedFoundData("[WUT!?] Unknown flag [FLAG: " + QString::number(flag) + "]");
if(file != NULL)
{
@@ -558,8 +555,10 @@ void fputsf(char *text, int flag, char *msg)
strcat(delimiter, "
");
fputs (delimiter, file);
};
+
++saved;
char *string = new char[strlen(text) + 512];
+
if(flag != -22)
{
strcpy (string, "");
@@ -680,7 +679,7 @@ void fputsf(char *text, int flag, char *msg)
}
else
{
- stt->doEmitionRedFoundData("Cannot open file [FLAG: " + QString::number(flag) + "]");
+ stt->doEmitionRedFoundData("Cannot open file [FLAG: " + QString::number(flag) + "] " + QString::number(GetLastError()));
};
}
@@ -2158,7 +2157,7 @@ void _getLinkFromJSLocation(char *dataBuff, char *str, char *tag, char *ip, int
};
}
-int Lexems::_header(char *ip, int port, const char str[], Lexems *l, PathStr *ps, std::vector
*redirStrLst, int size)
+int Lexems::_header(char *ip, int port, const char *str, Lexems *l, PathStr *ps, std::vector *redirStrLst, int size)
{
std::string redirectStr = "";
@@ -2187,12 +2186,8 @@ int Lexems::_header(char *ip, int port, const char str[], Lexems *l, PathStr *ps
&& strstr(str, "company") == NULL
)
{
- if (strstr(str, "CgiStart?page=Single") != NULL) {
- strcpy(ps->headr, "[IP Camera (Unibrowser)]");
- }
- else {
- strcpy(ps->headr, "[IP Camera]");
- }
+ if (strstr(str, "CgiStart?page=Single") != NULL) strcpy(ps->headr, "[IP Camera (Unibrowser)]");
+ else strcpy(ps->headr, "[IP Camera]");
l->flag = 0;
ps->flag = 0;
};
@@ -2251,6 +2246,7 @@ int Lexems::_header(char *ip, int port, const char str[], Lexems *l, PathStr *ps
strncpy(temp3, (char*)(temp + 4), sz < 128 ? sz : 127);
};
};
+
if(strstri(temp3, "http://") == NULL && strstri(temp3, "https://") == NULL)
{
if(temp3[0] != '.')
@@ -2369,8 +2365,7 @@ int Lexems::_header(char *ip, int port, const char str[], Lexems *l, PathStr *ps
if(ps->flag >= 17 || ps->flag == 11 || ps->flag == 12
|| ps->flag == 13 || ps->flag == 14 || ps->flag == 1
|| ps->flag == 10
- )
- return -2;
+ ) return -2;
else if(ps->flag == -1) return -1;
};
};
@@ -2379,25 +2374,13 @@ int Lexems::_header(char *ip, int port, const char str[], Lexems *l, PathStr *ps
if(strstri(str, "ActiveXObject") != NULL
|| strstri(str, ".cab") != NULL
|| strstri(str, "clsid:") != NULL
- )
- {
- strcat(ps->headr, "[ActiveX]");
- };
+ ) strcat(ps->headr, "[ActiveX]");
if(strstri(str, "