Linux
通過命令行查看 dll 和 exe 文件屬性/屬性
我需要查看 exe 和 dll 文件的一些附加文件屬性。
如果我打開 Windows 資源管理器並將其他列添加到我的視圖中,我可以看到公司、版權、產品名稱和產品版本(如果該文件存在)。
該數據可通過 Windows 資源管理器獲得,因此可以合理地認為,雖然數據/字元串可能存在於文件本身的某個位置,但我應該能夠通過 linux 中的命令行提取該資訊。
我曾嘗試使用“字元串”,但收效甚微。我知道所有上述數據欄位的文件,我不能總是用“字元串”看到
我希望有人可能有替代解決方案。也許我還沒有想到的東西,看到這個資訊。
您可以使用ExifTool。以下是它的用法範例:
$ 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)