diff --git a/libs/sslstrip/ClientRequest.py b/libs/sslstrip/ClientRequest.py index 58891eb..c16db60 100644 --- a/libs/sslstrip/ClientRequest.py +++ b/libs/sslstrip/ClientRequest.py @@ -181,10 +181,10 @@ class ClientRequest(Request): address = self.dnsCache.getCachedAddress(host) if address != None: - logging.debug("Host cached.") + logging.debug("[ClientRequest] Host cached: %s %s" % (host, str(address))) return defer.succeed(address) else: - logging.debug("Host not cached.") + logging.debug("[ClientRequest] Host not cached.") return reactor.resolve(host) def process(self): diff --git a/plugins/Spoof.py b/plugins/Spoof.py index c7d9ef6..bb8d434 100644 --- a/plugins/Spoof.py +++ b/plugins/Spoof.py @@ -9,6 +9,7 @@ import random logging.getLogger("scapy.runtime").setLevel(logging.ERROR) #Gets rid of IPV6 Error when importing scapy from scapy.all import * from netfilterqueue import NetfilterQueue +from libs.sslstrip.DnsCache import DnsCache from plugins.plugin import Plugin from time import sleep from base64 import b64decode @@ -93,6 +94,11 @@ class Spoof(Plugin): if not options.manualiptables: self.sysconfig.iptables_dns(0) + dnscache = DnsCache.getInstance() + + for domain, ip in self.dnscfg.items(): + dnscache.cacheResolution(domain, ip) + self.dns = _DNS(0) self.dns.dnscfg = self.dnscfg self.dns.dns = True