mirror of
https://github.com/lgandx/Responder.git
synced 2025-07-31 03:50:24 -07:00
Fixing a bug in HTTP proxy, was calling recv() too many times
This commit is contained in:
parent
6c7a5dd0dd
commit
ddaa9f8767
1 changed files with 5 additions and 5 deletions
10
Responder.py
10
Responder.py
|
@ -1827,7 +1827,7 @@ def InjectPage(data, client):
|
|||
buffer1.calculate()
|
||||
return str(buffer1)
|
||||
else:
|
||||
return False
|
||||
return data
|
||||
|
||||
def InjectData(data):
|
||||
Payload = HTMLToServe
|
||||
|
@ -1957,12 +1957,12 @@ class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
|
|||
if i is soc:
|
||||
out = self.connection
|
||||
try:
|
||||
data = i.recv(8192)
|
||||
if len(HTMLToServe)>5:
|
||||
data = InjectData(i.recv(8192))
|
||||
if InjectPage(i.recv(8192),self.client_address[0]):
|
||||
data = InjectPage(i.recv(8192),self.client_address[0])
|
||||
data = InjectData(data)
|
||||
else:
|
||||
data = i.recv(8192)
|
||||
data = InjectPage(data,self.client_address[0])
|
||||
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue