Gvm-cli usage question (No such file or directory)

Hi everyone,

I’m willing to migrate my openvas 8 installation to v9, but I have some issues using the gvm-cli tool (which to my understanding is replacing omp, now deprecated.)

With openvas 8, I was doing reports related requests with simple commands like:

omp -h 127.0.0.1 -u admin -w pass -iX ‘<get_tasks task_id="’$my_task_id"/>

With gvm-cli, I would assume the below command would provide the same result:

gvm-cli socket --gmp-username admin --gmp-password pass --xml ‘<get_tasks task_id="$my_task_id"/>’

However the result of this is: [Errno 2] No such file or directory

This sounds like a very stupid thing, but as I’m completely new to gvm-cli and XML I would appreciate some guidances here.

Thanks for your help !

So indeed the question was stupid as actually gvm-cli couln’t find the socket… So I added --sockpath /var/run/openvasmd.sock and that did the trick.

Now I have another question; with openvas 8 the upon command porvided XML outputs with newlines. With gvm-cli, there is no more newlines in the output which makes parsing much harder.

Is there a way do make output more human readable ?

Thanks

@tatooin Please create separate threads for each question. This helps to avoid mixing various different topics within one single thread which might cause confusion or even misunderstandings.

This error actually says, there is no unix domain socket listening at the default path. I suppose your openvasmd isn’t listening on a unix socket at all. Please try gvm-cli tls instead.