structure.py 文件源码

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

项目:idascripts 作者: ctfhacker 项目源码 文件源码
def up(self):
        '''Return all the structures that reference this specific structure.'''
        x, sid = idaapi.xrefblk_t(), self.id

        # grab first structure that references this one
        ok = x.first_to(sid, 0)
        if not ok:
            return ()

        # continue collecting all structures that references this one
        res = [(x.frm,x.iscode,x.type)]
        while x.next_to():
            res.append((x.frm,x.iscode,x.type))

        # convert refs into a list of OREFs
        refs = [ interface.OREF(xrfrom, xriscode, interface.ref_t.of(xrtype)) for xrfrom, xriscode, xrtype in res ]

        # return as a tuple
        return map(utils.compose(operator.itemgetter(0), instance), refs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号