You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
590B

  1. #!/usr/bin/env ruby
  2. $:.unshift File.expand_path File.join File.dirname(__FILE__), '../lib'
  3. require 'rubygems'
  4. require 'bundler/setup'
  5. require 'logging'
  6. require 'cryptcheck'
  7. name = ARGV[0] || 'index'
  8. file = ::File.join 'output', "#{name}.yml"
  9. if ::File.exist? file
  10. ::CryptCheck::Tls::Https.analyze_from_file "output/#{name}.yml", "output/#{name}.html"
  11. else
  12. ::Logging.logger.root.appenders = ::Logging.appenders.stdout
  13. ::Logging.logger.root.level = :warn
  14. server = ::CryptCheck::Tls::Https::Server.new(ARGV[0], ARGV[1] || 443)
  15. p grade = ::CryptCheck::Tls::Https::Grade.new(server)
  16. end