tasks.py 文件源码

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

项目:PyMal 作者: cysinfo 项目源码 文件源码
def find_module(modlist, mod_addrs, addr):
    """Uses binary search to find what module a given address resides in.

    This is much faster than a series of linear checks if you have
    to do it many times. Note that modlist and mod_addrs must be sorted
    in order of the module base address."""

    pos = bisect_right(mod_addrs, addr) - 1
    if pos == -1:
        return None
    mod = modlist[mod_addrs[pos]]

    if (addr >= mod.DllBase.v() and
        addr < mod.DllBase.v() + mod.SizeOfImage.v()):
        return mod
    else:
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号