Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Threaded Modules Logging Fix (#1236)

TheTechromancere6d89c14aa0d
diff --git a/spiderfoot/plugin.py b/spiderfoot/plugin.py
index aac338ed..69de0019 100644
--- a/spiderfoot/plugin.py
+++ b/spiderfoot/plugin.py
@@ -2,6 +2,7 @@ import logging
import threading
import queue
from time import sleep
+from copy import copy
class SpiderFootPlugin():
@@ -342,6 +343,8 @@ class SpiderFootPlugin():
# create new database handle since we're in our own thread
from spiderfoot import SpiderFootDb
self.setDbh(SpiderFootDb(self.opts))
+ self.sf = copy(self.sf)
+ self.sf._dbh = self.__sfdb__
if not (self.incomingEventQueue and self.outgoingEventQueue):
self.log.error("Please set up queues before starting module as thread")