Q: Replace resource in PE EXE file via script/command line under linux I am trying to find a way to replace contents of a resource "file" (new resource content can be different size) located in .rsrc directory inside of a PE EXE file under the linux command line.
There is a great Python-based project called pefile (https://github.com/erocarrera/pefile). 
There is also a Usage Examples page (https://github.com/erocarrera/pefile/blob/wiki/UsageExamples.md#introduction) but I can't find an example script showing how to replace contents of the resource file.
Any help will be appreciated.
Thanks, Dmitry.

A: The Python package pe-tools (PyPI) has a nicely documented command peresed that does this.
peresed --apply RES allows you to "apply a custom .res file, overwrite any matching resource entries.
You can also edit specific version-info fields or set resource entries to the contents of a file:
peresed --set-version "FileDescription=My very own file"
