[Wheel-builders] use of machomachomangler

Nathaniel Smith njs at pobox.com
Mon Jan 21 05:07:44 EST 2019


On Mon, Jan 21, 2019 at 2:03 AM Ivaylo Angelov <ivaylo_angelov at gmx.de> wrote:
>
> Dear Mr. Smith,
>
> writing a program, I am right now facing a similar problem as the one
> you have described on stackoverflow regarding the modification of PE import tables.
> I took a look into the github repository you have mentioned there and would like
> to use your program, but I want to make sure, that I do it properly, because the scenario in
> my case is slightly different:
>
> I have a dll named <A.dll> containing the <B.dll> in the import table.
> All I want to do, is to replace <B.dll> by <C.dll>...

Assuming you have a python 3 install, with the machomachomangler
package installed, It should be something like:

python3 -m machomachomangler.cmd.redll A.dll A-patched.dll B.dll C.dll

This leaves your original A.dll unchanged, but writes out a new file
called "A-patched.dll". So you probably want to follow that by
renaming A.dll → A-original.dll, and A-patched.dll → A.dll.

Unfortunately I haven't had time to look at this for a few years, so
if you run into more trouble I may not be able to help, but I think
that should work? Good luck!

-n

-- 
Nathaniel J. Smith -- https://vorpus.org


More information about the Wheel-builders mailing list