当前位置: 首页>>代码示例>>Python>>正文


Python Misc.iter_disasm方法代码示例

本文整理汇总了Python中jarvis.core.helpers.Misc.iter_disasm方法的典型用法代码示例。如果您正苦于以下问题:Python Misc.iter_disasm方法的具体用法?Python Misc.iter_disasm怎么用?Python Misc.iter_disasm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jarvis.core.helpers.Misc的用法示例。


在下文中一共展示了Misc.iter_disasm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: find_imm_compares

# 需要导入模块: from jarvis.core.helpers import Misc [as 别名]
# 或者: from jarvis.core.helpers.Misc import iter_disasm [as 别名]
    def find_imm_compares(self):
        """
        Find all immediate compares in the current function.
        Very useful when debugging parsers, for example.
        @return: list of tuples [(address, disassembly),...]
        """
        cmp_addr = []

        for addr, dis in misc.iter_disasm():
            if "cmp" in dis:
                if GetOpType(addr, 1) == o_imm: # 5: immediate value
                    cmp_addr.append((addr, dis))

        return cmp_addr
开发者ID:h0wl,项目名称:JARVIS,代码行数:16,代码来源:BinaryAnalysis.py

示例2: calls_in_function

# 需要导入模块: from jarvis.core.helpers import Misc [as 别名]
# 或者: from jarvis.core.helpers.Misc import iter_disasm [as 别名]
    def calls_in_function(self, unique = True):
        """
        Find calls within current function
        Execution transfer like jmp sub_xxx included
        @return: a list of tuples [(addr, dis)]
        """

        callees = []

        for addr, dis in misc.iter_disasm():
            if is_call_insn(addr) or misc.is_external_jmp(addr):
                if dis not in callees:
                    callees.append((addr, dis))

        return callees
开发者ID:carlosgprado,项目名称:JARVIS,代码行数:17,代码来源:BinaryAnalysis.py

示例3: comments_in_function

# 需要导入模块: from jarvis.core.helpers import Misc [as 别名]
# 或者: from jarvis.core.helpers.Misc import iter_disasm [as 别名]
    def comments_in_function(self):
        """
        Searches the current function for IDA generated annotations
        Useful when dealing with large functions doing lots of logging
        @return: a list of tuples [(addr, comment)]
        """
        comments = []

        for addr, dis in misc.iter_disasm():
            comm = Comment(addr)
            # Comment returns None if no comment
            if comm:
                comments.append((addr, comm))

        return comments
开发者ID:carlosgprado,项目名称:JARVIS,代码行数:17,代码来源:BinaryAnalysis.py

示例4: find_imm_compares

# 需要导入模块: from jarvis.core.helpers import Misc [as 别名]
# 或者: from jarvis.core.helpers.Misc import iter_disasm [as 别名]
    def find_imm_compares(self):
        """
        Find all immediate compares in the current function.
        Very useful when debugging parsers, for example.
        @return: list of tuples [(address, disassembly),...]
        """
        cmp_addr = []

        for addr, dis in misc.iter_disasm():
            if "cmp" in dis:
                if GetOpType(addr, 1) == o_imm:  # 5: immediate value
                    # If this is ASCII, display for convenience
                    v = GetOperandValue(addr, 1)
                    if v > 0x20 and v <0x7F:
                        msg = "{0} ({1})".format(addr, chr(v))
                    else:
                        msg = dis
                    cmp_addr.append((addr, msg))

        return cmp_addr
开发者ID:carlosgprado,项目名称:JARVIS,代码行数:22,代码来源:BinaryAnalysis.py


注:本文中的jarvis.core.helpers.Misc.iter_disasm方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。