Method: Msf::ModuleDataStore#copy

Defined in:
lib/msf/core/module_data_store.rb

#copyObject

Return a deep copy of this datastore.



72
73
74
75
76
77
78
79
# File 'lib/msf/core/module_data_store.rb', line 72

def copy
  ds = self.class.new(@_module)
  self.keys.each do |k|
    ds.import_option(k, self[k].kind_of?(String) ? self[k].dup : self[k], @imported[k], @imported_by[k])
  end
  ds.aliases = self.aliases.dup
  ds
end