Improve scripts

new-scoring
aeris 6 years ago
parent 34cc29b2a5
commit 9ad705beba
  1. 11
      bin/check_smtp.rb
  2. 4
      bin/check_ssh.rb
  3. 2
      bin/check_tls.rb
  4. 11
      bin/check_xmpp.rb
  5. 1
      bin/generate-test-material.rb
  6. 4
      bin/supported.rb

@ -3,13 +3,4 @@ $:.unshift File.expand_path File.join File.dirname(__FILE__), '../lib'
require 'rubygems'
require 'bundler/setup'
require 'cryptcheck'
name = ARGV[0] || 'smtp'
file = ::File.join 'output', "#{name}.yml"
if ::File.exist? file
::CryptCheck::Logger.level = ENV['LOG'] || :none
::CryptCheck::Tls::Smtp.analyze_file file, "output/#{name}.html"
else
::CryptCheck::Logger.level = ENV['LOG'] || :info
::CryptCheck::Tls::Smtp.analyze_domain ARGV[0]
end
::CryptCheck::Tls::Smtp.analyze_domain ARGV[0]

@ -3,6 +3,4 @@ $:.unshift File.expand_path File.join File.dirname(__FILE__), '../lib'
require 'rubygems'
require 'bundler/setup'
require 'cryptcheck'
::CryptCheck::Logger.level = ENV['LOG'] || :info
::CryptCheck::Ssh.analyze ARGV[0], (ARGV[1] || 22)
::CryptCheck::Ssh.analyze ARGV[0], ARGV.fetch(1, 22)

@ -3,6 +3,4 @@ $:.unshift File.expand_path File.join File.dirname(__FILE__), '../lib'
require 'rubygems'
require 'bundler/setup'
require 'cryptcheck'
::CryptCheck::Logger.level = ENV['LOG'] || :info
::CryptCheck::Tls::analyze ARGV[0], ARGV[1]

@ -3,13 +3,4 @@ $:.unshift File.expand_path File.join File.dirname(__FILE__), '../lib'
require 'rubygems'
require 'bundler/setup'
require 'cryptcheck'
name = ARGV[0] || 'xmpp'
file = ::File.join 'output', "#{name}.yml"
if ::File.exist? file
::CryptCheck::Logger.level = ENV['LOG'] || :none
::CryptCheck::Tls::Xmpp.analyze_file file, "output/#{name}.html"
else
::CryptCheck::Logger.level = ENV['LOG'] || :info
::CryptCheck::Tls::Xmpp.analyze_domain ARGV[0], type: (ARGV[1] || :s2s).to_sym
end
::CryptCheck::Tls::Xmpp.analyze_domain ARGV[0], type: ARGV.fetch(1, :s2s).to_sym

@ -7,7 +7,6 @@ require 'socket'
require 'cryptcheck'
LOG = ::CryptCheck::Logger
LOG.level = ENV['LOG'] || :info
OpenSSL::PKey::EC.send :alias_method, :private?, :private_key?

@ -14,3 +14,7 @@ CryptCheck::Tls::Cipher.each do |method, ciphers|
puts " #{cipher}"
end
end
puts
puts 'Supported curves'
puts CryptCheck::Tls::Curve::SUPPORTED.collect(&:to_s).sort.join ' '

Loading…
Cancel
Save