From 891400fdbbdbdd694a3675d5658a18b6983edbdf Mon Sep 17 00:00:00 2001 From: James Lee Date: Tue, 26 Jun 2012 15:32:16 -0600 Subject: [PATCH] Array#select! is only in 1.9 --- modules/post/multi/gather/ssh_creds.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/post/multi/gather/ssh_creds.rb b/modules/post/multi/gather/ssh_creds.rb index a1e78f670a..acfda0743d 100644 --- a/modules/post/multi/gather/ssh_creds.rb +++ b/modules/post/multi/gather/ssh_creds.rb @@ -40,7 +40,8 @@ class Metasploit3 < Msf::Post def run print_status("Finding .ssh directories") paths = enum_user_directories.map {|d| d + "/.ssh"} - paths.select! { |d| directory?(d) } + # Array#select! is only in 1.9 + paths = paths.select { |d| directory?(d) } if paths.nil? or paths.empty? print_error("No users found with a .ssh directory")