From 47c311553eb38327622d5e6b25e20a662c31c30d Mon Sep 17 00:00:00 2001 From: Lionel PRAT Date: Thu, 16 Nov 2017 16:31:18 +0100 Subject: [PATCH] Add ignore case on check body for html inject --- servers/HTTP_Proxy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/HTTP_Proxy.py b/servers/HTTP_Proxy.py index 71e6e75..0a71f2f 100644 --- a/servers/HTTP_Proxy.py +++ b/servers/HTTP_Proxy.py @@ -52,9 +52,9 @@ def InjectData(data, client, req_uri): return RespondWithFile(client, settings.Config.Html_Filename) Len = ''.join(re.findall(r'(?<=Content-Length: )[^\r\n]*', Headers)) - HasBody = re.findall(r'(]*>)', Content) + HasBody = re.findall(r'(]*>)', Content, re.IGNORECASE) - if HasBody and len(settings.Config.HtmlToInject) > 2: + if HasBody and len(settings.Config.HtmlToInject) > 2 and not req_uri.endswith('.js'): if settings.Config.Verbose: print text("[PROXY] Injecting into HTTP Response: %s" % color(settings.Config.HtmlToInject, 3, 1))