I want to used python to get the executed file version, and i know the pefile.py
how to used it to do this?
notes: the executed file may be not completely.
I want to used python to get the executed file version, and i know the pefile.py
how to used it to do this?
notes: the executed file may be not completely.
I'm not sure that I understand your problem correctly, but if it's something along the lines of using pefile to retrieve the version of a provided executable, then perhaps (taken from [the tutorial][1])
import pefile
pe = pefile.PE(‘/path/to/pefile.exe’)
pe.dump_info()
will provide you with the version information. I have no idea how sensible pefile is when parsing incomplete files, but conjecturing that the version information is somewhere in the header and that pefile uses a generator to read the file, then it should be possible to read the information if the header is parseable.