new_contents: import qualysapi
  from lxml import objectify
  
  a = qualysapi.connect()
  # Only download vulns from September 1, 2013 for demo purposes.
  xml = a.request('/api/2.0/fo/knowledge_base/vuln/', {'action': 'list', 'details': 'All', 'last_modified_after': '2013-09-01'})
  # Print API call's raw response to file to demo that this works.
  with open("kb.xml", "w") as xml_file:
      xml_file.write(xml)
  print 'Exploitability (E) correlation from page 308 of APIv2 User Guide: \n' + \
        'Unproven (U) = 1 \n' + \
        'Proof-of-Concept (POC) = 2 \n' + \
        'Functional (F) = 3 \n' + \
        'High (H) = 4 \n' + \
        'Not Defined (ND) = 0 \n'
  # Objectify xml.
  root = lxml.objectify.fromstring(xml)
  # Iterate vulns and print out exploitability if it has one.
  for vuln in root.RESPONSE.VULN_LIST.VULN:
      try:
          if vuln.CVSS.EXPLOITABILITY.text:
              # QID is vulnerability.
              print vuln.QID.text, vuln.CVSS.EXPLOITABILITY.text
      except AttributeError, e:
          # QID has no EXPLOITABILITY, it is an information gathered QID.
          pass
  
subject: Create qualysguard_kb_exploitability.py