Fixes issue 253 , persistant command options.

git-svn-id: https://beef.googlecode.com/svn/trunk@851 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
sussurro@happypacket.net
2011-04-04 19:32:52 +00:00
parent 55dfc60b59
commit a8c70e0e5f
4 changed files with 26 additions and 6 deletions

View File

@@ -284,7 +284,19 @@ module BeEF
def map_file_to_url(file, path=nil, extension=nil, count=1)
return BeEF::AssetHandler.instance.bind(file, path, extension, count)
end
def oc_value(name)
option = BeEF::Models::OptionCache.first(:name => name)
return nil if not option
return option.value
end
def apply_defaults()
@datastore.each { |opt|
opt["value"] = oc_value(opt["name"]) || opt["value"]
}
end
private
@use_template