我需要查看 exe 和 dll 文件的一些附加文件属性。
如果我打开 Windows 资源管理器并将附加列添加到我的视图中,我可以看到该文件存在的公司、版权、产品名称和产品版本等内容。
这些数据可以通过 Windows 资源管理器获得,因此按理说,虽然数据/字符串可能存在于文件本身的某个位置,但我应该能够通过 Linux 中的命令行提取该信息。
我尝试过使用“字符串”,但取得的成功有限。我知道所有上述数据字段的文件,我不能总是用“字符串”看到
我希望有人可以有替代解决方案。也许我还没有想到什么,看到这个信息。
答案1
您可以使用Exif工具。下面是它的用法示例:
$ 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 支持多种文件类型和元信息格式。来自exiftool(1)
联机帮助页:
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)
答案2
您可以使用以下命令在 Linux 上查看 DLL 文件的内容“资源黑客”快照。
如果您的系统上安装了 Snap,则可以使用以下命令安装它。
sudo snap install resourcehacker