diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-19 16:24:30 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-19 16:24:30 +0000 |
commit | 56c7a4e9b58bd7c944db1880a27ee435bbce5866 (patch) | |
tree | 82e5b0ff0be8f61690e68a7db99f3e6a836278e6 /lib/custodian/protocol-tests/ssh.rb | |
parent | 6066abd440c42333106e9394cb392b3dfafeac2d (diff) |
Updated to ensure we read a banner from the remote server - before we test against it.
Diffstat (limited to 'lib/custodian/protocol-tests/ssh.rb')
-rwxr-xr-x | lib/custodian/protocol-tests/ssh.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/protocol-tests/ssh.rb b/lib/custodian/protocol-tests/ssh.rb index 801a381..4ee9974 100755 --- a/lib/custodian/protocol-tests/ssh.rb +++ b/lib/custodian/protocol-tests/ssh.rb @@ -80,11 +80,11 @@ class SSHTest socket.puts( "QUIT") banner = socket.gets(nil) - banner = banner[0,20] + banner = banner[0,20] unless( banner.nil? ) socket.close() - if ( banner =~ /ssh/i ) + if ( !banner.nil? && ( banner =~ /ssh/i ) ) puts "ssh alive: #{banner}" if ( @test_data['verbose'] ) return true else |