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


Python idaapi.get_screen_ea方法代码示例

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


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

示例1: _onFuncButtonClicked

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def _onFuncButtonClicked(self):
        if not self.cc.PatternGenerator.graph.graph:
            print("WARNING: Unloaded CFG. Make sure to first \"Load the CFG\"")
            return

        ea = idaapi.get_screen_ea()
        if ea:
            func = idaapi.ida_funcs.get_func(ea)
            if func:
                if self.cc.PatternGenerator.rootNode is None:
                    print("[I] Adding root node as function entrypoint: %x", func.start_ea)
                    self.cc.PatternGenerator.setRootNode(func.start_ea)

                print("[I] Adding nodes to cover whole function")
                flowchart = idaapi.FlowChart(func)
                for bb in flowchart:
                    last_inst_addr = idc.prev_head(bb.end_ea)
                    self.cc.PatternGenerator.addTargetNode(last_inst_addr)

                self._render_if_real_time() 
开发者ID:AirbusCyber,项目名称:grap,代码行数:22,代码来源:PatternGenerationWidget.py

示例2: activate

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def activate(self, ctx):
        if self.action == ACTION_HX_REMOVERETTYPE:
            vdui = idaapi.get_widget_vdui(ctx.widget)
            self.remove_rettype(vdui)
            vdui.refresh_ctext()
        elif self.action == ACTION_HX_COPYEA:
            ea = idaapi.get_screen_ea()
            if ea != idaapi.BADADDR:
                copy_to_clip("0x%X" % ea)
                print("Address 0x%X has been copied to clipboard" % ea)
        elif self.action == ACTION_HX_COPYNAME:
            name = idaapi.get_highlight(idaapi.get_current_viewer())[0]
            if name:
                copy_to_clip(name)
                print("%s has been copied to clipboard" % name)
        elif self.action == ACTION_HX_GOTOCLIP:
            loc = parse_location(clip_text())
            print("Goto location 0x%x" % loc)
            idc.jumpto(loc)
        else:
            return 0

        return 1 
开发者ID:L4ys,项目名称:LazyIDA,代码行数:25,代码来源:LazyIDA.py

示例3: activate

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def activate(self, ctx):
        global _idangr_ctx, _idangr_panel
        if self.action == "Find":
            addr = idaapi.get_screen_ea()
            if addr in _idangr_ctx.avoid:
                _idangr_ctx.avoid.remove(addr)
                _idangr_panel.remove_avoid(addr)
            if addr in _idangr_ctx.find:
                return
            _idangr_ctx.find.append(addr)
            _idangr_panel.add_find(addr)
        elif self.action == "Avoid":
            addr = idaapi.get_screen_ea()
            if addr in _idangr_ctx.find:
                _idangr_ctx.find.remove(addr)
                _idangr_panel.remove_find(addr)
            if addr in _idangr_ctx.avoid:
                return
            _idangr_ctx.avoid.append(addr)
            _idangr_panel.add_avoid(addr)
        elif self.action == "Symbolic":
            addr = idaapi.get_screen_ea()
            #if addr in _idangr_ctx.simmem:
            #    return
            m = IDAngrAddMemDialog.get_mem(addr)
            if m != None:
                _idangr_panel.add_mem(m[0], m[1])
                #_idangr_ctx.simmem.append(m) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:30,代码来源:main_gui.py

示例4: _onSetRootNode

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def _onSetRootNode(self):
        try:
            self.cc.PatternGenerator.setRootNode(idc.get_screen_ea())
        except:
            self.cc.PatternGenerator.setRootNode(idc.ScreenEA())

        self._render_if_real_time() 
开发者ID:AirbusCyber,项目名称:grap,代码行数:9,代码来源:PatternGenerationWidget.py

示例5: _onAddTargetNode

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def _onAddTargetNode(self):
        try:
            self.cc.PatternGenerator.addTargetNode(idc.get_screen_ea())
        except:
            self.cc.PatternGenerator.addTargetNode(idc.ScreenEA())

        self._render_if_real_time() 
开发者ID:AirbusCyber,项目名称:grap,代码行数:9,代码来源:PatternGenerationWidget.py

示例6: setMatchType

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def setMatchType(self, type):
        try:
            selection, begin, end = None, None, None
            err = idaapi.read_selection(selection, begin, end)
            if err and selection:
                for ea in range(begin, end+1):
                    self.cc.PatternGenerator.setMatchType(ea, type)
            else:
                self.cc.PatternGenerator.setMatchType(idc.get_screen_ea(), type)  
        except:
            self.cc.PatternGenerator.setMatchType(idc.ScreenEA(), type)

        self._render_if_real_time() 
开发者ID:AirbusCyber,项目名称:grap,代码行数:15,代码来源:PatternGenerationWidget.py

示例7: _onRemoveTargetNode

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def _onRemoveTargetNode(self):
        try:
            self.cc.PatternGenerator.removeTargetNode(idc.get_screen_ea())
        except:
            self.cc.PatternGenerator.removeTargetNode(idc.ScreenEA())

        self._render_if_real_time() 
开发者ID:AirbusCyber,项目名称:grap,代码行数:9,代码来源:PatternGenerationWidget.py

示例8: __init__

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def __init__(self, id_ea=None, bb=None, fc=None):
        if bb is None and fc is None:
            if id_ea is None:
                id_ea = idaapi.get_screen_ea()
            temp_codeblock = get_codeblock(id_ea)
            self.__dict__.update(temp_codeblock.__dict__)
        else:
            super(CodeBlock, self).__init__(id=id_ea, bb=bb, fc=fc) 
开发者ID:tmr232,项目名称:Sark,代码行数:10,代码来源:codeblock.py

示例9: get_flowchart

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def get_flowchart(ea=None):
    if ea is None:
        ea = idaapi.get_screen_ea()
    func = idaapi.get_func(ea)
    flowchart_ = FlowChart(func)
    return flowchart_ 
开发者ID:tmr232,项目名称:Sark,代码行数:8,代码来源:codeblock.py

示例10: get_codeblock

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def get_codeblock(ea=None):
    if ea is None:
        ea = idaapi.get_screen_ea()
    flowchart_ = get_flowchart(ea)
    for code_block in flowchart_:
        if code_block.start_ea == ea: # External blocks can be zero-sized.
            return code_block
        if code_block.start_ea <= ea < code_block.end_ea:
            return code_block 
开发者ID:tmr232,项目名称:Sark,代码行数:11,代码来源:codeblock.py

示例11: _pre_open_coverage_xref

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def _pre_open_coverage_xref(self):
        """
        Grab a contextual address before opening the coverage xref dialog.
        """
        self.open_coverage_xref(idaapi.get_screen_ea())

#------------------------------------------------------------------------------
# IDA UI Helpers
#------------------------------------------------------------------------------ 
开发者ID:gaasedelen,项目名称:lighthouse,代码行数:11,代码来源:ida_integration.py

示例12: get_current_address

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def get_current_address(self):
        return idaapi.get_screen_ea() 
开发者ID:gaasedelen,项目名称:lighthouse,代码行数:4,代码来源:ida_api.py

示例13: finish_populating_widget_popup

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def finish_populating_widget_popup(self, form, popup):
        form_type = idaapi.get_widget_type(form)

        if form_type == idaapi.BWN_DISASM or form_type == idaapi.BWN_DUMP:
            t0, t1, view = idaapi.twinpos_t(), idaapi.twinpos_t(), idaapi.get_current_viewer()
            if idaapi.read_selection(view, t0, t1) or idc.get_item_size(idc.get_screen_ea()) > 1:
                idaapi.attach_action_to_popup(form, popup, ACTION_XORDATA, None)
                idaapi.attach_action_to_popup(form, popup, ACTION_FILLNOP, None)
                for action in ACTION_CONVERT:
                    idaapi.attach_action_to_popup(form, popup, action, "Convert/")

        if form_type == idaapi.BWN_DISASM and (ARCH, BITS) in [(idaapi.PLFM_386, 32),
                                                               (idaapi.PLFM_386, 64),
                                                               (idaapi.PLFM_ARM, 32),]:
            idaapi.attach_action_to_popup(form, popup, ACTION_SCANVUL, None) 
开发者ID:L4ys,项目名称:LazyIDA,代码行数:17,代码来源:LazyIDA.py

示例14: ScreenEA

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def ScreenEA(): 
	return idaapi.get_screen_ea() 
开发者ID:daenerys-sre,项目名称:source,代码行数:4,代码来源:idc.py

示例15: here

# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import get_screen_ea [as 别名]
def here(): 
	return idaapi.get_screen_ea() 
开发者ID:daenerys-sre,项目名称:source,代码行数:4,代码来源:idc.py


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