Working with Pyscan

337 views
Skip to first unread message

Watchfire AXF

unread,
Apr 25, 2007, 6:09:37 AM4/25/07
to axf-general...@googlegroups.com
Hello,
 
We have added a new page dedicated to Pyscan on the AXF community site. You can find this page at: http://axf.watchfire.com/extensions/pyscan.aspx
 
In order to get you started with Pyscan, we have created a small sample Python script called PyscanUtils.py, which contains several useful functions. Load this sample script by going to the File menu, choosing Open, and pointing to the PyscanUtils.py script. In the new IDLE window that will open with the script, go to the Run menu, and choose Run Module. The script can also be run by hitting "F5" in the open menu.
 
You can download the (zipped) PyscanUtils.py at: http://axf.watchfire.com/extensions/PyscanUtils.zip
 
We will continue to update this page and the sample Pyscan utility scripts in the near future.
 
Thank you,
-Ory Segal / Watchfire

Jeff

unread,
Apr 26, 2007, 5:51:07 PM4/26/07
to AXF - General Discussion
In reviewing the sample Python code for Pyscan, I was able to launch
scans from accessing the below object:

appScan = __main__.appScan

However, I am not clear the code needed to access the
ReportFactory.CreateSecurityReport method (or if I can access this
through Python). I would like to use this method to generate scan
reports directly from Python.

Any hints?

Thank you!

-Jeffrey

watchf...@gmail.com

unread,
Apr 26, 2007, 5:59:48 PM4/26/07
to AXF - General Discussion
Hi Jeff,

There's a simple example of how to generate a PDF report in the Mail-E-
Vent eXtension. I used that code to quickly generate a PDF report from
Pyscan. Here it is:

>>> scanData = appScan.Scan.ScanData;
>>> securityReport = Watchfire.AppScan.Reporting.ReportFactory.CreateSecurityReport(scanData);
>>> securityReport.Config.Advisories = True;
>>> securityReport.Export(Watchfire.AppScan.Reporting.ReportFileType.Pdf, "C:\\Report.pdf");

Hope this helps,
-Ory

watchf...@gmail.com

unread,
Apr 26, 2007, 6:09:36 PM4/26/07
to AXF - General Discussion
Hi,

One last note on this subject -

Since Pyscan is using the SDK (just like the eXtensions), you can
basically use the SDK documentation to find out the different APIs.
The documentation is available in the /Docs directory of your AppScan
installation, and can also be downloaded from the AXF web site.

Thanks,
-Ory

Reply all
Reply to author
Forward
0 new messages