C library to read EXE version from Linux?

后端 未结 5 1870
孤独总比滥情好
孤独总比滥情好 2021-02-08 11:24

Is there a library I can use in Linux that will return the properties of a Windows EXE file that are listed in Explorer\'s Version tab? These are fields like Product Name, Produ

5条回答
  •  伪装坚强ぢ
    2021-02-08 11:47

    I know pev is a tool on Ubuntu that allows you to see this information, along with a lot of other PE header info. I also know it's written in C. Maybe you'll want to have a look at it. A bit from its history section in the docs:

    pev has born in 2010 from a simple need: a program to find out the version (File Version) of a PE32 file and that could be run in Linux. This version number is stored in Resources (.rsrc) section but at the time we've decided to simply search for the string in the whole binary, without any optimization.

    Later on we've decided to parse the PE32 file until reach .rsrc section and get the File Version field. In order to do that, we realized we must parse the entire file and we thought if we could print out all the fields and values as well...

    Until version 0.40, pev was an unique program for parse the PE headers and sections (now readpe is responsible for this). In version 0.50 we focused on malware analysis and splitted pev into various programs beyond a library, called libpe. Currently all pev programs use libpe.

提交回复
热议问题