Fixed bug in upsidedownternet plugin

This commit is contained in:
byt3bl33d3r 2015-02-23 04:08:53 +01:00
parent 3f6bbb8bfb
commit fc74e480eb
2 changed files with 7 additions and 5 deletions

View file

@ -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):

View file

@ -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:
@ -29,7 +31,7 @@ class Upsidedownternet(Plugin):
isImage = getattr(request, 'isImage')
except AttributeError:
isImage = False
if isImage:
try:
image_type = request.imageType
@ -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}