adding the detect local settings command and fixing the functions to build beefjs for components

git-svn-id: https://beef.googlecode.com/svn/trunk@543 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
mosse.benjamin
2010-11-18 01:17:53 +00:00
parent 4c191524b9
commit 526a3201c6
2 changed files with 14 additions and 27 deletions

View File

@@ -214,13 +214,13 @@ module BeEF
# use 'beef.encode.base64'
#
def use(component)
component_path = component
return if @beefjs_components.include? component
component_path = '/'+component
component_path.gsub!(/beef./, '')
component_path.gsub!(/\./, '/')
component_path.replace "#{$root_dir}/modules/beefjs/#{component_path}.js"
return if beefjs_components.include? component
raise "Invalid beefjs component for command module #{@path}" if not File.exists?(component_path)
@beefjs_components[component] = component_path