diff --git a/lib/ssh_scan/scan_engine.rb b/lib/ssh_scan/scan_engine.rb index 631be1b2..7526e10f 100644 --- a/lib/ssh_scan/scan_engine.rb +++ b/lib/ssh_scan/scan_engine.rb @@ -126,7 +126,9 @@ def scan_target(socket, opts) cmd = ['ssh-keyscan', '-t', 'rsa,dsa', '-p', port.to_s, target].join(" ") Utils::Subprocess.new(cmd) do |stdout, stderr, thread| - output += stdout + if stdout + output += stdout + end end host_keys = output.split