Answer the question
In order to leave comments, you need to log in
How to open exe file as archive?
There is an exe file, you need to open it as an archive, replace one file there and save it back. On a computer, all this is perfectly done, but no libraries work in Python.
Answer the question
In order to leave comments, you need to log in
Through the commands of the console rar.exe
What was the solution for me:
"C:\Program Files (x86)\WinRAR\rar.exe" a roadgid_detect.exe flagdata.bin
First of all, what is an archive? ZIP? Or RAR? RAR python out of the box does not know how.
Further, a self-extracting archive is an EXE, to which the archive is stupidly appended. If you know what the archive header looks like (in particular , the signature ), then you can scan the file, find the signature, rewind the file pointer to it, and only then give the file to the ZIP object.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question