andyvand / pefile

Automatically exported from code.google.com/p/pefile
Other
0 stars 0 forks source link

Version info appears not to be made available #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Instantiate a PE object on an exe file known to have version info, call
it "pe" for convenience
2. do a "dir(pe.FileInfo[0])" or "dir(pe.FileInfo[1])"

There should be a "StringTable" or "Var" attribute listed, depending on
whether the Key is "StringFileInfo" or "VarFileInfo".

Neither attribute appears to exist.

This was in an attempt to obtain the file version info, which is still
available through the "pe.FIXEDFILEINFO" attribute. 

The issue was encountered using pefile 1.2.10-60 with Python 2.5.1 on
Windows XP.

Please provide any additional information below.

Original issue reported on code.google.com by vanw...@gmail.com on 12 Feb 2009 at 8:10

GoogleCodeExporter commented 9 years ago
Is the file version info in a good state? I can do:

In [14]: pe.FileInfo[1].Var
Out[14]: [<Structure: [Var] Length: 0x24 ValueLength: 0x4 Type: 0x0>]

In [15]: pe.FileInfo[0].StringTable
Out[15]: [<Structure: [StringTable] Length: 0x2C6 ValueLength: 0x0 Type: 0x1>]

on a Python session with a standard Windows module with 1.2.10-62 (the newer 
version shouldn't make 
much of a difference)

Any chance you can tell me which (or send me the) file are you trying to 
process?

Original comment by ero.carr...@gmail.com on 12 Feb 2009 at 1:14

GoogleCodeExporter commented 9 years ago
I cannot send the original file I tried, as it is from my job. I have however
attached another file I tried it on to confirm that I might have a problem. The 
file
is from my installation of Delphi7 and claims to have a variety of file info. 
In both
my work file and the attached file I can extract version info using the
VS_FIXEDFILEINFO structure, but in neither files case does a StringTable or Var
method exist where they should.

I have however just tested using the winword.exe executable (MS Word from Office
2003) which works perfectly - it has both StringTable and a Var method.

Perhaps the problem is Delphi related, as both my original file and the random 
one I
chose to test with were probably generated with Delphi. Mine certainly was in 
any
event, and the other is associated with Delphi.

Thank you for your swift response to this issue - my apologies for reporting a
problem that I didn't test on enough files, since this appears perhaps to be 
limited
to Delphi executables.

Original comment by vanw...@gmail.com on 12 Feb 2009 at 1:35

Attachments:

GoogleCodeExporter commented 9 years ago
I will try to test for this issue if I come across some Delphi files. It could 
be related to the way strings are stored. 
Will set the state of this issue to "WontFix" for the time being.

Original comment by ero.carr...@gmail.com on 2 Mar 2009 at 1:55