Browse Source

Fix log level on runner

master
Aeris 4 years ago
parent
commit
d92bf21832
2 changed files with 10 additions and 5 deletions
  1. 1
    1
      bin/check_ssh.rb
  2. 9
    4
      bin/check_xmpp.rb

+ 1
- 1
bin/check_ssh.rb View File

@@ -7,7 +7,7 @@ require 'cryptcheck'
name, port, level = case ARGV.length
when 1 then [ARGV[0], 22, :info]
when 2 then [ARGV[0], ARGV[1], :info]
when 3 then [ARGV[0], ARGV[1], ARGV[3]]
when 3 then [ARGV[0], ARGV[1], ARGV[2]]
end

::CryptCheck::Logger.level = level

+ 9
- 4
bin/check_xmpp.rb View File

@@ -4,11 +4,16 @@ require 'rubygems'
require 'bundler/setup'
require 'cryptcheck'

name = ARGV[0]
name, type, level = case ARGV.length
when 1 then [ARGV[0], :s2s, :info]
when 2 then [ARGV[0], ARGV[1].to_sym, :info]
when 3 then [ARGV[0], ARGV[1].to_sym, ARGV[2].to_sym]
end

if name
::CryptCheck::Logger.level = :info
server = ::CryptCheck::Tls::Xmpp::Server.new(name, ARGV[1] || :s2s)
grade = ::CryptCheck::Tls::Xmpp::Grade.new(server)
::CryptCheck::Logger.level = level
server = ::CryptCheck::Tls::Xmpp::Server.new name, type
grade = ::CryptCheck::Tls::Xmpp::Grade.new server
::CryptCheck::Logger.info { '' }
grade.display
else

Loading…
Cancel
Save