Does anyone have a sample Java code to launch a QualysGuard automitic report and save the report to local filesystem?
Thanks a lot,
We have the perl script fetchreport.pl if you'd like. This is obviously not java though
I will try to get some python code checked in to my repo to do this. I've needed a script for a while to do this in the general form.
You could edit the 'qhostinfo' script provided in the repo to do this.
Essentially, if you are using this Python connector, you need to have a v2 connector up and running and then execute:
# This launches the report...
# Note: this returns a report ID number in the XML you need to grab.
ret = qgs.request("report/",
# This verifies the progress of the report..
# Note: this returns an XML block telling you the status of the report. When you see 'Finished' it is ready to download.
ret = qgs.request("report/","action=list&id=<REPORT_ID>&")
# This downloads the report.
# Note: this returns the contents of the report in whatever format you requested initially.
ret = qgs.request("report/","action=fetch&id=<REPORT_ID>&")
Sorry I don't have Java code to do it for you... but if you know some Python it should be straightforward to initate and download from within a modified version of the provided 'qhostinfo' script or the example V2 connector stub.
Retrieving data ...