posix.py 文件源码

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

项目:vivisect-py3 作者: bat-serjo 项目源码 文件源码
def ptrace(code, pid, addr, data):
    """
    The contents of this call are basically cleanly
    passed to the libc implementation of ptrace.
    """
    global libc
    if not libc:
        if os.getenv('ANDROID_ROOT'):
            cloc = '/system/lib/libc.so'

        else:
            cloc = cutil.find_library("c")
            if not cloc:
                raise Exception("ERROR: can't find C library on posix system!")

        libc = CDLL(cloc)
        libc.ptrace.restype = c_size_t
        libc.ptrace.argtypes = [c_int, c_uint32, c_size_t, c_size_t]
    return libc.ptrace(code, pid, c_size_t(addr), c_size_t(data))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号