mirror of
https://github.com/lgandx/Responder.git
synced 2025-08-13 18:17:11 -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()
|
buffer1.calculate()
|
||||||
return str(buffer1)
|
return str(buffer1)
|
||||||
else:
|
else:
|
||||||
return False
|
return data
|
||||||
|
|
||||||
def InjectData(data):
|
def InjectData(data):
|
||||||
Payload = HTMLToServe
|
Payload = HTMLToServe
|
||||||
|
@ -1957,12 +1957,12 @@ class ProxyHandler (BaseHTTPServer.BaseHTTPRequestHandler):
|
||||||
if i is soc:
|
if i is soc:
|
||||||
out = self.connection
|
out = self.connection
|
||||||
try:
|
try:
|
||||||
|
data = i.recv(8192)
|
||||||
if len(HTMLToServe)>5:
|
if len(HTMLToServe)>5:
|
||||||
data = InjectData(i.recv(8192))
|
data = InjectData(data)
|
||||||
if InjectPage(i.recv(8192),self.client_address[0]):
|
|
||||||
data = InjectPage(i.recv(8192),self.client_address[0])
|
|
||||||
else:
|
else:
|
||||||
data = i.recv(8192)
|
data = InjectPage(data,self.client_address[0])
|
||||||
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue