openvas_to_report icon indicating copy to clipboard operation
openvas_to_report copied to clipboard

errors

Open jinx2016 opened this issue 8 years ago • 7 comments

Thanks for the code here. But i am not able to generate the excel file, any ideas on what to fix here.

openvas_to_report -i openvastest.xml -o generated_excel.xlsx

Traceback (most recent call last): File "/usr/local/bin/openvas_to_report", line 11, in load_entry_point('openvas-to-report==1.0.0', 'console_scripts', 'openvas_to_report')() File "/usr/local/lib/python3.6/site-packages/openvas_to_report/openvas_to_document.py", line 65, in main convert(config) File "/usr/local/lib/python3.6/site-packages/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.6/site-packages/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'

jinx2016 avatar Sep 21 '17 00:09 jinx2016

I believe you might not have the latest code as "risk_factor" was changed to "threat" in the NVT data with the release of OpenVAS 8 and this project was updated accordingly in e8d9f91.

dhoetger avatar Sep 21 '17 00:09 dhoetger

Thanks for the quick reponse yes i ran the scan w OpenVAS 7.02. Any way i can get this to work ?

jinx2016 avatar Sep 21 '17 17:09 jinx2016

Oof, I expected your openvas_to_report to be out of date, not OpenVAS.

As this project wasn't branched at the time breaking changes were made to exclusively support OpenVAS 8, I think you have two options:

  • pull the last commit before OpenVAS 8 was released (two and a half years ago) and breaking changes were introduced (git merge 207a974)
  • migrate to a newer version of OpenVAS (advisable anyway as you are two major versions out and substantial UI and some reporting improvements have been introduced). Honestly, this project doesn't fully support OpenVAS 9 (my sole commit here fixed a couple low hanging fruit issues but issues still remain) so you are liable to encounter issues with 9 as you are with 7. Version 8 provides the greatest compatibility/usability with this project.

dhoetger avatar Sep 21 '17 19:09 dhoetger

Hello,

same issue here with exactely the same error message. I'm running OpenVAS 9 and installed openvas-to-report via this guide: http://openvas-to-report.readthedocs.io/en/latest/quickstart.html#installation but with pip3 install ...

Any chance to get that working?

okoester avatar Dec 19 '17 09:12 okoester

Now pulled the actual version here from github.

Almost same error now: Traceback (most recent call last): File "openvas_to_document.py", line 82, in <module> main() File "openvas_to_document.py", line 65, in main convert(config) File "/home/olaf/devel/openvas_to_report/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 "/home/olaf/devel/openvas_to_report/openvas_to_report/libs/parsers/openvas_parser.py", line 185, in openvas_parser vuln_description = vuln.find(".//description").text AttributeError: 'NoneType' object has no attribute 'text'

But now seems that in OpenVAS 9 "./description" is deprecated...

okoester avatar Dec 19 '17 10:12 okoester

@okoester this project only supports OpenVAS 8. If you're running versions 7 or 9, you're going to encounter fatal errors. Issue #7 is already open to track the specific incompatible attribute causing your error but as alluded to in that issue, at least one more incompatible attribute exists and no work has been done to resolve it. I'm not the maintainer but I believe resolving those issues is likely non-trivial and would break compatibility with version 8. You're welcome to take a stab at it though!

dhoetger avatar Dec 26 '17 04:12 dhoetger

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