console.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:OWASP-ZSC-API 作者: viraintel 项目源码 文件源码
def install_readline(hook):
    '''Set up things for the interpreter to call 
    our function like GNU readline.'''
    global readline_hook, readline_ref
    # save the hook so the wrapper can call it
    readline_hook = hook
    # get the address of PyOS_ReadlineFunctionPointer so we can update it
    PyOS_RFP = c_void_p.from_address(Console.GetProcAddress(
        sys.dllhandle, "PyOS_ReadlineFunctionPointer".encode('ascii')))
    # save a reference to the generated C-callable so it doesn't go away
    readline_ref = HOOKFUNC23(hook_wrapper_23)
    # get the address of the function
    func_start = c_void_p.from_address(addressof(readline_ref)).value
    # write the function address into PyOS_ReadlineFunctionPointer
    PyOS_RFP.value = func_start
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号