SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfp_tool_dnstwist: Check for wildcard DNS before testing.
smicallef0ca99aaced4a
diff --git a/modules/sfp_tool_dnstwist.py b/modules/sfp_tool_dnstwist.pyindex 178342b0..ec938c33 100644--- a/modules/sfp_tool_dnstwist.py+++ b/modules/sfp_tool_dnstwist.py@@ -41,13 +41,15 @@ class sfp_tool_dnstwist(SpiderFootPlugin):# Default optionsopts = {'pythonpath': "python",- 'dnstwistpath': ""+ 'dnstwistpath': "",+ 'skipwildcards': True}# Option descriptionsoptdescs = {'pythonpath': "Path to Python interpreter to use for DNSTwist. If just 'python' then it must be in your PATH.",- 'dnstwistpath': "Path to the where the dnstwist.py file lives. Optional."+ 'dnstwistpath': "Path to the where the dnstwist.py file lives. Optional.",+ 'skipwildcards': "Skip TLDs and sub-TLDs that have wildcard DNS."}results = None@@ -89,6 +91,15 @@ class sfp_tool_dnstwist(SpiderFootPlugin):self.results[eventData] = True+ dom = self.sf.domainKeyword(eventData, self.opts['_internettlds'])+ if not dom:+ return++ tld = eventData.split(dom + ".")[-1]+ # Check if the TLD has wildcards before testing+ if self.opts['skipwildcards'] and self.sf.checkDnsWildcard(tld):+ return+dnstwistLocation = which('dnstwist')if dnstwistLocation and Path(dnstwistLocation).is_file():cmd = ['dnstwist']