How to use the qiling.loader.pe.PE function in qiling

To help you get started, we’ve selected a few qiling examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github qilingframework / qiling / qiling / os / windows / x8664.py View on Github external
def loader_file(ql):
    uc = Uc(UC_ARCH_X86, UC_MODE_64)
    ql.uc = uc
    # init ql pe
    if (ql.stack_address == 0): 
        ql.stack_address = QL_X8664_WINDOWS_STACK_ADDRESS
    if (ql.stack_size == 0): 
        ql.stack_size = QL_X8664_WINDOWS_STACK_SIZE

    windows_setup64(ql)

    # load pe
    ql.PE = PE(ql, ql.path)
    ql.PE.load()

    ql.hook_code(hook_winapi)
github qilingframework / qiling / qiling / os / windows / x86.py View on Github external
def loader_file(ql):
    uc = Uc(UC_ARCH_X86, UC_MODE_32)
    ql.uc = uc

    # MAPPED Vars for loadPE32
    if (ql.stack_address == 0): 
        ql.stack_address = QL_X86_WINDOWS_STACK_ADDRESS
    if (ql.stack_size == 0): 
        ql.stack_size = QL_X86_WINDOWS_STACK_SIZE


    setup_windows32(ql)

    # load pe
    ql.PE = PE(ql, ql.path)
    ql.PE.load()

    # hook win api
    ql.hook_code(hook_winapi)