Method: Rex::PeParsey::PeBase._parse_section_headers

Defined in:
lib/rex/peparsey/pebase.rb

._parse_section_headers(rawdata) ⇒ Object



643
644
645
646
647
648
649
650
651
652
653
654
# File 'lib/rex/peparsey/pebase.rb', line 643

def self._parse_section_headers(rawdata)
  section_headers = [ ]
  size = IMAGE_SIZEOF_SECTION_HEADER
  numsections = rawdata.length / size

  numsections.times do |i|
    data = rawdata[i * size, size]
    section_headers << SectionHeader.new(data)
  end

  return section_headers
end