mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-22 06:13:39 -07:00
Fix generation of HTTP response in HTTP proxy
This commit is contained in:
parent
5ab431a4fe
commit
b2830e0a4f
1 changed files with 2 additions and 2 deletions
|
@ -65,12 +65,12 @@ def InjectData(data, client, req_uri):
|
||||||
print text("[PROXY] Injecting into HTTP Response: %s" % color(settings.Config.HtmlToInject, 3, 1))
|
print text("[PROXY] Injecting into HTTP Response: %s" % color(settings.Config.HtmlToInject, 3, 1))
|
||||||
|
|
||||||
Content = Content.replace(HasBody[0], '%s\n%s' % (HasBody[0], settings.Config.HtmlToInject))
|
Content = Content.replace(HasBody[0], '%s\n%s' % (HasBody[0], settings.Config.HtmlToInject))
|
||||||
Headers = Headers.replace("Content-Length: "+Len, "Content-Length: "+ str(len(Content)))
|
|
||||||
|
|
||||||
if "content-encoding: gzip" in Headers.lower():
|
if "content-encoding: gzip" in Headers.lower():
|
||||||
Content = zlib.compress(Content)
|
Content = zlib.compress(Content)
|
||||||
|
|
||||||
data = Headers +'\r\n'+ Content
|
Headers = Headers.replace("Content-Length: "+Len, "Content-Length: "+ str(len(Content)))
|
||||||
|
data = Headers +'\r\n\r\n'+ Content
|
||||||
|
|
||||||
else:
|
else:
|
||||||
if settings.Config.Verbose:
|
if settings.Config.Verbose:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue