openvasreporting icon indicating copy to clipboard operation
openvasreporting copied to clipboard

python issue

Open erkyzc opened this issue 4 years ago • 11 comments

Hi , I tried to work this tool on Ubuntu , kali and centos7. This code is not working on every OS. Are you sure is it working ?

erkyzc avatar Feb 22 '21 11:02 erkyzc

The project needs an update to work with the latest version of OpenVAS/GVM/"whatever it's called now".

Without any further detail on how the project isn't working for you, it's impossible to provide any support.

Note that I'm unable to put a lot of time into this project at this moment.

TheGroundZero avatar Feb 22 '21 14:02 TheGroundZero

Hi @TheGroundZero I'm having also problems with this, but apparently it's not "only" the xml format, as I have some reports that actually works ok. for example some small networks i have the xml and can run it through openvasreporting without any issue. However some other reports I can't, and they were both created on same GVM version.

I have no ideia what's going on, but i'm getting this error: Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/openvasreporting/openvasreporting/__main__.py", line 17, in <module> main() File "/opt/openvasreporting/openvasreporting/openvasreporting.py", line 33, in main convert(config) File "/opt/openvasreporting/openvasreporting/openvasreporting.py", line 87, in convert openvas_info = openvas_parser(config.input_files, config.min_level) File "/opt/openvasreporting/openvasreporting/libs/parser.py", line 187, in openvas_parser host = Host(vuln_host, host_name=vuln_host_name) File "/opt/openvasreporting/openvasreporting/libs/parsed_data.py", line 126, in __init__ raise TypeError("Expected basestring, got '{}' instead".format(type(host_name))) TypeError: Expected basestring, got '<class 'NoneType'>' instead I have no coding experience, but can help you in what you need and run tests etc. Please let me know if you have some free time and can/want to have a look into this.

Thanks

DBorGe avatar Mar 31 '21 16:03 DBorGe

Hi,

on a macOS 11.6, pyhton3 via homebrew using this script via git, I get the following error message:

Traceback (most recent call last):

File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 188, in _run_module_as_main

mod_name, mod_spec, code = _get_module_details(mod_name, _Error)

File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 111, in _get_module_details

import(pkg_name)

File "/[PATH]/git/openvasreporting/openvasreporting/openvasreporting.py", line 9, in from .libs.config import Config

ImportError: attempted relative import with no known parent package

Is this the same reason or should I open a new issue? May I sponsor the fixing/reworking of this script?

Thanks for your effort!

viegelinsch avatar Oct 08 '21 08:10 viegelinsch

Hi viegelinsch

I would love to help you fix this. The code needs a few updates to work with the latest version of OpenVAS anyway. However, I haven't used OpenVAS for quite a while myself.

What's the current version of OpenVAS/Greenbone that can be used freely? If I find the time, I might pick it up again.

TheGroundZero avatar Oct 11 '21 13:10 TheGroundZero

Hi @TheGroundZero according to https://greenbone.github.io/docs/faq.html#which-release-contains-which-component-gos-version-vs-gse-version that is not so simple answer as they have split the product in several parts.

viegelinsch avatar Oct 15 '21 11:10 viegelinsch

Hi @TheGroundZero

I've also got an error. Running on Parrot OS 5.0 it gives me the following output:

Traceback (most recent call last):
  File "/home/XXX/.local/bin/openvasreporting", line 8, in <module>
    sys.exit(main())
  File "/home/XXX/.local/lib/python3.9/site-packages/openvasreporting/openvasreporting.py", line 70, in main
    config = Config(args.input_files, 
  File "/home/XXX/.local/lib/python3.9/site-packages/openvasreporting/libs/config.py", line 86, in __init__
    raise ValueError("Invalid value for level parameter, \
ValueError: Invalid value for level parameter,                 must be one of: c[ritical], h[igh], m[edium], l[low], n[one]

is there a way to help you with this Project?

MrCybertux avatar Nov 30 '21 15:11 MrCybertux

Hi @TheGroundZero

I've also got an error. Running on Parrot OS 5.0 it gives me the following output:

Traceback (most recent call last):
  File "/home/XXX/.local/bin/openvasreporting", line 8, in <module>
    sys.exit(main())
  File "/home/XXX/.local/lib/python3.9/site-packages/openvasreporting/openvasreporting.py", line 70, in main
    config = Config(args.input_files, 
  File "/home/XXX/.local/lib/python3.9/site-packages/openvasreporting/libs/config.py", line 86, in __init__
    raise ValueError("Invalid value for level parameter, \
ValueError: Invalid value for level parameter,                 must be one of: c[ritical], h[igh], m[edium], l[low], n[one]

is there a way to help you with this Project?

Fixed your post, using the proper code tags.

Please see https://github.com/TheGroundZero/openvasreporting/issues/31 and do not hijack an issue unrelated to yours

TheGroundZero avatar Nov 30 '21 15:11 TheGroundZero

Hi @TheGroundZero I've also got an error. Running on Parrot OS 5.0 it gives me the following output:

Traceback (most recent call last):
  File "/home/XXX/.local/bin/openvasreporting", line 8, in <module>
    sys.exit(main())
  File "/home/XXX/.local/lib/python3.9/site-packages/openvasreporting/openvasreporting.py", line 70, in main
    config = Config(args.input_files, 
  File "/home/XXX/.local/lib/python3.9/site-packages/openvasreporting/libs/config.py", line 86, in __init__
    raise ValueError("Invalid value for level parameter, \
ValueError: Invalid value for level parameter,                 must be one of: c[ritical], h[igh], m[edium], l[low], n[one]

is there a way to help you with this Project?

Fixed your post, using the proper code tags.

Please see #31 and do not hijack an issue unrelated to yours

Sorry can't code did not know if it was related to Some Changed Value in the XML. Wasn't intentionali Hijacked, sorry for that again and thanks for the Fix!

MrCybertux avatar Dec 02 '21 09:12 MrCybertux

Please try v1.5.post3 (https://github.com/TheGroundZero/openvasreporting/releases/tag/v1.5.post3). Pip release is building as we speak

TheGroundZero avatar Dec 02 '21 09:12 TheGroundZero