SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
Threat intel modules should not just provide the entity in the result data.
smicallef69814b806a8b
diff --git a/modules/sfp_alienvault.py b/modules/sfp_alienvault.pyindex 715d1129..fbb058b5 100644--- a/modules/sfp_alienvault.py+++ b/modules/sfp_alienvault.py@@ -46,12 +46,12 @@ class sfp_alienvault(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()# Clear / reset any other class member variables here# or you risk them persisting between threads.@@ -102,7 +102,6 @@ class sfp_alienvault(SpiderFootPlugin):try:info = json.loads(res['content'])except Exception as e:- print(str(res['content']))self.sf.error("Error processing JSON response from AlienVault OTX.", False)return None@@ -201,7 +200,7 @@ class sfp_alienvault(SpiderFootPlugin):rec_history = rec['reputation'].get("activities", list())if rec['reputation']['threat_score'] < self.opts['threat_score_min']:continue- descr = "Threat Score: " + str(rec['reputation']['threat_score']) + ":"+ descr = "AlienVault Threat Score: " + str(rec['reputation']['threat_score']) + ":"for result in rec_history:descr += "\n - " + result.get("name", "")diff --git a/modules/sfp_botscout.py b/modules/sfp_botscout.pyindex d1a8e139..5979df28 100644--- a/modules/sfp_botscout.py+++ b/modules/sfp_botscout.py@@ -25,12 +25,12 @@ class sfp_botscout(SpiderFootPlugin):optdescs = {"api_key": "Botscout.com API key. Without this you will be limited to 50 look-ups per day."}- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()for opt in userOpts.keys():self.opts[opt] = userOpts[opt]@@ -87,7 +87,7 @@ class sfp_botscout(SpiderFootPlugin):else:t = "MALICIOUS_EMAILADDR"- evt = SpiderFootEvent(t, eventData, self.__name__, event)+ evt = SpiderFootEvent(t, "Botscout [" + eventData + "]", self.__name__, event)self.notifyListeners(evt)return Nonediff --git a/modules/sfp_circllu.py b/modules/sfp_circllu.pyindex 3c06da9c..675fc796 100644--- a/modules/sfp_circllu.py+++ b/modules/sfp_circllu.py@@ -44,13 +44,13 @@ class sfp_circllu(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsecohostcount = 0def setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()self.cohostcount = 0# Clear / reset any other class member variables here@@ -218,7 +218,7 @@ class sfp_circllu(SpiderFootPlugin):for co in cohosts:if eventName == "IP_ADDRESS" and (self.opts['verify'] and not self.validateIP(co, eventData)):- self.sf.debug("Host " + co + " no longer resolves to " + eventData)+ self.sf.debug("Host no longer resolves to our IP.")continueif not self.opts['cohostsamedomain']:diff --git a/modules/sfp_fraudguard.py b/modules/sfp_fraudguard.pyindex 8c5c562f..c6d0ea6e 100644--- a/modules/sfp_fraudguard.py+++ b/modules/sfp_fraudguard.py@@ -42,12 +42,12 @@ class sfp_fraudguard(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()# Clear / reset any other class member variables here# or you risk them persisting between threads.@@ -87,7 +87,7 @@ class sfp_fraudguard(SpiderFootPlugin):self.sf.error("Error processing JSON response from Fraudguard.io.", False)return None- #print(str(info))+ #print str(info)return info@@ -155,7 +155,7 @@ class sfp_fraudguard(SpiderFootPlugin):self.notifyListeners(e)if rec.get('threat') != "unknown":- dat = rec['threat'] + " (risk level: " + rec['risk_level'] + ")"+ dat = rec['threat'] + " (risk level: " + rec['risk_level'] + ") [" + eventData + "]"e = SpiderFootEvent("MALICIOUS_" + rtype, dat, self.__name__, event)self.notifyListeners(e)diff --git a/modules/sfp_greynoise.py b/modules/sfp_greynoise.pyindex d93a4303..128af318 100644--- a/modules/sfp_greynoise.py+++ b/modules/sfp_greynoise.py@@ -46,12 +46,12 @@ class sfp_greynoise(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()# Clear / reset any other class member variables here# or you risk them persisting between threads.@@ -87,7 +87,6 @@ class sfp_greynoise(SpiderFootPlugin):try:info = json.loads(res['content'])except Exception as e:- print(str(res['content']))self.sf.error("Error processing JSON response from Greynoise.", False)return None@@ -190,7 +189,7 @@ class sfp_greynoise(SpiderFootPlugin):self.notifyListeners(e)if rec.get("classification"):- descr = addr + "\n - Classification: " + rec.get("classification")+ descr = "Greynoise [" + addr + "]\n - Classification: " + rec.get("classification")if rec.get("tags"):descr += ", Tags: " + ", ".join(rec.get("tags"))else:diff --git a/modules/sfp_malwarepatrol.py b/modules/sfp_malwarepatrol.pyindex 03d7196e..46ab965c 100644--- a/modules/sfp_malwarepatrol.py+++ b/modules/sfp_malwarepatrol.py@@ -25,12 +25,12 @@ class sfp_malwarepatrol(SpiderFootPlugin):optdescs = {"api_key": "Malwarepatrol.com 'receipt' ID, provided once signing up for their open-source feed. Without this you cannot obtain their feed."}- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()for opt in userOpts.keys():self.opts[opt] = userOpts[opt]@@ -112,7 +112,7 @@ class sfp_malwarepatrol(SpiderFootPlugin):evtType = 'MALICIOUS_COHOST'if self.queryAddr(eventData):- evt = SpiderFootEvent(evtType, eventData, self.__name__, event)+ evt = SpiderFootEvent(evtType, "MalwarePatrol [" + eventData + "]", self.__name__, event)self.notifyListeners(evt)# End of sfp_malwarepatrol classdiff --git a/modules/sfp_neutrinoapi.py b/modules/sfp_neutrinoapi.pyindex 2ab4c8e5..42c95e03 100644--- a/modules/sfp_neutrinoapi.py+++ b/modules/sfp_neutrinoapi.py@@ -175,7 +175,7 @@ class sfp_neutrinoapi(SpiderFootPlugin):self.sf.debug("No IP blocklist results found for " + eventData)else:if data.get('is-listed'):- evt = SpiderFootEvent("MALICIOUS_IPADDR", eventData, self.__name__, event)+ evt = SpiderFootEvent("MALICIOUS_IPADDR", "NeutrinoAPI [" + eventData + "]", self.__name__, event)self.notifyListeners(evt)evt = SpiderFootEvent("RAW_RIR_DATA", str(data), self.__name__, event)self.notifyListeners(evt)@@ -186,7 +186,7 @@ class sfp_neutrinoapi(SpiderFootPlugin):self.sf.debug("No host reputation results found for " + eventData)else:if data.get('is-listed'):- evt = SpiderFootEvent("MALICIOUS_IPADDR", eventData, self.__name__, event)+ evt = SpiderFootEvent("MALICIOUS_IPADDR", "NeutrinoAPI [" + eventData + "]", self.__name__, event)self.notifyListeners(evt)evt = SpiderFootEvent("RAW_RIR_DATA", str(data), self.__name__, event)self.notifyListeners(evt)diff --git a/modules/sfp_riskiq.py b/modules/sfp_riskiq.pyindex c3f6b9f9..987a756c 100644--- a/modules/sfp_riskiq.py+++ b/modules/sfp_riskiq.py@@ -43,13 +43,13 @@ class sfp_riskiq(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsecohostcount = 0def setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()self.cohostcount = 0# Clear / reset any other class member variables herediff --git a/modules/sfp_virustotal.py b/modules/sfp_virustotal.pyindex d2c1cdfc..58121488 100644--- a/modules/sfp_virustotal.py+++ b/modules/sfp_virustotal.py@@ -50,12 +50,12 @@ class sfp_virustotal(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsedef setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()# Clear / reset any other class member variables here# or you risk them persisting between threads.diff --git a/modules/sfp_xforce.py b/modules/sfp_xforce.pyindex cdc4dffd..70362fea 100644--- a/modules/sfp_xforce.py+++ b/modules/sfp_xforce.py@@ -48,13 +48,13 @@ class sfp_xforce(SpiderFootPlugin):# Be sure to completely clear any class variables in setup()# or you run the risk of data persisting between scan runs.- results = dict()+ results = NoneerrorState = Falsecohostcount = 0def setup(self, sfc, userOpts=dict()):self.sf = sfc- self.results = dict()+ self.results = self.tempStorage()self.cohostcount = 0# Clear / reset any other class member variables herediff --git a/sflib.py b/sflib.pyindex 633787ae..2fdfec40 100644--- a/sflib.py+++ b/sflib.py@@ -1433,6 +1433,10 @@ class SpiderFootPlugin(object):def setOutputFilter(self, types):self.__outputFilter__ = types+ # For SpiderFoot HX compatability of modules+ def tempStorage(self):+ return dict()+# Call the handleEvent() method of every other plug-in listening for# events from this plug-in. Remember that those plug-ins will be called# within the same execution context of this thread, not on their own.