Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

errors #11

Open
jinx2016 opened this issue Sep 21, 2017 · 7 comments
Open

errors #11

jinx2016 opened this issue Sep 21, 2017 · 7 comments

Comments

@jinx2016
Copy link

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'

@dhoetger
Copy link
Contributor

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.

@jinx2016
Copy link
Author

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

@dhoetger
Copy link
Contributor

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.

@okoester
Copy link

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
Copy link

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...

@dhoetger
Copy link
Contributor

@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!

@cr0hn
Copy link
Owner

cr0hn commented Dec 27, 2017

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

Help to improve / fix error are welcome :)

Sorry about that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants