Fix dependency issue

GSoC/Meterpreter_Web_Console
Matthew Kienow 2018-08-06 14:27:16 -04:00
parent b4085e6a5f
commit 8a5d396fdc
No known key found for this signature in database
GPG Key ID: 40787F8B1EAC6E41
1 changed files with 6 additions and 3 deletions

9
msfdb
View File

@ -362,8 +362,11 @@ def init_web_service
f.puts <<~EOF
# #{File.basename(@ws_conf)}
# created on: #{Time.now.utc}
require 'pathname'
require File.expand_path('./config/boot', '#{@framework}')
@framework_path = '#{@framework}'
$LOAD_PATH << @framework_path unless $LOAD_PATH.include?(@framework_path)
require File.expand_path('./config/boot', @framework_path)
require 'metasploit/framework/parsed_options/remote_db'
require 'msf/core/db_manager/http/metasploit_api_app'
@ -375,7 +378,7 @@ def init_web_service
# allow other Rails::Applications to use this command
if !defined?(Rails) || Rails.application.nil?
# @see https://github.com/rails/rails/blob/v3.2.17/railties/lib/rails/commands.rb#L39-L40
require File.expand_path('./config/application', '#{@framework}')
require File.expand_path('./config/application', @framework_path)
end
# have to configure before requiring environment because