golismero / openvas_lib

OpenVAS connector for versions 6, 7, 8 and 9
BSD 3-Clause "New" or "Revised" License
80 stars 97 forks source link

Latest commit breaks get_results #16

Open Tendrid opened 7 years ago

Tendrid commented 7 years ago

https://github.com/golismero/openvas_lib/commit/e53f81bffb2a5ab072bf6b3be2d850b71f5d2af4#diff-6fe303a22197e4810951633f15c7bfc9

get_results expects self.__task_report_id to be set, but that doesnt happen unless you launch a scan (launch_scan)

LavernaSec commented 5 years ago

I know this is a bit late, but I hit the same issue and submitted a pull request.

thinksabin commented 5 years ago

did anyone resolved this issue? @LavernaSec i tried your forked version and did easy_install. I'm facing issue as below:

Traceback (most recent call last): File "/Users/sabinranjit/PycharmProjects/openvas-stuffs/scanopenvas.py", line 45, in generate_report(scan_id) File "/Users/sabinranjit/PycharmProjects/openvas-stuffs/scanopenvas.py", line 37, in generate_report openvas_results = scanner.get_results(scan_id) File "build/bdist.macosx-10.6-intel/egg/openvas_lib/init.py", line 961, in get_results File "build/bdist.macosx-10.6-intel/egg/openvas_lib/init.py", line 90, in report_parser_from_text TypeError: Expected str, got '<type 'unicode'>' instead

my test code is a follow: def generate_report(scan_id): try: print(scan_id) scanner = VulnscanManager(HOST, USER, PASSWORD) openvas_results = scanner.get_results(scan_id) print(openvas_results) except VulnscanException as e: print("Error:") print(e)

can you help me with any possible solution?