SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Bug fix for handling urlquoted content generating false positive hostnames.
smicallefa4e168712c18
diff --git a/modules/sfp_dns.py b/modules/sfp_dns.pyindex 02fd555d..daae55b0 100644--- a/modules/sfp_dns.py+++ b/modules/sfp_dns.py@@ -17,6 +17,7 @@ import sysimport reimport randomimport dns+import urllib2from netaddr import IPAddress, IPNetworkfrom sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEvent@@ -148,7 +149,6 @@ class sfp_dns(SpiderFootPlugin):return Noneself.events[eventData] = True-# Identify potential sub-domains/hostnamesif eventName in [ "SEARCH_ENGINE_WEB_CONTENT", "TARGET_WEB_CONTENT","LINKED_URL_INTERNAL", "RAW_RIR_DATA", "RAW_DNS_RECORDS", "DNS_TEXT" ]:@@ -157,11 +157,11 @@ class sfp_dns(SpiderFootPlugin):for name in self.getTarget().getNames():if self.checkForStop():return None- pat = re.compile("([a-zA-Z0-9\-\.]+\." + name + ")", re.IGNORECASE)- matches = re.findall(pat, eventData)+ pat = re.compile("(%..)?([a-zA-Z0-9\-\.]+\." + name + ")", re.IGNORECASE)+ matches = re.findall(pat, urllib2.unquote(eventData))if matches != None:for match in matches:- self.processHost(match, parentEvent, affiliate=False)+ self.processHost(match[1], parentEvent, affiliate=False)# Nothing left to do with internal links and raw datareturn None