@@ -0,0 +1,1404 @@
+%22%22%22 A set of utility functions for QualysConnect module. %22%22%22%0Aimport logging%0A%0Aimport qualysconnect.config as qcconf%0Aimport qualysconnect.connect as qcconn%0A%0A__author__ = %22Parag Baxi %3Cparag.baxi@gmail.com%3E & Colin Bell %3Ccolin.bell@uwaterloo.ca%3E%22%0A__copyright__ = %22Copyright 2011-2013, Parag Baxi & University of Waterloo%22%0A__license__ = %22BSD-new%22%0A%0A# define global values used by community code. will standardize debugging later.%0Apackage = 'qualysconnect'%0Amodule = 'util.py'%0Afrom . import __version__ as version%0A%0A# Define a Handler which writes WARNING messages or higher to the sys.stderr%0Alogger_console = logging.StreamHandler()%0Alogger_console.setLevel(logging.ERROR)%0A# Set a format which is simpler for console use.%0Aformatter = logging.Formatter('%25(name)-12s: %25(levelname)-8s %25(message)s')%0A# Tell the handler to use this format.%0Alogger_console.setFormatter(formatter)%0A# Add the handler to the root logger%0Alogging.getLogger(__name__).addHandler(logger_console)%0A# Set module level logger.%0Alogger = logging.getLogger(__name__)%0A%0Adef connect():%0A    %22%22%22 Return a QGAPIConnect object for v1 API pulling settings from config%0A    file.%0A    %22%22%22%0A    conf = qcconf.QualysConnectConfig()%0A    connect = qcconn.QGAPIConnect(conf.get_username(),%0A                                  conf.get_password(),%0A                                  conf.get_hostname())%0A    logger.info(%22Finished building connector.%22)%0A    return connect%0A

Create util.py