From efec6c65ca53a7907d6156a4cb344bd70529fbd7 Mon Sep 17 00:00:00 2001 From: passbe Date: Tue, 23 Aug 2011 09:57:46 +0000 Subject: [PATCH] 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 --- core/main/configuration.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/main/configuration.rb b/core/main/configuration.rb index 46600b9d7..a22f434a7 100644 --- a/core/main/configuration.rb +++ b/core/main/configuration.rb @@ -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)