Listing WAS Applications in Subscription - Python Module

Document created by Parag Baxi on Sep 13, 2012Last modified by Parag Baxi on Oct 3, 2012
Version 3Show Document
  • View in full screen mode

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

 

Description

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.

 

Usage

$ 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

                   USERNAME

 

 

Run multiple QualysGuard WAS v2 scans.

 

 

optional arguments:

  -h, --help            show this help message and exit

  -a, --all_apps        Select all web applications. Overwrites any tag

                        filters.

  --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

                        TAG.

  -u USERNAME, --username USERNAME

                        QualysGuard WAS v2 API username.

 

Requirements

Source: app_list.py

  • Python 2.7
  • lxml

 

It's fairly simple to install these packages using pip.

How to install libraries

Install pip:

$ curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | sudo python

Install libraries:

$ sudo pip install lxml

 

Compiled: compiled_app_list.zip

  • 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.

 

Usage:

$ ./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

 

License

 

GPL

Outcomes