Beispiel #1
0
        else:
            if os_checks_num == 0:
                settings.INIT_TEST = True
            # Check if option is "--url" for single url test.
            if menu.options.sitemap_url:
                url = menu.options.sitemap_url
            else:
                url = menu.options.url
            response, url = url_response(url)
            if response != False:
                filename = logs_filename_creation()
                main(filename, url)

except KeyboardInterrupt:
    abort_msg = "User aborted procedure "
    abort_msg += "during the " + checks.assessment_phase()
    abort_msg += " phase (Ctrl-C was pressed)."
    new_line = "\n"
    if settings.FILE_BASED_STATE or \
       settings.TEMPFILE_BASED_STATE :
        if not settings.DETECTION_PHASE and \
           settings.EXPLOITATION_PHASE:
            if settings.VERBOSITY_LEVEL != 0:
                new_line = ""
    print(new_line + settings.print_abort_msg(abort_msg))
    try:
        logs.print_logs_notification(filename, url)
        print("")
    except NameError:
        raise SystemExit()
Beispiel #2
0
    else:
      if os_checks_num == 0:
        settings.INIT_TEST = True
      # Check if option is "--url" for single url test.
      if menu.options.sitemap_url:
        url = menu.options.sitemap_url
      else:  
        url = menu.options.url
      response, url = url_response(url)
      if response != False:
        filename = logs_filename_creation()
        main(filename, url)

except KeyboardInterrupt:
  abort_msg = "User aborted procedure "
  abort_msg += "during the " + checks.assessment_phase() 
  abort_msg += " phase (Ctrl-C was pressed)."
  new_line = "\n"
  if settings.FILE_BASED_STATE or \
     settings.TEMPFILE_BASED_STATE :
     if not settings.DETECTION_PHASE and \
        settings.EXPLOITATION_PHASE:
      if settings.VERBOSITY_LEVEL != 0: 
        new_line = ""
  print new_line + settings.print_abort_msg(abort_msg)
  try:
    logs.print_logs_notification(filename, url)
    print ""
  except NameError:
    raise SystemExit()