SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Bug fixes, tweaks.
Steve Micallefec2e324fac78
diff --git a/modules/sfp_email.py b/modules/sfp_email.pyindex 814719dc..9c53dea9 100644--- a/modules/sfp_email.py+++ b/modules/sfp_email.py@@ -21,9 +21,6 @@ from sflib import SpiderFoot, SpiderFootPlugin, SpiderFootEventclass sfp_email(SpiderFootPlugin):"""E-Mail:Footprint,Investigate,Passive:Content Analysis::Identify e-mail addresses in any obtained data."""---# Default optionsopts = {# options specific to this module@@ -95,10 +92,9 @@ class sfp_email(SpiderFootPlugin):mailDom = match.lower().split('@')[1].strip('.')if not self.getTarget().matches(mailDom) and not self.getTarget().matches(match):self.sf.debug("External domain, so possible affiliate e-mail")- # Raw RIR data returning external e-mails generates way- # too much noise.- if eventName == "RAW_RIR_DATA":- return None+ evttype = "AFFILIATE_EMAILADDR"++ if eventName.startswith("AFFILIATE_"):evttype = "AFFILIATE_EMAILADDR"self.sf.info("Found e-mail address: " + match)diff --git a/modules/sfp_emailformat.py b/modules/sfp_emailformat.pyindex cd12c04f..d4b8efab 100644--- a/modules/sfp_emailformat.py+++ b/modules/sfp_emailformat.py@@ -19,7 +19,7 @@ class sfp_emailformat(SpiderFootPlugin):"""EmailFormat:Footprint,Investigate,Passive:Search Engines::Look up e-mail addresses on email-format.com."""- results = list()+ results = dict()# Default optionsopts = {@@ -32,7 +32,7 @@ class sfp_emailformat(SpiderFootPlugin):def setup(self, sfc, userOpts=dict()):self.sf = sfcself.__dataSource__ = "Email-Format.com"- self.results = list()+ self.results = dict()for opt in userOpts.keys():self.opts[opt] = userOpts[opt]@@ -56,7 +56,7 @@ class sfp_emailformat(SpiderFootPlugin):if eventData in self.results:return Noneelse:- self.results.append(eventData)+ self.results[eventData] = Trueself.sf.debug("Received event, " + eventName + ", from " + srcModuleName)diff --git a/modules/sfp_filemeta.py b/modules/sfp_filemeta.pyindex 34151043..223c0945 100644--- a/modules/sfp_filemeta.py+++ b/modules/sfp_filemeta.py@@ -164,7 +164,7 @@ class sfp_filemeta(SpiderFootPlugin):self.sf.error("Failed to parse PDF, " + eventData + ": " + str(e), False)return None- if val is not None:+ if val and not isinstance(val, PyPDF2.generic.NullObject):# Strip non-ASCIIval = ''.join([i if ord(i) < 128 else ' ' for i in val])evt = SpiderFootEvent("SOFTWARE_USED", val,diff --git a/modules/sfp_github.py b/modules/sfp_github.pyindex 40cf9f63..abf813b3 100644--- a/modules/sfp_github.py+++ b/modules/sfp_github.py@@ -39,7 +39,7 @@ class sfp_github(SpiderFootPlugin):# What events is this module interested in for inputdef watchedEvents(self):- return ["DOMAIN_NAME", "USERNAME", "SOCIAL_MEDIA"]+ return ["DOMAIN_NAME", "USERNAME"]# What events this module produces# This is to support the end user in selecting modules based on events@@ -83,8 +83,6 @@ class sfp_github(SpiderFootPlugin):name = self.sf.domainKeyword(eventData, self.opts['_internettlds'])if eventName == "USERNAME":name = eventData- if eventName == "SOCIAL_MEDIA":- name = eventData.split(": ")[1]self.sf.debug("Looking at " + name)failed = Falsediff --git a/modules/sfp_ripe.py b/modules/sfp_ripe.pyindex 79aee424..aae5f326 100644--- a/modules/sfp_ripe.py+++ b/modules/sfp_ripe.py@@ -28,6 +28,7 @@ class sfp_ripe(SpiderFootPlugin):memCache = dict()nbreported = dict()keywords = None+ lastContent = Nonedef setup(self, sfc, userOpts=dict()):self.sf = sfc@@ -35,6 +36,7 @@ class sfp_ripe(SpiderFootPlugin):self.memCache = dict()self.currentEventSrc = Noneself.nbreported = dict()+ self.lastContent = Nonefor opt in userOpts.keys():self.opts[opt] = userOpts[opt]@@ -60,9 +62,7 @@ class sfp_ripe(SpiderFootPlugin):useragent=self.opts['_useragent'])if res['content'] is not None:self.memCache[url] = res- evt = SpiderFootEvent("RAW_RIR_DATA", res['content'], self.__name__,- self.currentEventSrc)- self.notifyListeners(evt)+ self.lastContent = res['content']return res# Get the netblock the IP resides in@@ -297,6 +297,10 @@ class sfp_ripe(SpiderFootPlugin):evt = SpiderFootEvent("NETBLOCK_OWNER", netblock,self.__name__, event)self.notifyListeners(evt)+ evt = SpiderFootEvent("RAW_RIR_DATA", self.lastContent, self.__name__,+ event)+ self.notifyListeners(evt)+return None# NETBLOCK -> AS and other owned netblocks@@ -310,6 +314,9 @@ class sfp_ripe(SpiderFootPlugin):if self.ownsAs(asn):asevt = SpiderFootEvent("BGP_AS_OWNER", asn, self.__name__, event)self.notifyListeners(asevt)+ evt = SpiderFootEvent("RAW_RIR_DATA", self.lastContent, self.__name__,+ event)+ self.notifyListeners(evt)else:asevt = SpiderFootEvent("BGP_AS_MEMBER", asn, self.__name__, event)self.notifyListeners(asevt)@@ -337,6 +344,9 @@ class sfp_ripe(SpiderFootPlugin):self.sf.info("Owned netblock found: " + prefix + "(" + asn + ")")evt = SpiderFootEvent("NETBLOCK_OWNER", prefix, self.__name__, event)self.notifyListeners(evt)+ evt = SpiderFootEvent("RAW_RIR_DATA", self.lastContent, self.__name__,+ event)+ self.notifyListeners(evt)else:self.sf.info("Netblock found: " + prefix + "(" + asn + ")")evt = SpiderFootEvent("NETBLOCK_MEMBER", prefix, self.__name__, event)