lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> -----Original Message-----
> From: lua-l-bounces@lists.lua.org [mailto:lua-l-bounces@lists.lua.org] On
> Behalf Of Mateusz Czaplinski
> Sent: vrijdag 10 oktober 2014 15:39
> To: Lua mailing list
> Subject: Re: [ANN] pe-parser v0.2
> 
> On Fri, Oct 3, 2014 at 9:56 PM, Thijs Schreijer <thijs@thijsschreijer.nl>
> wrote:
> PE-parser is a pure Lua module to examine PE files (portable executable
> files), used by Windows and some other platforms [1].
> No changes to the core code, just a new commandline utility, also named ‘pe-
> parser’ to quickly check a file from the commandline.
> 
> Fairly tangentially related, but I've written a tool which required me to
> solve some similar PE-related problems, available at:
> https://github.com/akavel/rsrc. In it I produce ~"PE/COFF" "object" files
> (more precisely: .obj files containing .ico and .manifest resources in RSRC
> section, and/or some stuff in static data section), so in case you wanted to
> try emitting PE executables at some point, some things there could maybe
> help, or at least be of interest. But maybe you've already solved all of the
> same problems/doubts, so maybe no use here.
> br
> /Mateusz.

Nice work! My pe-parser module was written mainly to detect 32/64bit ness on Windows, and to analyse the Windows runtime libraries used. Initially I used GNU objdump.exe, but that failed on 64bit executables. Hence I wrote my own.

I use the commandline script to analyse downloaded executables for the runtime compatibility, and the code is embedded in the LuaRocks Windows installer to detect the Lua engine (runtime and bitness) in use.

Thijs