ssh_scan 0.0.39 → 0.0.40

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 913c588395b88fe25aae08930d7ef15984f75eab0c6976ef868d9c6fbe062f1c
4
- data.tar.gz: '0166380a16b6e1f380e4af64d610440bf668b6741985f320fbe6e1dc916cf55f'
3
+ metadata.gz: 876b8b5d07476eea82ba8d4a802254e625f0610258601f96a10c8f7ea2dc88c3
4
+ data.tar.gz: db1836ba6ec5cb21cd1a1ef09a3cbcaa41b3986329fc7779bde33ac84086aa7a
5
5
  SHA512:
6
- metadata.gz: 072a07a4d37cf493a5f295e757cd6b330ceeae98b3dd989500a27df4faa6be29def8ff5e6f48ece3b0784e80571b4bfbb873b6fbdb4900c2f1deb66f7c9b5666
7
- data.tar.gz: 7b8c97061c7a57b30c8d77544abe8626209196a55808a990f3dc28dc8e6f1fdf94fd1dad73853a0adc98a8b8cccfdd42d3303e3d3a92478fe9ff34eca186315f
6
+ metadata.gz: b3c255143c2e499923b6101f22f7befd6912274071a9edac8fe2a7d4bda7b4c00d69c0f68b5b53d6f400f57be9320d6c5f254756010d483a690aac04d8ba66ed
7
+ data.tar.gz: 80371f6ba9868dbf949c64f6e2d263d1dc0eb57d5317c0d8147427695bfe4c36fd2105c5727e41b384a336ddf6f1f0251525d6dad0ac6a3c3d66e9aa1a216a5e
@@ -20,6 +20,10 @@ module SSHScan
20
20
  return "rsa"
21
21
  elsif @key_string.start_with?("ssh-dss")
22
22
  return "dsa"
23
+ elsif @key_string.start_with?("ecdsa-sha2-nistp256")
24
+ return "ecdsa-sha2-nistp256"
25
+ elsif @key_string.start_with?("ssh-ed25519")
26
+ return "ed25519"
23
27
  else
24
28
  return "unknown"
25
29
  end
@@ -123,7 +123,7 @@ module SSHScan
123
123
 
124
124
  output = ""
125
125
 
126
- cmd = ['ssh-keyscan', '-t', 'rsa,dsa', '-p', port.to_s, target].join(" ")
126
+ cmd = ['ssh-keyscan', '-t', 'rsa,dsa,ecdsa,ed25519', '-p', port.to_s, target].join(" ")
127
127
 
128
128
  Utils::Subprocess.new(cmd) do |stdout, stderr, thread|
129
129
  if stdout
@@ -144,6 +144,16 @@ module SSHScan
144
144
  key = SSHScan::Crypto::PublicKey.new([host_keys[i], host_keys[i + 1]].join(" "))
145
145
  keys.merge!(key.to_hash)
146
146
  end
147
+
148
+ if host_keys[i].eql? "ecdsa-sha2-nistp256"
149
+ key = SSHScan::Crypto::PublicKey.new([host_keys[i], host_keys[i + 1]].join(" "))
150
+ keys.merge!(key.to_hash)
151
+ end
152
+
153
+ if host_keys[i].eql? "ssh-ed25519"
154
+ key = SSHScan::Crypto::PublicKey.new([host_keys[i], host_keys[i + 1]].join(" "))
155
+ keys.merge!(key.to_hash)
156
+ end
147
157
  end
148
158
 
149
159
  result.keys = keys
@@ -1,3 +1,3 @@
1
1
  module SSHScan
2
- VERSION = '0.0.39'
2
+ VERSION = '0.0.40'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ssh_scan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.39
4
+ version: 0.0.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Claudius