bininfo is a Windows console (command-line) utility that outputs and tests information about binary files.
Copyright (C) 2023 by Bill Stewart (bstewart at iname.com)
bininfo is covered by the GNU Public License (GPL). See the file LICENSE for details.
https://github.com/Bill-Stewart/bininfo/releases
bininfo [parameter [...]] file
| Parameter | Description |
|---|---|
| --machine machine | Test if file compiled to run on a machine type |
| --bintype bintype | Test if file compiled as a specific type |
| --version version | Test if file version is at least specified version |
| --csv | Writes output in comma-separated format |
Where:
- machine is the machine type; e.g.: AMD64, x86, ARM64, etc.
- bintype is the binary type; e.g.: Console, DLL, GUI, etc.
- version is a file version; e.g.: 6.2.22621.1635
Parameter names are case-sensitive. Omit all parameters to output file details. Specify one or more parameters to test whether the binary file matches. If the file matches the parameters, the program will exit with an exit code of 1; if the file does not match the parameters, the program will exit with an exit code of 0.
| Code | Description |
|---|---|
| 0 | File does not match one or more test parameters |
| 1 | File matches all test parameters |
| 2 | File not found |
| 3 | Path not found |
| 11 | File is not recognized as a binary file |
| 87 | One or more parameters is not correct |
-
bininfo --csv C:\Windows\System32\*.dllOutputs information about the specified files in comma-separated format.
-
bininfo --machine amd64 x86_64\bininfo.exeExit code will be 1 if the specified file is AMD64, or 0 otherwise.
-
bininfo --version 116.0 "C:\Program Files\Mozilla Firefox\firefox.exe"Exit code will be 1 if the specified file is version 116.0 or later, or 0 otherwise.
-
bininfo --machine x86 --bintype console i386\bininfo.exeExit code will be 1 if the specified file is x86 and a console application, or 0 otherwise.
-
bininfo --machine amd64 --bintype dll --version 12.8 myapp.dllExit code will be 1 if the specified file is an AMD64 DLL version 12.8 or newer, or 0 otherwise.
bininfo uses the Windows ImageLoad API function to retrieve information about binary files.
Program icon courtesy of Icons8 - Online Binary Code