Note: This is not supported by Qualys, it is community built. Thanks to Jason Kent and Qnimbus for the solution below. This document was generated from the following discussion: Listing WAS Applications in Subscription - Python Module
The Python 2.7 call pulls all applications and application id's from the web applications in the subscription and puts them into a file.
$ python app_list.py -h
Warning, I do not support more than 1000 app records, yet.
usage: app_list.py [-h] [-a] [--debug] [-f FILE] [-l] -p PASSWORD [-t TAG] -u
Run multiple QualysGuard WAS v2 scans.
-h, --help show this help message and exit
-a, --all_apps Select all web applications. Overwrites any tag
--debug Outputs additional information to log.
-f FILE, --file FILE Output file to store XML results from initiating
scans. (Default = AppList.txt)
-l, --list List all selected web applications. (Default = True)
-p PASSWORD, --password PASSWORD
Corresponding QualysGuard WAS v2 API password.
-t TAG, --tag TAG Filter selection of web applications to those with
-u USERNAME, --username USERNAME
QualysGuard WAS v2 API username.
- Python 2.7
It's fairly simple to install these packages using pip.
How to install libraries
$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python
$ sudo pip install lxml
- Python 2.7 on Mac 10.7. Other Mac OS versions may work. Comment if they do or don't please.
The libraries are packaged with the script in one directory. Mac 10.7 required. Comment if you would like a Windows package.
Compiled for Mac 10.6+ users out there. This compiled code will require Python 2.7.
$ ./app_list Warning, I do not support more than 1000 app records, yet. usage: app_list [-h] [-a] [--debug] [-f FILE] [-l] -p PASSWORD [-t TAG] -u USERNAME