Peres -v shows a lot of useless (debug) info. Is this intentional?
Describe the bug After the upgrade to 0.81, peres -v shows the version and, before it, a ton of useless debug info in the terminal. On 0.80 it just showed the version and nothing more, thus the question if this new behavior is intentional. If it is, can it be turned off with some other command line parameter?
To Reproduce Please provide us with:
- pev version: 0.81
- OS version: debian testing x64 and unstable x86
- The file(s) you've analysed with pev: Teamviewer_Setup.exe is shown below, but the same applies to other .exe installers.
- The command you've used with the files, with all the flags
peres -v TeamViewer_Setup.exe
Expected behavior The output, until v0.80, looked like this, plain and simple
$ peres -v TeamViewer_Setup.exe
Product Version: 15.14.3.0
Screenshots Is text ok? This is the full output of peres -v in v0.81
$ peres -v TeamViewer_Setup.exe
DEBUG: id=0x3, dataOffset=0x80000038
DEBUG: id=0x1, dataOffset=0x800000d8
DEBUG: id=0x409, dataOffset=0x1c8
DEBUG: CodePage=0, OffsetToData=193128[0x2f268], Reserved=0[0], Size=270376[0x42028]
DEBUG: id=0x2, dataOffset=0x800000f0
DEBUG: id=0x409, dataOffset=0x1d8
DEBUG: CodePage=0, OffsetToData=463504[0x71290], Reserved=0[0], Size=9640[0x25a8]
DEBUG: id=0x3, dataOffset=0x80000108
DEBUG: id=0x409, dataOffset=0x1e8
DEBUG: CodePage=0, OffsetToData=473144[0x73838], Reserved=0[0], Size=4264[0x10a8]
DEBUG: id=0x4, dataOffset=0x80000120
DEBUG: id=0x409, dataOffset=0x1f8
DEBUG: CodePage=0, OffsetToData=477408[0x748e0], Reserved=0[0], Size=1128[0x468]
DEBUG: id=0x5, dataOffset=0x80000068
DEBUG: id=0x69, dataOffset=0x80000138
DEBUG: id=0x409, dataOffset=0x208
DEBUG: CodePage=0, OffsetToData=478536[0x74d48], Reserved=0[0], Size=256[0x100]
DEBUG: id=0x6a, dataOffset=0x80000150
DEBUG: id=0x409, dataOffset=0x218
DEBUG: CodePage=0, OffsetToData=478792[0x74e48], Reserved=0[0], Size=284[0x11c]
DEBUG: id=0x6f, dataOffset=0x80000168
DEBUG: id=0x409, dataOffset=0x228
DEBUG: CodePage=0, OffsetToData=479080[0x74f68], Reserved=0[0], Size=96[0x60]
DEBUG: id=0xe, dataOffset=0x80000090
DEBUG: id=0x67, dataOffset=0x80000180
DEBUG: id=0x409, dataOffset=0x238
DEBUG: CodePage=0, OffsetToData=479176[0x74fc8], Reserved=0[0], Size=62[0x3e]
DEBUG: id=0x10, dataOffset=0x800000a8
DEBUG: id=0x1, dataOffset=0x80000198
DEBUG: id=0x409, dataOffset=0x248
DEBUG: CodePage=0, OffsetToData=479240[0x75008], Reserved=0[0], Size=596[0x254]
DEBUG: id=0x18, dataOffset=0x800000c0
DEBUG: id=0x1, dataOffset=0x800001b0
DEBUG: id=0x409, dataOffset=0x258
DEBUG: CodePage=0, OffsetToData=479840[0x75260], Reserved=0[0], Size=832[0x340]
File Version: 65263.1213.0.0
Product Version: 15.14.3.0
Additional context I maintain a small "repository" of windows apps (basically their installers). I have been using peres with the -v parameter for the last couple of years in order to check the version of the installer I have. Then I check the upstream version of the installer, and, if needed, I download the newer one. As described in peres' help page, the -v parameter is for the version only. The debug part is not mentioned anywhere actually.
$ peres --help
Usage: peres OPTIONS FILE
Show information about resource section and extract it
Example: peres -a putty.exe
Options:
-a, --all Show all information, statistics and extract resources
-f, --format <text|xml|html|json|csv> change output format (default: text)
-i, --info Show resources information
-l, --list Show list view
-s, --statistics Show resources statistics
-x, --extract Extract resources
-X, --named-extract Extract resources with path names
-v, --file-version Show File Version from PE resource directory
-V, --version Show version and exit
--help Show this help and exit
Hi @pitsi! Thanks for reporting this. It was actually fixed by this commit in libpe but we haven't released v0.82 yet. If you compile pev from the sources, you'll have it fixed. Or if you can wait, @jweyrich and I can consider releasing a new version to fix this and other issues soon.
As a workaround, you could filter out this debug messages with a native string matching tool:
Unix/Linux/macOS:
peres -v file.exe | grep -v DEBUG
Windows:
peres -v file.exe | findstr /v DEBUG
Thanks, Fernando
The commit was made ~a week~ 10+ days before my report here, so I assume you already knew it. I will probably get 0.82 during or after summer, because debian is now on freeze. So don't rush it. I will use the workaround you mention unil then. Feel free to close this report if you consider the issue fixed.
Oh, sorry about the inconvenience. We only noticed that after the release indeed. I'll keep this issue open until we release a new version. ;)
v0.82 Has been released