您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

24 行
535B

  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. GROUP_NAME = 'Top 100 Alexa'
  8. ::Logging.logger.root.appenders = ::Logging.appenders.stdout
  9. ::Logging.logger.root.level = :error
  10. hosts = []
  11. ::File.open('top-1m.csv', 'r') do |file|
  12. i = 0
  13. while line = file.gets
  14. hosts << [GROUP_NAME, line.strip.split(',')[1]]
  15. i += 1
  16. break if i == 100
  17. end
  18. end
  19. ::CryptCheck::Tls::Https.analyze hosts, 'output/alexa.html'