Execute binary code

Chris Mellon arkanes at gmail.com
Wed Jan 10 11:31:50 EST 2007


On 10 Jan 2007 08:12:41 -0800, sturlamolden <sturlamolden at yahoo.no> wrote:
>
> Chris Mellon wrote:
>
> > This works fine if the binary data is "pure" asm, but the impresssion
> > the OP gave is that it's a compiled binary, which you can't just "jump
> > into" this way.
>
> You may have to offset the function pointer so the entry point becomes
> correct.
>

That won't be enough. You basically would have to re-implement the OS
loading process, handling relocations and loading any linked
libraries. Possible, in theory, but very non-trivial.

> --
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list