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.



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

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.



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

def code
  @code
end

#fileObject

Returns the value of attribute file.



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

def file
  @file
end

#langObject

Returns the value of attribute lang.



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

def lang
  @lang
end

#pathObject

Returns the value of attribute path.



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

def path
  @path
end

#peObject

Returns the value of attribute pe.



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

def pe
  @pe
end

#rvaObject

Returns the value of attribute rva.



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

def rva
  @rva
end

#sizeObject

Returns the value of attribute size.



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

def size
  @size
end

Instance Method Details

#dataObject



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

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