moxie0/sslstrip

Errors

Closed this issue · 3 comments

sslstrip 0.9 by Moxie Marlinspike running...
Unhandled Error
Traceback (most recent call last):
File "/usr/local/bin/sslstrip", line 105, in main
reactor.run()
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/base.py", line 1169, in run
self.mainLoop()
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/base.py", line 1181, in mainLoop
self.doIteration(t)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/pollreactor.py", line 167, in doPoll
log.callWithLogger(selectable, _drdw, selectable, fd, event)
--- ---
File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 84, in callWithLogger
return callWithContext({"system": lp}, func, _args, *_kw)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/log.py", line 69, in callWithContext
return context.call({ILogContext: newCtx}, func, _args, *_kw)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, _args, *_kw)
File "/usr/local/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(args,*kw)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 594, in _doReadOrWrite
self._disconnectSelectable(selectable, why, inRead)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/posixbase.py", line 263, in _disconnectSelectable
selectable.connectionLost(f)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 433, in connectionLost
Connection.connectionLost(self, reason)
File "/usr/local/lib/python2.7/dist-packages/twisted/internet/tcp.py", line 277, in connectionLost
protocol.connectionLost(reason)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 455, in connectionLost
self.handleResponseEnd()
File "/usr/local/lib/python2.7/dist-packages/sslstrip/ServerConnection.py", line 119, in handleResponseEnd
HTTPClient.handleResponseEnd(self)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 466, in handleResponseEnd
self.handleResponse(b)
File "/usr/local/lib/python2.7/dist-packages/sslstrip/ServerConnection.py", line 133, in handleResponse
self.client.write(data)
File "/usr/local/lib/python2.7/dist-packages/twisted/web/http.py", line 898, in write
raise RuntimeError('Request.write called on a request after '
exceptions.RuntimeError: Request.write called on a request after Request.finish was called.

Bug? Or I am doing something wrong?

Very minor Bug. SSLStrip is trying to politely handle a connection that has been forcibly closed on the client end. It can be safely ignored.

You can deliberately cause the error by hitting escape while loading a resource.

I get the same error in a test environment login to Facebook. The reverse proxy works as expected and my guess is that the error just popped when some information is captured.

This an #7 were the same.