Class: Rex::PeParsey::PeBase::SectionHeader

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

Instance Attribute Summary

Attributes inherited from GenericStruct

#struct

Instance Method Summary collapse

Methods inherited from GenericStruct

#[], #keys, #method_missing, #v

Constructor Details

#initialize(rawdata) ⇒ SectionHeader

Returns a new instance of SectionHeader.



638
639
640
641
642
643
644
645
646
# File 'lib/rex/peparsey/pebase.rb', line 638

def initialize(rawdata)
  section_header = IMAGE_SECTION_HEADER.make_struct

  if !section_header.from_s(rawdata)
    raise SectionHeaderError, "Could not parse header", caller
  end

  self.struct = section_header
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Rex::PeParsey::PeBase::GenericStruct

Instance Method Details

#PointerToRawDataObject



654
655
656
# File 'lib/rex/peparsey/pebase.rb', line 654

def PointerToRawData
  v['PointerToRawData']
end

#SizeOfRawDataObject



651
652
653
# File 'lib/rex/peparsey/pebase.rb', line 651

def SizeOfRawData
  v['SizeOfRawData']
end

#VirtualAddressObject



648
649
650
# File 'lib/rex/peparsey/pebase.rb', line 648

def VirtualAddress
  v['VirtualAddress']
end