diff --git a/lib/msf/core/module.rb b/lib/msf/core/module.rb index 14ca64e3f8..c845ee6a01 100644 --- a/lib/msf/core/module.rb +++ b/lib/msf/core/module.rb @@ -506,6 +506,20 @@ class Module false end + # + # Read a value from the module store + # + def [](k) + self.module_store[k] + end + + # + # Store a value into the module + # + def []=(k,v) + self.module_store[k] = v + end + # # The array of zero or more authors. # @@ -544,6 +558,11 @@ class Module # attr_accessor :job_id + # + # A generic hash used for passing additional information to modules + # + attr_accessor :module_store + protected # @@ -566,6 +585,7 @@ protected 'Privileged' => false, 'License' => MSF_LICENSE, }.update(self.module_info) + self.module_store = {} end # @@ -813,7 +833,6 @@ protected merge_info_options(info, val, false, true) end - attr_accessor :module_info # :nodoc: attr_writer :author, :arch, :platform, :references, :datastore, :options # :nodoc: attr_writer :privileged # :nodoc: