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 531B

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