Thanks for the info! Will try as soon as re-install completes Jack Harvey RHCE CISSP Synnex Corporation 864-349-4939
-----Original Message----- From: Ryan Schulze [mailto:[email protected]] Sent: Friday, September 12, 2014 10:03 PM To: Jack Harvey Cc: [email protected] Subject: Re: [Openvas-discuss] OpenVAS 7 Wow, didn't notice that before (I never noticed --get-tasks took an argument). But yeah, can verify that on OpenVAS 7 omp --get-tasks <task uuid> doesn't do anything. Using the XML works fine though (just slightly less fun to parse in bash). omp -iX '<get_tasks task_id="<task uuid>" details="1"/>' omp -iX '<get_reports report_id="<report uuid>" format_id="<format uuid>"/>' http://www.openvas.org/omp-5-0.html is pretty extensive on how to use XML for retrieving and sending data to the manager. The report is stored as base64 in the <report> tag of the response from <get_reports>. A quick&dirty bash snippet to extract the report data from the response could look like this (just pipe the response into it: omp -iX '<get_reports ....>' | ./bashsnippet.sh): #!/bin/bash parse_xml () { local IFS=\> read -d \< Tag Content } while parse_xml ; do case ${Tag} in report\ * ) echo ${Content} | base64 -d - ;; esac done I know this all doesn't solve the initial problem, but maybe it helps as a workaround to access and store reports using the CLI. On 9/12/2014 7:58 AM, Jack Harvey wrote: > Sure... > > When I execute omp --get-tasks, the list of configured tasks is retrieved > When I execute omp --get-tasks <report-name-as-retrieved-by-above-command> > (such as... 7c32fa11-8e5b-427e-ad50-7bf697937c13) > NOTHING is returned where with v6 the task, as well as any reports for that > task, would be returned. I could then use the specific report (such as > c5877282-9e5f-49a4-923a-b2a33f29bfbd) > with this command omp --get-report c5877282-9e5f-49a4-923a-b2a33f29bfbd > --format a3810a62-1f62-11e1-9219-406186ea4fc5 > test-report.txt > and the report would be retrieved in text format. > > Here are the v6 results of the commands: > > root@scan:~# omp --get-tasks > ac8b3e67-7d95-4561-9de1-a87037c9dcbb Done task1 > 2f9014b4-545e-4a8d-b84e-9774d3109b2e Done task2 > 7add406c-bc24-4a58-8280-3e79b397351d Done task3 > b66d8c3a-3f05-489b-ab69-539007147bc7 Done task4 > > root@scan:~# omp --get-tasks ac8b3e67-7d95-4561-9de1-a87037c9dcbb > ac8b3e67-7d95-4561-9de1-a87037c9dcbb Done task1 > d310b398-3e08-4022-bef9-23f229d62e2a Done 0 0 1 366 > 2014-09-09T02:00:14Z > > root@scan:~# omp --get-report d310b398-3e08-4022-bef9-23f229d62e2a --format > a3810a62-1f62-11e1-9219-406186ea4fc5 > test-report.txt > > root@scan:~# ls -lt > total 195008 > -rw-r--r-- 1 root root 2334934 Sep 12 07:52 test-report.txt > > > v7 results with -v added: > > [root@centos ~]# omp -v --get-tasks > > WARNING: Verbose mode may reveal passwords! > > Will try to connect to host localhost, port 9390... > 859a7c5d-9f22-4530-861e-763825292910 Done meta-scan > Command completed successfully. > > [root@centos ~]# omp -v --get-tasks 859a7c5d-9f22-4530-861e-763825292910 > [root@centos ~]# > > I guess what I'm really asking is How can I generate/retrieve reports from > the cli when using OpenVAS version 7. > > > Jack Harvey RHCE CISSP > Synnex Corporation > 864-349-4939 > > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Friday, September 12, 2014 9:18 AM > To: Jack Harvey > Cc: [email protected] > Subject: Re: [Openvas-discuss] OpenVAS 7 > > Could you give a little more details about what part is not working? > > The -v switch to omp might help to show more info about where it's failing. > > -- > Greenbone Networks GmbH > Neuer Graben 17, 49074 Osnabrueck, Germany | AG Osnabrueck, HR B 202460 > Executive Directors: Lukas Grunwald, Dr. Jan-Oliver Wagner > _______________________________________________ > Openvas-discuss mailing list > [email protected] > https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss _______________________________________________ Openvas-discuss mailing list [email protected] https://lists.wald.intevation.org/cgi-bin/mailman/listinfo/openvas-discuss
