# File lib/rex/peparsey/pebase.rb, line 188 def initialize(rawdata) file_header = IMAGE_FILE_HEADER.make_struct if !file_header.from_s(rawdata) raise FileHeaderError, "Couldn't parse IMAGE_FILE_HEADER", caller end if file_header.v['NtSignature'] != IMAGE_NT_SIGNATURE raise FileHeaderError, "Couldn't find the PE magic!" end if SUPPORTED_MACHINES.include?(file_header.v['Machine']) == false raise FileHeaderError, "Unsupported machine type: #{file_header.v['Machine']}", caller end self.struct = file_header end
Generated with the Darkfish Rdoc Generator 2.