Fixed a bug where Twisted would resolve correct IP when DNS Tampering

This commit is contained in:
byt3bl33d3r 2015-03-19 23:27:28 +01:00
parent 873112c8e7
commit 5e56049e44
2 changed files with 8 additions and 2 deletions

View file

@ -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