LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   openVAS create new tasks from omp (https://www.linuxquestions.org/questions/linux-networking-3/openvas-create-new-tasks-from-omp-4175511045/)

Nefri 07-14-2014 07:57 AM

openVAS create new tasks from omp
 
Hi all!

I am trying to create new task from omp, but the documentations of the commands are not always perfect, so I run into an issue:
I am able to create new tasks if I use the command:
Code:

# omp -u user -w openvas -C -n New_task -c 74db13d6-7489-11df-91b9-002264764cea -t 5267d906-756d-4ed0-b749-6c34371dec65
but the tasks created this way, don't have "Network Source Interface" (eth0) and "Order for target hosts" assigned so the scans instantly finish with N/A result. Is there any way to add this parameter when I am creating the new task or set them to be "eth0" and "sequental" by default? If I use the greenbone I can set it very easily, but I have to make it to be fully automated so that is not an option for me. Looks like the older versions of the openVAS didn't needed this parameter from the user to set up a new task, and I can't find any clue about it.

I am using omp 1.3, openvas 7.

Thanks you very much for any advice!

Solved:
I figured out there is an option to use xml commands. I thought my omp version is 1.3, but that was the openVas-cli version, and the omp was 5.0 so I checked the older documentation, where the needed xml command didn't exist yet. So finaly the command:
Code:

# omp -u user -w openvas -X '<create_task><name>ScanWebserver</name><preferences><preference><scanner_name>source_iface</scanner_name><value>eth0</value></preference></preferences><config id="74db13d6-7489-11df-91b9-002264764cea"/><target id="5267d906-756d-4ed0-b749-6c34371dec65"/></create_task>'
worked. Sry for takeing your time.

unSpawn 07-15-2014 06:23 PM

Quote:

Originally Posted by Nefri (Post 5203612)
Sry for takeing your time.

No problem. Thanks for posting your solution.

doctorstrange 07-26-2017 08:00 AM

I'm trying to create tasks from omp as well and I'm curious where you got these hexadecimal numbers:

-c 74db13d6-7489-11df-91b9-002264764cea -t 5267d906-756d-4ed0-b749-6c34371dec65

When I create tasks in Greenbone SA, it just generates those ID's for me. Are you just randomly making them up? And if so, are there any particular parameters to pay attention to? Thanks.


All times are GMT -5. The time now is 09:17 AM.