SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
add priority for modules to allow sorting
Amr Awad5fe98d8c58d2
diff --git a/modules/sfp__stor_db.py b/modules/sfp__stor_db.pyindex 9945d6dd..95102c9e 100644--- a/modules/sfp__stor_db.py+++ b/modules/sfp__stor_db.py@@ -16,6 +16,7 @@ from sflib import SpiderFoot, SpiderFootPluginclass sfp__stor_db(SpiderFootPlugin):"""Storage::::Stores scan results into the back-end SpiderFoot database. You will need this."""+ _priority = 0# Default optionsopts = {diff --git a/sflib.py b/sflib.pyindex abee586b..041dd0af 100644--- a/sflib.py+++ b/sflib.py@@ -1608,6 +1608,8 @@ class SpiderFootPlugin(object):__dataSource__ = None# If set, events not matching this list are dropped__outputFilter__ = None+ # Priority, smaller numbers should run first+ _priority = 1# Not really needed in most cases.def __init__(self):@@ -1715,7 +1717,8 @@ class SpiderFootPlugin(object):breakprevEvent = prevEvent.sourceEvent- # self._listenerModules.sort()+ self._listenerModules.sort(key=lambda m: m._priority)+for listener in self._listenerModules:#print(listener.__module__ + ": " + listener.watchedEvents().__str__())if eventName not in listener.watchedEvents() and '*' not in listener.watchedEvents():