mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-08-19 04:59:33 -07:00
Merge pull request #259 from HAMIDx9/master
Multiple fixes, netcreds, hsts dns, inject plugin
This commit is contained in:
commit
06ef1da084
3 changed files with 7 additions and 3 deletions
|
@ -916,7 +916,7 @@ def get_login_pass(body):
|
||||||
|
|
||||||
def printer(src_ip_port, dst_ip_port, msg):
|
def printer(src_ip_port, dst_ip_port, msg):
|
||||||
if dst_ip_port != None:
|
if dst_ip_port != None:
|
||||||
print_str = '[{} > {}] {}'.format((src_ip_port, dst_ip_port, msg))
|
print_str = '[{} > {}] {}'.format(src_ip_port, dst_ip_port, msg)
|
||||||
# All credentials will have dst_ip_port, URLs will not
|
# All credentials will have dst_ip_port, URLs will not
|
||||||
|
|
||||||
log.info("{}".format(print_str))
|
log.info("{}".format(print_str))
|
||||||
|
|
|
@ -366,7 +366,8 @@ class DNSHandler():
|
||||||
#First proxy the request with the real domain
|
#First proxy the request with the real domain
|
||||||
q = DNSRecord.question(real_domain).pack()
|
q = DNSRecord.question(real_domain).pack()
|
||||||
r = self.proxyrequest(q, *nameserver_tuple)
|
r = self.proxyrequest(q, *nameserver_tuple)
|
||||||
|
if r is None: return None
|
||||||
|
|
||||||
#Parse the answer
|
#Parse the answer
|
||||||
dns_rr = DNSRecord.parse(r).rr
|
dns_rr = DNSRecord.parse(r).rr
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,10 @@ class Inject(Plugin):
|
||||||
try:
|
try:
|
||||||
mime = response.headers['Content-Type']
|
mime = response.headers['Content-Type']
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return
|
return {'response': response, 'request':request, 'data': data}
|
||||||
|
|
||||||
|
if "text/html" not in mime:
|
||||||
|
return {'response': response, 'request':request, 'data': data}
|
||||||
|
|
||||||
if "charset" in mime:
|
if "charset" in mime:
|
||||||
match = re.search('charset=(.*)', mime)
|
match = re.search('charset=(.*)', mime)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue