diff --git a/core/netcreds.py b/core/netcreds.py index f4b4723..9e8be01 100644 --- a/core/netcreds.py +++ b/core/netcreds.py @@ -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)) diff --git a/core/servers/DNS.py b/core/servers/DNS.py index 35e592c..0599e7b 100755 --- a/core/servers/DNS.py +++ b/core/servers/DNS.py @@ -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 diff --git a/plugins/inject.py b/plugins/inject.py index 27bda03..bc7ca9c 100644 --- a/plugins/inject.py +++ b/plugins/inject.py @@ -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)