Changed extension and module path to be relative. This was an oversight on my behalf, if the full root path is saved into the db and the beef location is moved, beef will fail to work
git-svn-id: https://beef.googlecode.com/svn/trunk@1229 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
@@ -98,7 +98,7 @@ module Core
|
||||
Dir.glob("#{$root_dir}/extensions/*/config.yaml") do | cf |
|
||||
y = self.load(cf)
|
||||
if y != nil
|
||||
y['beef']['extension'][y['beef']['extension'].keys.first]['path'] = cf.gsub(/config\.yaml/, '')
|
||||
y['beef']['extension'][y['beef']['extension'].keys.first]['path'] = cf.gsub(/config\.yaml/, '').gsub(/#{$root_dir}\//, '')
|
||||
@config = y.deep_merge(@config)
|
||||
end
|
||||
end
|
||||
@@ -112,7 +112,7 @@ module Core
|
||||
Dir.glob("#{$root_dir}/modules/**/*/config.yaml") do | cf |
|
||||
y = self.load(cf)
|
||||
if y != nil
|
||||
y['beef']['module'][y['beef']['module'].keys.first]['path'] = cf.gsub(/config\.yaml/, '')
|
||||
y['beef']['module'][y['beef']['module'].keys.first]['path'] = cf.gsub(/config\.yaml/, '').gsub(/#{$root_dir}\//, '')
|
||||
@config = y.deep_merge(@config)
|
||||
# API call for post module config load
|
||||
BeEF::API.fire(BeEF::API::Configuration, 'module_configuration_load', y['beef']['module'].keys.first)
|
||||
|
||||
Reference in New Issue
Block a user