pex.exe.dll

Module Contents

class pex.exe.dll.DLL

Bases: object

Subclass of pex.exe module.

This subclass of pex.exe module is intended for providing an implementation of Windows dynamic library generator.

check_dll(data: bytes) bool

Check if data is a Windows dynamic library.

Parameters:

data (bytes) – data to check

Return bool:

True if data is a Windows dynamic library

pack_dll(arch: pex.arch.types.Arch | str, data: bytes, dll_inj_funcs: list = [], filename: str = 'kernel32') bytes

Pack data to a Windows dynamic library.

Parameters:
  • arch (Union[Arch, str]) – architecture to pack for

  • data (bytes) – data to pack

  • dll_inj_funcs (list) – list of functions to inject

  • filename (str) – filename specified in dynamic library

Return bytes:

packed Windows dynamic library

Raises:

RuntimeError – with trailing error message