old_contents: #!/usr/bin/env python3.3
  # -*- coding: utf8 -*-
  #
  # Read input from NMap and use the information from cve-search and 
  # Toolswatch DPE (Default Password Enumeration) list to provide a list of
  # possible ways a system might be misconfigured or vulnerable.
  
  # Copyright (c) 2015	NorthernSec
  # Copyright (c)	2015	Pieter-Jan Moreels
  # This software is licensed under the Original BSD License
  
  # Imports
  import os
  import sys
  runpath=os.path.dirname(os.path.realpath(__file__))
  sys.path.append(os.path.join(runpath, '..'))
  
  import argparse
  
  from lib.Config import Configuration
  
  from bin.converter import parseNMap
  from bin.analyzer import enhance
  from bin.visualizer import filtersFromArgs, displayTypeFromArgs, visualize
  
  description='''Read Nmap scans of services or systems and use the 
                 cve-search core to get information about these cpes.'''
  
  parser = argparse.ArgumentParser(description=description)
  parser.add_argument('-t',  action='store_true',      help='Use terminal GUI')
  parser.add_argument('-fE', action='store_true',      help='Filter: Exploit scripts/frameworks available')
  parser.add_argument('-fN', action='store_true',      help='Filter: Exploitable via network')
  parser.add_argument('-fL', action='store_true',      help='Filter: Exploitable locally')
  parser.add_argument('-fAN',action='store_true',      help='Filter: Exploitable via adjecent network')
  parser.add_argument('-fC', action='store_true',      help='Filter: Impacts Confidentiality')
  parser.add_argument('-fI', action='store_true',      help='Filter: Impacts Integrity')
  parser.add_argument('-fA', action='store_true',      help='Filter: Impacts Availability')
  parser.add_argument('file',metavar='xml',  type=str, help='NMap XML file' )
  args = parser.parse_args()
  
  if __name__ == '__main__':
    syslist=parseNMap(file=args.file)
    try:
      syslist=enhance(syslist)
    except:
      sys.exit("Could not connect to the CVE-Search API on %s:%s"%(Configuration.getCVESearch()))
    filters=filtersFromArgs(args)
    display=displayTypeFromArgs(args)
    visualize(syslist, args.fE, filters, display)
  
new_contents: #!/usr/bin/env python3.3
  # -*- coding: utf8 -*-
  #
  # Read input from NMap and use the information from cve-search and 
  # Toolswatch DPE (Default Password Enumeration) list to provide a list of
  # possible ways a system might be misconfigured or vulnerable.
  
  # Copyright (c) 2015	NorthernSec
  # Copyright (c)	2015	Pieter-Jan Moreels
  # This software is licensed under the Original BSD License
  
  # Imports
  import os
  import sys
  runpath=os.path.dirname(os.path.realpath(__file__))
  sys.path.append(os.path.join(runpath, '..'))
  
  import argparse
  
  from lib.Config import Configuration
  
  from bin.converter import parseNMap
  from bin.analyzer import enhance
  from bin.visualizer import filtersFromArgs, displayTypeFromArgs, visualize
  
  description='''Read Nmap scans of services or systems and use the 
                 cve-search core to get information about these cpes.'''
  
  parser = argparse.ArgumentParser(description=description)
  parser.add_argument('-t',  action='store_true',      help='Use terminal GUI')
  parser.add_argument('-p',  action='store_true',      help='Print results to PDF')
  parser.add_argument('-fE', action='store_true',      help='Filter: Exploit scripts/frameworks available')
  parser.add_argument('-fN', action='store_true',      help='Filter: Exploitable via network')
  parser.add_argument('-fL', action='store_true',      help='Filter: Exploitable locally')
  parser.add_argument('-fAN',action='store_true',      help='Filter: Exploitable via adjecent network')
  parser.add_argument('-fC', action='store_true',      help='Filter: Impacts Confidentiality')
  parser.add_argument('-fI', action='store_true',      help='Filter: Impacts Integrity')
  parser.add_argument('-fA', action='store_true',      help='Filter: Impacts Availability')
  parser.add_argument('file',metavar='xml',  type=str, help='NMap XML file' )
  args = parser.parse_args()
  
  if __name__ == '__main__':
    syslist=parseNMap(file=args.file)
    try:
      syslist=enhance(syslist)
    except:
      sys.exit("Could not connect to the CVE-Search API on %s:%s"%(Configuration.getCVESearch()))
    filters=filtersFromArgs(args)
    display=displayTypeFromArgs(args)
    visualize(syslist, args.fE, filters, display)
  
subject: fix Nmap2CVE-Search.py pdf bug #14