golismero / openvas_lib

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

openvas_lib.common.ClientError: [400] create_task_response: Bogus element: preference #23

Closed anandtiwarics closed 6 years ago

anandtiwarics commented 6 years ago

Hi,

I'm trying to launch a scan and getting below error.

>>> from openvas_lib import VulnscanManager, VulnscanException
>>> scanner = VulnscanManager("192.168.0.14", "admin", "admin")
>>> scan_id, target_id = scanner.launch_scan(target='192.168.0.14', profile='Full and fast')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "openvas_lib/__init__.py", line 657, in launch_scan
    comment=comment)
  File "openvas_lib/ompv7.py", line 715, in create_task
    return self._manager.make_xml_request(request, xml_result=True).get("id")
  File "openvas_lib/common.py", line 389, in make_xml_request
    response.get('status_text')))
openvas_lib.common.ClientError: [400] create_task_response: Bogus element: preference

Thanks.

smitty0421 commented 6 years ago

I am having the same problem.

Thanks, Steve

marryfaye commented 6 years ago

I am having the same problem in kali3.0 and openvas7.0.2

anandtiwarics commented 6 years ago

Thanks, it's working now.

anandtiwarics commented 6 years ago

Hi @MarioVilas

Is it possible to update https://pypi.org/project/openvas_lib/ too?

Thanks.

MarioVilas commented 6 years ago

I don't have access to it. /cc @cr0hn

cr0hn commented 6 years ago

I just added continuous integration cycle with auto-upload to Pypi the new pull-request.

It was uploaded to Pypi with version: 1.1.3.

Please, test it and feedback if something was wrong.

Thx!

anandtiwarics commented 6 years ago

Hi @cr0hn,

I've verified and it has not been updated. I think you should upload with the newer version as 1.1.3 already there.

Thanks.

cr0hn commented 6 years ago

Ups, sorry. Just submitted version 1.1.4

anandtiwarics commented 6 years ago

Hi,

version 1.1.4 uploaded but something broken after installing using pip.

>>> from openvas_lib import VulnscanManager, VulnscanException
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named openvas_lib

may its not able to map with sit-packages. Could you please review from your end why its not able to import openvas_lib ?

Thanks.

anandtiwarics commented 6 years ago

@cr0hn ,

Got the issue. Package missing openvas_lib folder https://pypi.org/project/openvas_lib/1.1.4/#files

Please upload with the openvas_lib folder in the package.

cr0hn commented 6 years ago

I just fixed the issue. I was an error in the setup. In my machine now I can import the library. Please, check and feedback me

anandtiwarics commented 6 years ago

Perfect. Work like a charm. Thanks @cr0hn