This commit is contained in:
n1nj4sec 2022-11-10 10:34:57 +01:00
parent cfc32b6790
commit e3f6279744
1 changed files with 0 additions and 12 deletions

View File

@ -140,7 +140,6 @@ class PayloadsHandler(TornadoStaticFileHandler):
def initialize(self, **kwargs):
self.mappings = kwargs.pop('mappings', {})
self.templates = kwargs.pop('templates', {})
self.mapped = False
setup_local_ips(self, kwargs)
@ -151,25 +150,14 @@ class PayloadsHandler(TornadoStaticFileHandler):
mapped_path = self.mappings[filepath]
if path.isfile(mapped_path):
self.mapped = True
return path.abspath(mapped_path)
elif path.isfile(path.join(root, self.mappings)):
self.mapped = True
return path.abspath(
path.join(root, self.mappings))
self.mapped = False
return super(PayloadsHandler, self).get_absolute_path(root, filepath)
def validate_absolute_path(self, root, absolute_path):
if self.mapped:
return absolute_path
return super(PayloadsHandler, self).get_absolute_path(
root, absolute_path
)
class IndexHandler(tornado.web.RequestHandler):
def initialize(self, **kwargs):