Codepage

Cool idea to load actual object code into memory and execute it from python using ctypes

Credits for idea: Luke Campagnola

class ppci.utils.codepage.Mod(obj, imports=None)

Container for machine code

get_symbol_offset(name)

Get the memory address of a symbol

ppci.utils.codepage.load_code_as_module(source_file, reporter=None)

Load c3 code as a module

ppci.utils.codepage.load_obj(obj, imports=None)

Load an object into memory.

Parameters:
  • obj – the code object to load.
  • imports – A dictionary of functions to attach.

Optionally a dictionary of functions that must be imported can be provided.