Class: Rex::PeParsey::PeBase::ResourceEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/rex/peparsey/pebase.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pe, path, lang, code, rva, size, file) ⇒ ResourceEntry

Returns a new instance of ResourceEntry.



727
728
729
730
731
732
733
734
735
# File 'lib/rex/peparsey/pebase.rb', line 727

def initialize(pe, path, lang, code, rva, size, file)
	self.pe    = pe
	self.path  = path
	self.lang  = lang
	self.code  = code
	self.rva   = rva
	self.size  = size
	self.file  = file.to_s
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def code
  @code
end

#fileObject

Returns the value of attribute file.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def file
  @file
end

#langObject

Returns the value of attribute lang.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def lang
  @lang
end

#pathObject

Returns the value of attribute path.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def path
  @path
end

#peObject

Returns the value of attribute pe.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def pe
  @pe
end

#rvaObject

Returns the value of attribute rva.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def rva
  @rva
end

#sizeObject

Returns the value of attribute size.



725
726
727
# File 'lib/rex/peparsey/pebase.rb', line 725

def size
  @size
end

Instance Method Details

#dataObject



737
738
739
# File 'lib/rex/peparsey/pebase.rb', line 737

def data
	pe._isource.read(pe.rva_to_file_offset(rva), size)
end