Land #11232, Update msfdb to obtain msf config directory dynamically

GSoC/Meterpreter_Web_Console
Erin Bleiweiss 2019-01-10 12:08:18 -06:00
commit 5d92774a1d
No known key found for this signature in database
GPG Key ID: F69B2138BD594660
1 changed files with 2 additions and 1 deletions

3
msfdb
View File

@ -20,13 +20,14 @@ end
$:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib'))) $:.unshift(File.expand_path(File.join(File.dirname(msfbase), 'lib')))
$:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB'] $:.unshift(ENV['MSF_LOCAL_LIB']) if ENV['MSF_LOCAL_LIB']
require 'msf/base/config'
require 'msf/util/helper' require 'msf/util/helper'
@script_name = File.basename(__FILE__) @script_name = File.basename(__FILE__)
@framework = File.expand_path(File.dirname(__FILE__)) @framework = File.expand_path(File.dirname(__FILE__))
@localconf = "#{ENV['HOME']}/.msf4" @localconf = Msf::Config.get_config_root
@db = "#{@localconf}/db" @db = "#{@localconf}/db"
@db_conf = "#{@localconf}/database.yml" @db_conf = "#{@localconf}/database.yml"