Update session_notifier.rb to change the SSL file checks to use .file? instead of .exists?

This commit is contained in:
Grant Willcox 2021-05-12 17:19:12 -05:00
parent 705e95308d
commit f71a6e914a
No known key found for this signature in database
GPG Key ID: D35E05C0F2B81E83
1 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@ module Msf
def cmd_set_session_gotify_sslcert_path(*args)
cert_path = args[0]
if !cert_path.blank? && ::File.exists?(cert_path) && ::File.readable?(cert_path)
if !cert_path.blank? && ::File.file?(cert_path) && ::File.readable?(cert_path)
@gotify_sslcert_path = cert_path
print_status("Set Gotify ssl_mode ON! Your cert path is #{gotify_sslcert_path}")
else
@ -293,7 +293,7 @@ module Msf
priority: 10
})
http = Net::HTTP.new(uri_parser.host, uri_parser.port)
if !gotify_sslcert_path.nil? && ::File.exists?(gotify_sslcert_path) && ::File.readable?(gotify_sslcert_path)
if !gotify_sslcert_path.nil? && ::File.file?(gotify_sslcert_path) && ::File.readable?(gotify_sslcert_path)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
store = OpenSSL::X509::Store.new