cr0hn / golismero-legacy

THIS IS A LEGACY VERSION PRESERVED FOR BACKUP, DO NOT USE
http://golismero-project.com
15 stars 4 forks source link

OpenVAS plugin: breaks after the task is finished #135

Closed MarioVilas closed 11 years ago

MarioVilas commented 11 years ago

Apparently the task has to be removed before the target.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 808, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 1080, in run
    self.function(*self.args, **self.kwargs)
  File "C:\Users\Mario\Desktop\golismero\golismero\api\parallel.py", line 180, in inner_wrap
    function(*args, **kwargs)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 501, in _callback
    self.delete_target(self.__target_id)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 326, in delete_target
    self.__manager.delete_target(target_id)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 771, in delete_target
    self.make_xml_request(request, xml_result=True)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 667, in make_xml_request
    return self._xml_command(xmldata)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 1130, in _xml_command
    self._check_response(response)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 1088, in _check_response
    response.get('status_text')))
ClientError: [400] delete_target_response: Target is in use
MarioVilas commented 11 years ago

It's still happening when trying to get the results :( the plugin doesn't work without fixing this!

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 808, in __bootstrap_inner
    self.run()
  File "C:\Python27\lib\threading.py", line 1080, in run
    self.function(*self.args, **self.kwargs)
  File "C:\Users\Mario\Desktop\golismero\golismero\api\parallel.py", line 180, in inner_wrap
    function(*args, **kwargs)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 512, in _callback
    t = self.get_progress(self.__task_id)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 367, in get_progress
    return self.__manager.get_tasks_progress(scan_id)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 891, in get_tasks_progress
    for x in self.get_tasks().findall("task"):
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 843, in get_tasks
    return self.make_xml_request("<get_tasks/>", xml_result=True)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 671, in make_xml_request
    return self._xml_command(xmldata)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 1133, in _xml_command
    response = self._send(request)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 1063, in _send
    root = parser.close()
ParseError: no element found: line 1, column 0

[!] Plugin 'OpenVAS' error: no element found: line 1, column 0
Traceback (most recent call last):
  File "C:\Users\Mario\Desktop\golismero\golismero\managers\processmanager.py", line 216, in _bootstrap
    result = getattr(instance, func)(*args, **kwargs)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas.py", line 127, in recv_info
    m_openvas_results = m_scanner.get_results(m_scan_id)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 346, in get_results
    m_response = self.__manager.make_xml_request('<get_results task_id="%s"/>' %
 scan_id, xml_result=True)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 671, in make_xml_request
    return self._xml_command(xmldata)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 1133, in _xml_command
    response = self._send(request)
  File "C:\Users\Mario\Desktop\golismero\plugins\testing\scan\openvas_lib\__init__.py", line 1063, in _send
    root = parser.close()
ParseError: no element found: line 1, column 0