How can I use omp from a file



I want to add a config by omp command ,but the order is very long ,how can I use omp from a file ?

How can I use openvas-cli from a file

As already mentioned omp is deprecated and should not work with current GVM/OpenVAS versions

Simple solution write a XML file with your GMP request and use gvm-cli to send this request you gvmd. Enhanced version use the python API of python-gvm in a gmp script.


very thanks for your response ,I know omp is deprecated,but I want to try about this:
for example ,if I want to use open-cli with a xml,I should run:
omp -X ‘xml’
but I want to create a config which has many nvts,so the xml is too long,I can’t run it with ‘omp -X’,
so I want to know: is there exist a command can let me run this xml file in omp ?


Short answer: if you did try omp-cli and it didn’t work for you, no.

Longer answer: you should not use omp-cli because it won’t work with supported OpenVAS versions. Use gvm-cli from gvm-tools instead.


thinks for your response ,I have learn gvm-cli and now I use commands like this:
gvm-cli tls --gmp-username admin --gmp-password admin --xml “<get_tasks/>” --hostname
It’s very good ! but if the xml is very long ,and I need put xml in a file ,how can I use gvm-cli run a xml file?


Just use

gvm-cli tls --gmp-username admin --gmp-password admin < file.xml


It works , Thank you very much for your patience.


You are welcome