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 +4 -4
- data/lib/ssh_scan/public_key.rb +4 -0
- data/lib/ssh_scan/scan_engine.rb +11 -1
- data/lib/ssh_scan/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 876b8b5d07476eea82ba8d4a802254e625f0610258601f96a10c8f7ea2dc88c3
|
4
|
+
data.tar.gz: db1836ba6ec5cb21cd1a1ef09a3cbcaa41b3986329fc7779bde33ac84086aa7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b3c255143c2e499923b6101f22f7befd6912274071a9edac8fe2a7d4bda7b4c00d69c0f68b5b53d6f400f57be9320d6c5f254756010d483a690aac04d8ba66ed
|
7
|
+
data.tar.gz: 80371f6ba9868dbf949c64f6e2d263d1dc0eb57d5317c0d8147427695bfe4c36fd2105c5727e41b384a336ddf6f1f0251525d6dad0ac6a3c3d66e9aa1a216a5e
|
data/lib/ssh_scan/public_key.rb
CHANGED
@@ -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
|
data/lib/ssh_scan/scan_engine.rb
CHANGED
@@ -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
|
data/lib/ssh_scan/version.rb
CHANGED