fix for issue 16 (datastore nil instead of string)

git-svn-id: https://beef.googlecode.com/svn/trunk@807 b87d56ec-f9c0-11de-8c8a-61c5e9addfc9
This commit is contained in:
mosse.benjamin
2011-03-25 12:00:45 +00:00
parent 3c892f1bb9
commit ecd1e428b6
2 changed files with 7 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ module BeEF
# Super class controller
def initialize(info)
@info = info
@datastore = @info['Data'] || nil
@datastore = @info['Data'] || {}
@friendlyname = @info['Name'] || nil
@target = @info['Target'] || nil
@output = ''
@@ -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