openvas_to_report icon indicating copy to clipboard operation
openvas_to_report copied to clipboard

Attribute error (OpenVAS 8)

Open emory opened this issue 10 years ago • 3 comments

✰  openvas_to_report -i report-2757deb0-9c42-445e-b342-e70f633911b8.xml report-728a4e05-6501-4b7b-8be7-a0bd9189cec1.xml report-8399a2e0-5a0e-4593-ba1f-452d60773a0a.xml report-ee19bebe-c363-4f7f-9fed-e58349cca2f2.xml -o report.xlsx
Traceback (most recent call last):
  File "/usr/local/bin/openvas_to_report", line 9, in <module>
    load_entry_point('openvas-to-report==1.0.0', 'console_scripts', 'openvas_to_report')()
  File "/usr/local/lib/python3.5/site-packages/openvas_to_report-1.0.0-py3.5.egg/openvas_to_report/openvas_to_document.py", line 65, in main
    convert(config)
  File "/usr/local/lib/python3.5/site-packages/openvas_to_report-1.0.0-py3.5.egg/openvas_to_report/api.py", line 248, in convert
    openvas_info = openvas_parser(config.input_files, excluded_hosts=excluded_hosts, scope_hosts=scope_hosts)
  File "/usr/local/lib/python3.5/site-packages/openvas_to_report-1.0.0-py3.5.egg/openvas_to_report/libs/parsers/openvas_parser.py", line 129, in openvas_parser
    vuln_level = nvt_tmp.find(".//risk_factor").text
AttributeError: 'NoneType' object has no attribute 'text'

emory avatar Sep 24 '15 19:09 emory

same problem (ubuntu: trusty):

# /usr/local/bin/openvas_to_report -i /tmp/result.xml -o /tmp/result.xlsx
Traceback (most recent call last):
  File "/usr/local/bin/openvas_to_report", line 9, in <module>
    load_entry_point('openvas-to-report==1.0.0', 'console_scripts', 'openvas_to_report')()
  File "/usr/local/lib/python3.4/dist-packages/openvas_to_report-1.0.0-py3.4.egg/openvas_to_report/openvas_to_document.py", line 65, in main
    convert(config)
  File "/usr/local/lib/python3.4/dist-packages/openvas_to_report-1.0.0-py3.4.egg/openvas_to_report/api.py", line 248, in convert
    openvas_info = openvas_parser(config.input_files, excluded_hosts=excluded_hosts, scope_hosts=scope_hosts)
  File "/usr/local/lib/python3.4/dist-packages/openvas_to_report-1.0.0-py3.4.egg/openvas_to_report/libs/parsers/openvas_parser.py", line 129, in openvas_parser
    vuln_level = nvt_tmp.find(".//risk_factor").text
AttributeError: 'NoneType' object has no attribute 'text'

multigcs avatar Nov 30 '15 11:11 multigcs

This is due to an XML format change with OpenVAS 8. See my pull request for the quick and dirty fix for this issue.

NoifP avatar Jan 22 '16 04:01 NoifP

Hi all. Currently I haven't time to maintain this project.

Help to improve / fix error are welcome :)

Sorry about that

cr0hn avatar Dec 27 '17 09:12 cr0hn