taskscan.py 文件源码

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

项目:shannonRE 作者: Comsecuris 项目源码 文件源码
def ret_addr(ea):

    #we can't assume Thumb only, so we also keep ARM cases, just adjust addr in Thumb cases
    if (ea % 2) != 0:
        ea -= 1

    f_ea = idaapi.get_func(ea)
    if not f_ea:
        return False

    #Preceding or Previous?
    #   Not necessarily all preceding will be a call to a ret instruction,
    #   but "the" prev should be always the one.
    i = idautils.DecodePreviousInstruction(ea)
    if i and "BL" in idc.GetMnem(i.ea):
        return True

    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号