mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-07 21:42:17 -07:00
Fixed bug in upsidedownternet plugin
This commit is contained in:
parent
3f6bbb8bfb
commit
fc74e480eb
2 changed files with 7 additions and 5 deletions
|
@ -155,8 +155,6 @@ class ServerConnection(HTTPClient):
|
|||
self.client.setResponseCode(int(code), message)
|
||||
|
||||
def handleHeader(self, key, value):
|
||||
self.plugins.hook()
|
||||
|
||||
if (key.lower() == 'location'):
|
||||
value = self.replaceSecureLinks(value)
|
||||
|
||||
|
@ -180,6 +178,8 @@ class ServerConnection(HTTPClient):
|
|||
else:
|
||||
self.client.setHeader(key, value)
|
||||
|
||||
self.plugins.hook()
|
||||
|
||||
logging.debug("Receiving header: (%s => %s)" % (key, value))
|
||||
|
||||
def handleEndHeaders(self):
|
||||
|
|
|
@ -17,6 +17,8 @@ class Upsidedownternet(Plugin):
|
|||
globals()['ImageFile'] = ImageFile
|
||||
self.options = options
|
||||
|
||||
print "[*] Upsidedownternet plugin online"
|
||||
|
||||
def handleHeader(self, request, key, value):
|
||||
'''Kill the image skipping that's in place for speed reasons'''
|
||||
if request.isImageRequest:
|
||||
|
@ -43,7 +45,7 @@ class Upsidedownternet(Plugin):
|
|||
im.save(output, format=image_type)
|
||||
data = output.getvalue()
|
||||
output.close()
|
||||
logging.info("Flipped image")
|
||||
logging.info("%s Flipped image" % request.client.getClientIP())
|
||||
except Exception as e:
|
||||
print "Error: %s" % e
|
||||
logging.info("%s Error: %s" % (request.client.getClientIP(), e))
|
||||
return {'request': request, 'data': data}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue