SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
make multiple finish() passes to ensure new events are processed (#1573)
TheTechromancer46d6b6a96da0
diff --git a/sfscan.py b/sfscan.pyindex f2d2438b..c2bc2358 100644--- a/sfscan.py+++ b/sfscan.py@@ -433,7 +433,7 @@ class SpiderFootScanner():# start one thread for each modulefor mod in self.__moduleInstances.values():mod.start()- modulesFinished = False+ final_passes = 3# watch for newly-generated eventswhile True:@@ -451,7 +451,7 @@ class SpiderFootScanner():sleep(.1)# but are we really?if self.threadsFinished(log_status):- if modulesFinished:+ if final_passes < 1:break# Trigger module.finished()for mod in self.__moduleInstances.values():@@ -462,7 +462,7 @@ class SpiderFootScanner():log_status = counter % 100 == 0counter += 1sleep(.01)- modulesFinished = True+ final_passes -= 1else:# save on CPUdiff --git a/spiderfoot/plugin.py b/spiderfoot/plugin.pyindex a53c5124..01cb4602 100644--- a/spiderfoot/plugin.py+++ b/spiderfoot/plugin.py@@ -492,6 +492,7 @@ class SpiderFootPlugin():def finish(self):"""Perform final/cleanup functions before module exits+ Note that this function may be called multiple timesOverridden by the implementer"""