From c35286da59afc6ace8f479b562ee701a41efe64e Mon Sep 17 00:00:00 2001 From: Till Maas Date: Fri, 26 Sep 2014 11:10:51 +0200 Subject: [PATCH] Support absolute paths for HTTPS key and cert --- core/main/server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/main/server.rb b/core/main/server.rb index 6b321d21f..569f3b82b 100644 --- a/core/main/server.rb +++ b/core/main/server.rb @@ -114,8 +114,8 @@ module BeEF print_more "Upgrade OpenSSL to version 1.0.1g or newer." end @http_server.ssl = true - @http_server.ssl_options = {:private_key_file => $root_dir + "/" + @configuration.get('beef.http.https.key'), - :cert_chain_file => $root_dir + "/" + @configuration.get('beef.http.https.cert'), + @http_server.ssl_options = {:private_key_file => File.expand_path(@configuration.get('beef.http.https.key'), $root_dir), + :cert_chain_file => File.expand_path(@configuration.get('beef.http.https.cert'), $root_dir), :verify_peer => false} end end