SPUG: Parsing (Windows) PE files in Perl

David Dyck david.dyck at fluke.com
Thu Jan 12 07:12:27 PST 2006

On Thu, 12 Jan 2006 at 01:27 -0800, Uri London <uril at exchange.microsoft.com...:

> Assuming a package doesn't exist, please help with some novice questions:
> -          How to unpack a binary structure?

I'd recomend this useful tool on CPAN:
  Convert::Binary::C - Binary Data Conversion using C Types
and it comes with extensive documenation.

      Convert::Binary::C is a preprocessor and parser for C type
      definitions. It is highly configurable and should support
      arbitrarily complex data structures. Its object-oriented
      interface has "pack" and "unpack" methods that act as
      replacements for Perl's "pack" and "unpack" and allow to use
      the C types instead of a string representation of the data
      structure for conversion of binary data from and to Perl's
      complex data structures.

      Actually, what Convert::Binary::C does is not very different
      from what a C compiler does, just that it doesn't compile
      the source code into an object file or executable, but only
      parses the code and allows Perl to use the enumerations,
      structs, unions and typedefs that have been defined within
      your C source for binary data conversion, similar to Perl's
      "pack" and "unpack".

      Beyond that, the module offers a lot of convenience methods
      to retrieve information about the C types that have been

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT1463384.txt
Url: http://mail.pm.org/pipermail/spug-list/attachments/20060112/cbc31d01/ATT1463384.txt

More information about the spug-list mailing list