lib/metasploit/credential/migrator.rb in metasploit-credential-1.0.0.pre.rails.pre.4.0 vs lib/metasploit/credential/migrator.rb in metasploit-credential-1.0.0
- 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.exists?(path)
+ if File.exist?(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