Is it possible to perform a VM scan asynchronously? For example, I would like to use a perl script to start the scan and receive a reference number back and then proceed with the script.
Yes this is how it works actually when you use the /msp/scan.php API with the parameter "
Right after you launched the request, you will get a scan reference in the XML output (something looking like <SCAN value="scan/1353953505.02414">)
Once you have the scan reference, you can cancel/kill the call. The scan will continue to run in the backgound.
Then you can use the API ""/msp/scan_running_list.php" to check to status of the scan (running / finished)
I see that in the response.... It appears i have to keep reading the response and parse out the reference before i know to quit?
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE SCAN SYSTEM "https://qualysapi.qualys.com/scan-1.dtd">
<!-- scan is running on 10.2.16.171 //-->
<!-- keep-alive -->
<IP value="10.2.16.171" name="c-643800.FQDN.com" status="Finish">
<OS><![CDATA[Windows 7 Service Pack 1]]></OS>
Currently my code is capturing the response from the request.
my $http_response = $ua->request( $http_request );
Is there a better way to do this while watching for the reference?
Retrieving data ...