Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #384 from mozilla/minor_stability_bug_fixes
Browse files Browse the repository at this point in the history
Fix minor bugs
  • Loading branch information
Jonathan Claudius authored Jun 9, 2017
2 parents 4aa08d7 + c1e56a0 commit 4a0b9db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/ssh_scan
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ options = {
"sockets" => [],
"policy" => File.join(File.dirname(__FILE__),"../config/policies/mozilla_modern.yml"),
"unit_test" => false,
"timeout" => 2,
"timeout" => 5,
"threads" => 5,
"verbosity" => nil,
"logger" => Logger.new(STDERR),
Expand Down
4 changes: 2 additions & 2 deletions lib/ssh_scan/result.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def duplicate_host_key_ips=(duplicate_host_key_ips)
end

def duplicate_host_key_ips
@duplicate_host_key_ips
@duplicate_host_key_ips.to_a
end

def auth_methods()
Expand Down Expand Up @@ -258,7 +258,7 @@ def to_hash
}

if self.error?
hashed_object.error = self.error
hashed_object["error"] = self.error
end

hashed_object
Expand Down
8 changes: 6 additions & 2 deletions lib/ssh_scan/scan_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def scan_target(socket, opts)
if port.nil?
port = 22
end

timeout = opts["timeout"]

result = SSHScan::Result.new()
Expand Down Expand Up @@ -68,11 +69,14 @@ def scan_target(socket, opts)
client.connect()
result.set_client_attributes(client)
kex_result = client.get_kex_result()
result.set_kex_result(kex_result)

unless kex_result.nil?
result.set_kex_result(kex_result)
end

# Attempt to suppliment a hostname that wasn't provided
result.hostname = target.resolve_ptr

result.error = client.error if client.error?
end

Expand Down

0 comments on commit 4a0b9db

Please sign in to comment.