Added AssetHandler to allow for map_file_to_url. Fixes issue 153

git-svn-id: https://beef.googlecode.com/svn/trunk@802 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
passbe
2011-03-24 11:40:15 +00:00
parent b2eefacd69
commit 40059a4c9b
5 changed files with 144 additions and 13 deletions

View File

@@ -94,7 +94,7 @@ module BeEF
# Builds the 'datastore' attribute of the command which is used to generate javascript code.
def build_datastore(data);
@datastore = JSON.parse(data);
@datastore = JSON.parse(data);
end
# Sets the datastore for the callback function. This function is meant to be called by the CommandHandler
@@ -280,6 +280,10 @@ module BeEF
@beefjs_components[component] = component_path
end
def map_file_to_url(file, path=nil, extension=nil, count=1)
return BeEF::AssetHandler.instance.bind(file, path, extension, count)
end
private