Update vulnwhisp.py

Code triggers a crash:
ERROR:root:main:local variable 'vw' referenced before assignment
ERROR: local variable 'vw' referenced before assignment

Proposed fix deals with the issue.
After fix:
INFO:vulnWhispererOpenVAS:process_openvas_scans:Processing complete
This commit is contained in:
spasaintk
2020-02-28 00:33:38 +01:00
committed by GitHub
parent 4974be02b4
commit a3e85b7207

View File

@ -1318,9 +1318,9 @@ class vulnWhisperer(object):
self.exit_code += vw.process_web_assets()
elif self.profile == 'openvas':
vw_openvas = vulnWhispererOpenVAS(config=self.config)
vw = vulnWhispererOpenVAS(config=self.config)
if vw:
self.exit_code += vw_openvas.process_openvas_scans()
self.exit_code += vw.process_openvas_scans()
elif self.profile == 'tenable':
vw = vulnWhispererNessus(config=self.config,