re:gvm-tools v21.6.1 / GOS 21.04.8
We are trying to update the targets associated with a particular task using the gvm-tool script update-task-target.gmp.py as shown at bottom of post. We are able to successfully create new targets and task using other gvm-tool scripts (so our ssh connection and user privs are ok).
‘hosts_file.csv’ has a single line with ip address.
$task_id is from existing task we are trying to update
Script output is “Response Error 400. Error in host specification”
Output is being generated in the “copy_send_target” function,
at the line: new_target_id = gmp.create_target(**keywords).xpath(’@id’)
We’ve run into this type error before, but it was associated with CIDR notation. Here the csv file has a single ip. The associated script, update-task-target.gmp.py is fresh from Github, no changes. Where would be good choice to look for additional clues for troubleshooting?
/usr/local/bin/gvm-script --gmp-username $gmp_username --gmp-password $gmp_password ssh --hostname $gmp-server ./gvm-tools/scripts/update-task-target.gmp.py ./hosts_file.csv $task_id