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.

check_smtp.rb 517B

12345678910111213141516171819
  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 'cryptcheck'
  6. name = ARGV[0]
  7. if name
  8. ::CryptCheck::Logger.level = (ARGV[1] || :info).to_sym
  9. server = ::CryptCheck::Tls::Smtp::Server.new ARGV[0]
  10. grade = ::CryptCheck::Tls::Smtp::Grade.new server
  11. ::CryptCheck::Logger.info { '' }
  12. grade.display
  13. else
  14. ::CryptCheck::Logger.level = :none
  15. ::CryptCheck::Tls::Smtp.analyze_from_file 'output/smtp.yml', 'output/smtp.html'
  16. end