I observed some proxy error (occurring multiple times) when combing through the logs files,
[ERROR] [2015-12-08 23:13:15,010] [File 'web.py', line 1407, in log_exception] - Uncaught exception POST /mail/u/0/?ui=2&ik=54e58ff210&rid=mail%3Ai.2430.0.1&view=cv&th=1516b27b7f05397a&th=1516617fe80662ae&th=1516166782d8017d&th=15160e6c936f9a34&th=1513c558b10e2db5&prf=1&_reqid=183595&nsc=1&mb=0&rt=j&search=inbox (1)
HTTPServerRequest(protocol='https', host='mail.google.com', method='POST', uri='/mail/u/0/?ui=2&ik=54e58ff210&rid=mail%3Ai.2430.0.1&view=cv&th=1516b27b7f05397a&th=1516617fe80662ae&th=1516166782d8017d&th=15160e6c936f9a34&th=1513c558b10e2db5&prf=1&_reqid=183595&nsc=1&mb=0&rt=j&search=inbox', version='HTTP/1.1', remote_ip=u'1', headers={'Origin': 'https://mail.google.com', 'Content-Length': '0', 'Accept-Language': 'en-US,en;q=0.8', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36', 'Dnt': '1', 'Host': 'mail.google.com', 'Referer': 'https://mail.google.com/_/scs/mail-static/_/js/k=gmail.main.en.3TS1r_chCQs.O/m=m_i,t,it/am=PiP-WsD8v_cHcZ0hAO3SByrsvfc87iLFzx4e7r83AUTWBcD_zf4fwP_Be9MWCg/rt=h/d=1/t=zcms/rs=AHGWq9AbotIVRfAdPBOdN6YLEUu-AW9siA', 'X-Same-Domain': '1', 'Cookie': xxxx', 'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'})
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/tornado/web.py", line 1288, in _stack_context_handle_exception
raise_exc_info((type, value, traceback))
File "/usr/lib/python2.7/site-packages/tornado/stack_context.py", line 314, in wrapped
ret = fn(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/tornado/web.py", line 1484, in future_complete
f.result()
File "/usr/lib/python2.7/site-packages/tornado/concurrent.py", line 109, in result
raise_exc_info(self._exc_info)
File "/usr/lib/python2.7/site-packages/tornado/gen.py", line 631, in run
yielded = self.gen.throw(*sys.exc_info())
File "/home/viyat/workspace/owtf/framework/http/proxy/proxy.py", line 202, in get
if response.code in [408, 599]:
UnboundLocalError: local variable 'response' referenced before assignment
try:
response = yield tornado.gen.Task(async_client.fetch, request)
except Exception:
pass
# Request retries
for i in range(0, 3):
if response.code in [408, 599]:
self.request.response_buffer = ''
response = yield tornado.gen.Task(async_client.fetch, request)
else:
success_response = True
break
I observed some proxy error (occurring multiple times) when combing through the logs files,
@tunnelshade?
I think that this block of code
has a bug when Exception occurs and there is no
responseobject. See https://github.com/owtf/owtf/blob/develop/framework/http/proxy/proxy.py#L196