mirror of
https://github.com/ChronosX88/nesca.git
synced 2024-11-23 18:52:19 +00:00
BEX fix. (202.172.29.90:80)
This commit is contained in:
parent
de69368ebd
commit
1f26df0779
16
finder.cpp
16
finder.cpp
@ -2568,22 +2568,28 @@ int Lexems::_header(char *ip, int port, char str[], Lexems *l, PathStr *ps, std:
|
|||||||
if(temp2 != NULL)
|
if(temp2 != NULL)
|
||||||
{
|
{
|
||||||
res = temp2 - temp - 10;
|
res = temp2 - temp - 10;
|
||||||
char newLoc[128] = {0};
|
char newLoc[256] = {0};
|
||||||
char *tmp = strstr(temp, "/");
|
char *tmp = strstr(temp, "/");
|
||||||
|
|
||||||
if(tmp != NULL)
|
if(tmp != NULL)
|
||||||
{
|
{
|
||||||
strncat(newLoc, temp + 10, res < 128 ? res : 127);
|
strncat(newLoc, temp + 10, res < 256 ? res : 255);
|
||||||
if(strstri(newLoc, "http://") == NULL && strstri(newLoc, "https://") == NULL)
|
if(strstri(newLoc, "http://") == NULL && strstri(newLoc, "https://") == NULL)
|
||||||
{
|
{
|
||||||
if(newLoc[0] != '.')
|
if(newLoc[0] != '.')
|
||||||
{
|
{
|
||||||
if(newLoc[0] != '/')
|
if(newLoc[0] != '/')
|
||||||
{
|
{
|
||||||
char tnewLoc[128] = {0};
|
int sz = strlen(newLoc);
|
||||||
|
if (sz > 255)
|
||||||
|
{
|
||||||
|
stt->doEmitionRedFoundData("Huge redirect string detected! " + QString(ip) + ":" + QString::number(port));
|
||||||
|
sz = 255;
|
||||||
|
};
|
||||||
|
char tnewLoc[256] = {0};
|
||||||
strcpy(tnewLoc, "/");
|
strcpy(tnewLoc, "/");
|
||||||
strcat(tnewLoc, newLoc);
|
strncat(tnewLoc, newLoc, sz);
|
||||||
strcpy(newLoc, tnewLoc);
|
strncpy(newLoc, tnewLoc, sz);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user