greenbone / gvm-tools

Remote control your Greenbone Community Edition or Greenbone Enterprise Appliance
https://greenbone.github.io/gvm-tools/
GNU General Public License v3.0
167 stars 90 forks source link

alive_tests in XML is ignored in sample/send-targets.gmp.py #296

Closed omok314159 closed 4 years ago

omok314159 commented 4 years ago

Expected behavior

When I export target from GVM, XML file containing Consider Alive, etc. And I wish to use this XML format to create new target. For example, when I use NAMEHOSTSConsider Alive, I wish to see "Consider Alive" in the new target.

Current behavior

When we put it through send-targets.gmp.py, alive_test will be "Scan Config Default". I found now alive_test needs to be an AliveTest enum, but this sample script is not supporting it. Then I wish to make PR to fix it.

Steps to reproduce

  1. Export any target which alive_tests is not "Scan Config Default".
  2. Modify exported XML name and put it with send-targets.gmp.py
  3. You see new target's alive_tests is "Scan Config Default".

GVM versions

gsa: (gsad --version) Greenbone Security Assistant 20.08.0

gvm: (gvmd --version) Greenbone Vulnerability Manager 20.08.0 Manager DB revision 233 Copyright (C) 2010-2020 Greenbone Networks GmbH License: AGPL-3.0-or-later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

openvas-scanner: (openvassd --version)

gvm-libs:

gvm-tools: (gvm-cli --version) gvm-cli 2.1.0 (API version 1.6.0)

Environment

Operating system: Debian buster Installation method / source: (packages, source installation) Docker (securecompliance GVM)

Logfiles

y0urself commented 4 years ago

Feel free to submit an PR for this.