This class represents a particular image module including its name, segments, imports, exports, base address, and so on.
# File lib/rex/exploitation/opcodedb.rb, line 193 def initialize(hash) super @locale = Locale.create(hash['locale']) @maj_maj_ver = hash['maj_maj_ver'].to_i @maj_min_ver = hash['maj_min_ver'].to_i @min_maj_ver = hash['min_maj_ver'].to_i @min_min_ver = hash['min_min_ver'].to_i @timestamp = Time.at(hash['timestamp'].to_i) @vendor = hash['vendor'] @base_address = hash['base_address'].to_i @image_size = hash['image_size'].to_i @segments = hash['segments'].map { |ent| Segment.new(ent) } if (hash['segments']) @imports = hash['imports'].map { |ent| Import.new(ent) } if (hash['imports']) @exports = hash['exports'].map { |ent| Export.new(ent) } if (hash['exports']) @platforms = hash['platforms'].map { |ent| OsVersion.create(ent) } if (hash['platforms']) @segments = [] unless(@segments) @imports = [] unless(@imports) @exports = [] unless(@exports) @platforms = [] unless(@platforms) end
Generated with the Darkfish Rdoc Generator 2.