SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
succeed plz (#1379)
TheTechromancerc352be0f85c3
diff --git a/sfscan.py b/sfscan.pyindex f5d2ff22..4420ad01 100644--- a/sfscan.py+++ b/sfscan.py@@ -483,9 +483,10 @@ class SpiderFootScanner():raise AssertionError(f"{mod.__name__} requested stop")# send it the new event if applicable- watchedEvents = mod.watchedEvents()- if sfEvent.eventType in watchedEvents or "*" in watchedEvents:- mod.incomingEventQueue.put(deepcopy(sfEvent))+ if not mod.errorState:+ watchedEvents = mod.watchedEvents()+ if sfEvent.eventType in watchedEvents or "*" in watchedEvents:+ mod.incomingEventQueue.put(deepcopy(sfEvent))except (KeyboardInterrupt, AssertionError) as e:self.__sf.status(f"Scan [{self.__scanId}] aborted, {e}.")diff --git a/spiderfoot/plugin.py b/spiderfoot/plugin.pyindex 673d7525..391f496e 100644--- a/spiderfoot/plugin.py+++ b/spiderfoot/plugin.py@@ -1,3 +1,4 @@+from contextlib import suppressimport loggingimport queueimport threading@@ -282,6 +283,13 @@ class SpiderFootPlugin():listener.handleEvent(sfEvent)except Exception as e:self.sf.error(f"Module ({listener.__module__}) encountered an error: {e}")+ # set errorState+ self.errorState = True+ # clear incoming queue+ if self.incomingEventQueue:+ with suppress(queue.Empty):+ while 1:+ self.incomingEventQueue.get_nowait()def checkForStop(self):"""For modules to use to check for when they should give back control.