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.



710
711
712
713
714
715
716
717
718
# File 'lib/rex/peparsey/pebase.rb', line 710

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.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def code
  @code
end

#fileObject

Returns the value of attribute file.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def file
  @file
end

#langObject

Returns the value of attribute lang.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def lang
  @lang
end

#pathObject

Returns the value of attribute path.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def path
  @path
end

#peObject

Returns the value of attribute pe.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def pe
  @pe
end

#rvaObject

Returns the value of attribute rva.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def rva
  @rva
end

#sizeObject

Returns the value of attribute size.



708
709
710
# File 'lib/rex/peparsey/pebase.rb', line 708

def size
  @size
end

Instance Method Details

#dataObject



720
721
722
# File 'lib/rex/peparsey/pebase.rb', line 720

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