Events, CurrentScan, pluginsState, ENABLE_PLUGINS work

This commit is contained in:
Jokob-sk
2023-08-12 12:17:53 +10:00
parent 5397edc14d
commit c2e4d39117
3 changed files with 37 additions and 21 deletions

View File

@@ -20,7 +20,10 @@ class plugins_state:
self.processScan = processScan
#-------------------------------------------------------------------------------
def run_plugin_scripts(db, runType, pluginsState = plugins_state()):
def run_plugin_scripts(db, runType, pluginsState = None):
if pluginsState == None:
pluginsState = plugins_state()
# Header
updateState(db,"Run: Plugins")
@@ -604,13 +607,15 @@ def process_plugin_events(db, plugin, pluginsState):
sql.executemany(q, sqlParams)
db.commitDB()
# perform scan if mapped to CurrentScan table
if dbTable == 'CurrentScan':
pluginsState.processScan = True
db.commitDB()
# perform scan if mapped to CurrentScan table
if dbTable == 'CurrentScan':
pluginsState.processScan = True
return pluginsState