lib/metasploit/credential/migrator.rb in metasploit-credential-0.14.7 vs lib/metasploit/credential/migrator.rb in metasploit-credential-0.14.8
- old
+ new
@@ -102,10 +102,10 @@
# Returns the text of the SSH key as read from the file
# @param path [String] Path to an SSH key file on disk
# @return [String]
def key_data_from_file(path)
# Sometimes we will set the :pass attribute to a file path containing the key
- if File.exist?(path)
+ if File.exists?(path)
File.read(path)
# In other cases we store the entire SSH key directly in the :pass attribute
elsif Metasploit::Credential::SSHKey.new(data: path).private?
path
end