I am trying to experiment a bit with the tools provided in your GitHub https://github.com/greenbone/gvm-tools/tree/main/scripts. I wanted to try out the create-targets-from-host-list.gmp.py but I get an error that says gvm.errors.GvmResponseError: Response Error 400. One of PORT_LIST and PORT_RANGE are required, even though the documentation says, that there is just an IP of the GVM host name and a text-file containing hostnames needed. Can someone please tell me where I’m wrong or if I’m wrong?
Thanks this was helpful. FYI for anyone else using this. You have to get the port_list_id UID from the web console (we got ours from doing an export) and then put in the code block where Don specified.
Kinda stinks that you have to modify the script from git, but hey - it works!
I am playing with gvm-cli and am wrestling with how to describe a scan. Since the change from version 9 to version 21 (my example is using version 22.4) , there was a change in that defining a scan necessitated defining/declaring what ports to declare.