26

I have a need to see some additional file properties for exe and dll files.

If I open windows explorer and add the additional columns to my view, I can see things like Company, Copyright, Product name and Product version when it exists for that file.

This data is available via windows explorer so it stands to reason that while the data/string may exist somewhere in the file itself I should be able to extract that information via command line in linux.

I've tried using 'strings' but have been met with limited success. Files where I know all the aforementioned data fields I cannot always see with 'strings'

I'm hoping that someone may have an alternative solution. Maybe something I haven't thought of yet, to see this information.

3 Answers 3

48

You can use ExifTool. Here is an example of its usage:

$ exiftool somefile.exe
ExifTool Version Number         : 9.27
File Name                       : somefile.exe
Directory                       : .
File Size                       : 4.4 MB
File Modification Date/Time     : 2013:08:09 12:43:10-04:00
File Access Date/Time           : 2013:08:09 12:43:19-04:00
File Inode Change Date/Time     : 2013:08:09 12:43:10-04:00
File Permissions                : rw-------
File Type                       : Win32 EXE
MIME Type                       : application/octet-stream
Machine Type                    : Intel 386 or later, and compatibles
Time Stamp                      : 1992:06:19 18:22:17-04:00
PE Type                         : PE32
Linker Version                  : 2.25
Code Size                       : 37888
Initialized Data Size           : 96256
Uninitialized Data Size         : 0
Entry Point                     : 0x9c40
OS Version                      : 1.0
Image Version                   : 6.0
Subsystem Version               : 4.0
Subsystem                       : Windows GUI
File Version Number             : 3.3.0.0
Product Version Number          : 3.3.0.0
File Flags Mask                 : 0x003f
File Flags                      : (none)
File OS                         : Win32
Object File Type                : Executable application
File Subtype                    : 0
Language Code                   : Neutral
Character Set                   : Unicode
Comments                        : This installation was built with Inno Setup.
Company Name                    : Some company
File Description                : Some company
File Version                    : 3.3
Legal Copyright                 : Copyright(c) 2009-2013 Some company
Product Name                    : Some company somefile
Product Version                 : 3.3

ExifTool supports a number of file types and meta information formats. From the exiftool(1) manpage:

Below is a list of file types and meta information formats currently
supported by ExifTool (r = read, w = write, c = create):

File Types  
------------+-------------+-------------+-------------+------------  
3FR   r     | EIP   r     | LA    r     | ORF   r/w   | RSRC  r  
3G2   r     | EPS   r/w   | LNK   r     | OTF   r     | RTF   r  
3GP   r     | ERF   r/w   | M2TS  r     | PAC   r     | RW2   r/w  
ACR   r     | EXE   r     | M4A/V r     | PAGES r     | RWL   r/w  
AFM   r     | EXIF  r/w/c | MEF   r/w   | PBM   r/w   | RWZ   r  
AI    r/w   | EXR   r     | MIE   r/w/c | PCD   r     | RM    r  
AIFF  r     | F4A/V r     | MIFF  r     | PDF   r/w   | SO    r  
APE   r     | FFF   r/w   | MKA   r     | PEF   r/w   | SR2   r/w  
ARW   r/w   | FLA   r     | MKS   r     | PFA   r     | SRF   r  
ASF   r     | FLAC  r     | MKV   r     | PFB   r     | SRW   r/w  
AVI   r     | FLV   r     | MNG   r/w   | PFM   r     | SVG   r  
BMP   r     | FPF   r     | MODD  r     | PGF   r     | SWF   r  
BTF   r     | FPX   r     | MOS   r/w   | PGM   r/w   | THM   r/w  
CHM   r     | GIF   r/w   | MOV   r     | PLIST r     | TIFF  r/w  
COS   r     | GZ    r     | MP3   r     | PICT  r     | TTC   r  
CR2   r/w   | HDP   r/w   | MP4   r     | PMP   r     | TTF   r  
CRW   r/w   | HDR   r     | MPC   r     | PNG   r/w   | VRD   r/w/c  
CS1   r/w   | HTML  r     | MPG   r     | PPM   r/w   | VSD   r  
DCM   r     | ICC   r/w/c | MPO   r/w   | PPT   r     | WAV   r  
DCP   r/w   | IDML  r     | MQV   r     | PPTX  r     | WDP   r/w  
DCR   r     | IIQ   r/w   | MRW   r/w   | PS    r/w   | WEBP  r  
DFONT r     | IND   r/w   | MXF   r     | PSB   r/w   | WEBM  r  
DIVX  r     | INX   r     | NEF   r/w   | PSD   r/w   | WMA   r  
DJVU  r     | ITC   r     | NRW   r/w   | PSP   r     | WMV   r  
DLL   r     | J2C   r     | NUMBERS r   | QTIF  r     | WV    r  
DNG   r/w   | JNG   r/w   | ODP   r     | RA    r     | X3F   r/w  
DOC   r     | JP2   r/w   | ODS   r     | RAF   r/w   | XCF   r  
DOCX  r     | JPEG  r/w   | ODT   r     | RAM   r     | XLS   r  
DV    r     | K25   r     | OFR   r     | RAR   r     | XLSX  r  
DVB   r     | KDC   r     | OGG   r     | RAW   r/w   | XMP   r/w/c  
DYLIB r     | KEY   r     | OGV   r     | RIFF  r     | ZIP   r  

Meta Information  
----------------------+----------------------+---------------------  
EXIF           r/w/c  |  CIFF           r/w  |  Ricoh RMETA    r  
GPS            r/w/c  |  AFCP           r/w  |  Picture Info   r  
IPTC           r/w/c  |  Kodak Meta     r/w  |  Adobe APP14    r  
XMP            r/w/c  |  FotoStation    r/w  |  MPF            r  
MakerNotes     r/w/c  |  PhotoMechanic  r/w  |  Stim           r  
Photoshop IRB  r/w/c  |  JPEG 2000      r    |  APE            r  
ICC Profile    r/w/c  |  DICOM          r    |  Vorbis         r  
MIE            r/w/c  |  Flash          r    |  SPIFF          r  
JFIF           r/w/c  |  FlashPix       r    |  DjVu           r  
Ducky APP12    r/w/c  |  QuickTime      r    |  M2TS           r  
PDF            r/w/c  |  Matroska       r    |  PE/COFF        r  
PNG            r/w/c  |  GeoTIFF        r    |  AVCHD          r  
Canon VRD      r/w/c  |  PrintIM        r    |  ZIP            r  
Nikon Capture  r/w/c  |  ID3            r    |  (and more)  
1
  • 1
    Today I learned 🤯! Not a capability that I expected exiftool to have. Thank you.
    – Dan
    Mar 25, 2021 at 22:46
1

You can extract .rsrc/version.txt file from dll with /usr/bin/file-roller, also known as Gnome Archive Manager.

Be careful because it's in UTF-16 LE which is not suitable for grep or some editors, but simple cat version.txt should display desired data.

1

You can view the contents of a DLL file on linux using the "Resource Hacker" snap.

If you have Snap installed on your system, you can install it using the following command.

sudo snap install resourcehacker

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.