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

123456789101112131415
  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] || 'smtp'
  7. file = ::File.join 'output', "#{name}.yml"
  8. if ::File.exist? file
  9. ::CryptCheck::Logger.level = ENV['LOG'] || :none
  10. ::CryptCheck::Tls::Smtp.analyze_file file, "output/#{name}.html"
  11. else
  12. ::CryptCheck::Logger.level = ENV['LOG'] || :info
  13. ::CryptCheck::Tls::Smtp.analyze_domain ARGV[0]
  14. end