Module: SSHScan::Crypto

Defined in:
lib/ssh_scan/crypto.rb

Overview

All cryptography related methods.

Defined Under Namespace

Classes: PublicKey

Class Method Summary collapse

Class Method Details

.bad_public_keysObject



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/ssh_scan/crypto.rb', line 47

def self.bad_public_keys
  bad_keys = []

  Dir.glob("data/ssh-badkeys/host/*.key").each do |file_path|
    file = File.read(File.expand_path(file_path))
    key = SSHKey.new(file)
    bad_keys << SSHScan::Crypto::PublicKey.new(key.ssh_public_key.split[1])
  end

  return bad_keys
end