Merge pull request #259 from HAMIDx9/master

Multiple fixes, netcreds, hsts dns, inject plugin
This commit is contained in:
byt3bl33d3r 2016-01-30 11:51:09 -07:00
commit 06ef1da084
3 changed files with 7 additions and 3 deletions

View file

@ -916,7 +916,7 @@ def get_login_pass(body):
def printer(src_ip_port, dst_ip_port, msg):
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
log.info("{}".format(print_str))

View file

@ -366,7 +366,8 @@ class DNSHandler():
#First proxy the request with the real domain
q = DNSRecord.question(real_domain).pack()
r = self.proxyrequest(q, *nameserver_tuple)
if r is None: return None
#Parse the answer
dns_rr = DNSRecord.parse(r).rr

View file

@ -64,7 +64,10 @@ class Inject(Plugin):
try:
mime = response.headers['Content-Type']
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:
match = re.search('charset=(.*)', mime)