ssh_scan 0.0.41 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ssh_scan/client.rb +3 -0
- data/lib/ssh_scan/version.rb +1 -1
- metadata +2 -3
- data/lib/ssh_scan/tests/test_dns_key_verification.rb +0 -43
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee458d8fcc40240dd30d59da2303ca1892d832e3a4452a04497bd99ed09d8c9d
|
4
|
+
data.tar.gz: db71d8386efa3988e64d649e942e02afb501416a00aa88c988ca2acc7763b8c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d1d1a3de52debdff193e3a656690f9deafce5a214a25e71710f7b7f4916aff7f624946971efb7c067105681d4a6f65dffb0bb2d6d38e4a3542834587bd243e6a
|
7
|
+
data.tar.gz: 513ea628c67c480c113b1c9b7af734e88afa286445e38825e77fa2edb55ffa1d7679486383c3ef3e760b329b23dfc0c6c9dbdc558ea4e29400d977b81a19d20f
|
data/lib/ssh_scan/client.rb
CHANGED
@@ -70,6 +70,9 @@ module SSHScan
|
|
70
70
|
rescue Errno::EHOSTUNREACH => e
|
71
71
|
@error = SSHScan::Error::ConnectionRefused.new(e.message)
|
72
72
|
@sock = nil
|
73
|
+
rescue Errno::ENOPROTOOPT => e
|
74
|
+
@error = SSHScan::Error::ConnectionRefused.new(e.message)
|
75
|
+
@sock = nil
|
73
76
|
else
|
74
77
|
if @raw_server_banner.nil?
|
75
78
|
@error = SSHScan::Error::NoBanner.new(
|
data/lib/ssh_scan/version.rb
CHANGED
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.
|
4
|
+
version: 0.0.42
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Claudius
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2019-
|
15
|
+
date: 2019-08-27 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: bindata
|
@@ -209,7 +209,6 @@ files:
|
|
209
209
|
- lib/ssh_scan/ssh_lib/unknown.rb
|
210
210
|
- lib/ssh_scan/subprocess.rb
|
211
211
|
- lib/ssh_scan/target_parser.rb
|
212
|
-
- lib/ssh_scan/tests/test_dns_key_verification.rb
|
213
212
|
- lib/ssh_scan/update.rb
|
214
213
|
- lib/ssh_scan/version.rb
|
215
214
|
- lib/string_ext.rb
|
@@ -1,43 +0,0 @@
|
|
1
|
-
module SSHScan
|
2
|
-
module Tests
|
3
|
-
class DnsKeyVerification
|
4
|
-
def initialize(result)
|
5
|
-
@result = result
|
6
|
-
end
|
7
|
-
|
8
|
-
def pass?
|
9
|
-
@result.keys.each do |key,value|
|
10
|
-
valid = false
|
11
|
-
|
12
|
-
@result.dns_keys.each do |dns_key|
|
13
|
-
if key == dns_key["algo"] &&
|
14
|
-
value["fingerprints"].values.include?(dns_key["hex"])
|
15
|
-
valid = true
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
# This means we fail any key that's offered that's not verifiable via information from DNS
|
20
|
-
return false unless valid == true
|
21
|
-
end
|
22
|
-
|
23
|
-
return true
|
24
|
-
end
|
25
|
-
|
26
|
-
def fail_description
|
27
|
-
if pass?
|
28
|
-
""
|
29
|
-
else
|
30
|
-
"One or more of the keys offered by the SSH service were not able to be verified using an SSHFS record"
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def score_deduction
|
35
|
-
if pass?
|
36
|
-
0
|
37
|
-
else
|
38
|
-
-5
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|