Skip to content

Commit

Permalink
Start server before initialize the vts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnicola committed Feb 18, 2020
1 parent 3c7bfb8 commit ae3cd4d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ospd_openvas/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

from ospd.errors import OspdError
from ospd.ospd import OSPDaemon
from ospd.server import BaseServer
from ospd.main import main as daemon_main
from ospd.cvss import CVSS
from ospd.vtfilter import VtsFilter
Expand Down Expand Up @@ -306,7 +307,10 @@ def __init__(self, *, niceness=None, **kwargs):

self.temp_vts_dict = None

def init(self):
def init(self, server: BaseServer) -> None:

server.start(self.handle_client_stream)

self.scanner_info['version'] = Openvas.get_version()

self.set_params_from_openvas_settings()
Expand All @@ -323,6 +327,8 @@ def init(self):

self.load_vts()

self.initialized = True

def set_params_from_openvas_settings(self):
""" Set OSPD_PARAMS with the params taken from the openvas executable.
"""
Expand Down

0 comments on commit ae3cd4d

Please sign in to comment.