Agent: Don't install signal handlers in LDAPExploitServer

This avoids exceptions that are raised when the LDAPExploitServer is not
started on the main thread.
This commit is contained in:
Mike Salvatore 2022-01-11 12:53:20 -05:00
parent ab7a47384c
commit b79bf96359
1 changed files with 3 additions and 1 deletions

View File

@ -84,7 +84,9 @@ class LDAPExploitServer:
log_observer.start()
def run(self):
reactor.run()
# For an explaination of installSignalHandlers=0, see
# https://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#Igetexceptions.ValueError:signalonlyworksinmainthreadwhenItrytorunmyTwistedprogramWhatswrong
reactor.run(installSignalHandlers=0)
def stop(self):
reactor.stop()