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


Python idc.jumpto方法代码示例

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


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

示例1: activate

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [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

示例2: callback

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def callback(self, event, *args):
        if event == idaapi.hxe_populating_popup:
            form, phandle, vu = args
            if vu.item.citype == idaapi.VDI_FUNC or (vu.item.citype == idaapi.VDI_EXPR and vu.item.e.is_expr() and vu.item.e.type.is_funcptr()):
                idaapi.attach_action_to_popup(form, phandle, ACTION_HX_REMOVERETTYPE, None)
        elif event == idaapi.hxe_double_click:
            vu, shift_state = args
            # auto jump to target if clicked item is xxx->func();
            if vu.item.citype == idaapi.VDI_EXPR and vu.item.e.is_expr():
                expr = idaapi.tag_remove(vu.item.e.print1(None))
                if "->" in expr:
                    # find target function
                    name = expr.split("->")[-1]
                    addr = idc.get_name_ea_simple(name)
                    if addr == idaapi.BADADDR:
                        # try class::function
                        e = vu.item.e
                        while e.x:
                            e = e.x
                        addr = idc.get_name_ea_simple("%s::%s" % (str(e.type).split()[0], name))

                    if addr != idaapi.BADADDR:
                        idc.jumpto(addr)
                        return 1
        return 0 
开发者ID:L4ys,项目名称:LazyIDA,代码行数:27,代码来源:LazyIDA.py

示例3: on_find_menu

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def on_find_menu(self, point):
        m = QtWidgets.QMenu(self.ui.findView)
        def delete():
            model = self.ui.findView.model()
            for i in self.ui.findView.selectedIndexes():
                model.removeRow(i.row())
        def jumpto():
            global _idangr_ctx
            model = self.ui.findView.model()
            sel = self.ui.findView.selectedIndexes()
            if len(sel) > 0:
                idc.jumpto(_idangr_ctx.find[sel[0].row()])
        m.addAction('Jump to', jumpto)
        m.addAction('Delete', delete)
        m.exec_(self.ui.findView.viewport().mapToGlobal(point)) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:17,代码来源:main_gui.py

示例4: on_avoid_menu

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def on_avoid_menu(self, point):
        m = QtWidgets.QMenu(self.ui.avoidView)
        def delete():
            model = self.ui.avoidView.model()
            for i in self.ui.avoidView.selectedIndexes():
                model.removeRow(i.row())
        def jumpto():
            global _idangr_ctx
            model = self.ui.avoidView.model()
            sel = self.ui.avoidView.selectedIndexes()
            if len(sel) > 0:
                idc.jumpto(_idangr_ctx.avoid[sel[0].row()])
        m.addAction('Jump to', jumpto)
        m.addAction('Delete', delete)
        m.exec_(self.ui.avoidView.viewport().mapToGlobal(point)) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:17,代码来源:main_gui.py

示例5: on_regs_menu

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def on_regs_menu(self, point):
        global _idangr_ctx
        m = QtWidgets.QMenu(self.ui.regsView)
        def delete():
            model = self.ui.regsView.model()
            for i in self.ui.regsView.selectedIndexes():
                _idangr_ctx.simregs.pop(i.row())
            self.ui.regsView.model().layoutChanged.emit()
        def jumpto():
            model = self.ui.regsView.model()
            sel = self.ui.regsView.selectedIndexes()
            if len(sel) > 0:
                try:
                    addr = int(_idangr_ctx.simregs[sel[0].row()][2], 16)
                    idc.jumpto(addr)
                except:
                    pass
        def copyval():
            model = self.ui.regsView.model()
            sel = self.ui.regsView.selectedIndexes()
            if len(sel) > 0:
                cb = QtWidgets.QApplication.clipboard()
                cb.clear(mode=cb.Clipboard)
                cb.setText(_idangr_ctx.simregs[sel[0].row()][2], mode=cb.Clipboard)
        def set_constr():
            model = self.ui.regsView.model()
            sel = self.ui.regsView.selectedIndexes()
            if len(sel) > 0:
                item = _idangr_ctx.simregs[sel[0].row()][0]
                IDAngrConstraintsDialog.go(item)    
        m.addAction('Jump to', jumpto)
        m.addAction('Copy value', copyval)
        m.addAction('Set constraints', set_constr)
        m.addAction('Delete', delete)
        m.exec_(self.ui.regsView.viewport().mapToGlobal(point)) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:37,代码来源:main_gui.py

示例6: on_mem_menu

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def on_mem_menu(self, point):
        global _idangr_ctx
        m = QtWidgets.QMenu(self.ui.memoryView)
        def delete():
            model = self.ui.memoryView.model()
            for i in self.ui.memoryView.selectedIndexes():
                _idangr_ctx.simmem.pop(i.row())
            self.ui.memoryView.model().layoutChanged.emit()
        def jumpto():
            model = self.ui.memoryView.model()
            sel = self.ui.memoryView.selectedIndexes()
            if len(sel) > 0:
                idc.jumpto(int(_idangr_ctx.simmem[sel[0].row()][0], 16))
        def copyval():
            model = self.ui.memoryView.model()
            sel = self.ui.memoryView.selectedIndexes()
            if len(sel) > 0:
                cb = QtWidgets.QApplication.clipboard()
                cb.clear(mode=cb.Clipboard)
                cb.setText(_idangr_ctx.simmem[sel[0].row()][2], mode=cb.Clipboard)
        def set_constr():
            model = self.ui.memoryView.model()
            sel = self.ui.memoryView.selectedIndexes()
            if len(sel) > 0:
                item = int(_idangr_ctx.simmem[sel[0].row()][0], 16)
                IDAngrConstraintsDialog.go(item)
        m.addAction('Jump to', jumpto)
        m.addAction('Copy value', copyval)
        m.addAction('Set constraints', set_constr)
        m.addAction('Delete', delete)
        m.exec_(self.ui.memoryView.viewport().mapToGlobal(point)) 
开发者ID:andreafioraldi,项目名称:IDAngr,代码行数:33,代码来源:main_gui.py

示例7: _onSignatureTreeItemDoubleClicked

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def _onSignatureTreeItemDoubleClicked(self, item, column):
        """Action for the double clicked.

        Arguments:
            item (QTreeWidgetItem): Item that was clicked.
            column (int): Selected column.
        """
        # Jump to the match address

        if item.data(1, 0):
            addr = int(item.data(2, 0), 16)
            idc.jumpto(addr) 
开发者ID:AirbusCyber,项目名称:grap,代码行数:14,代码来源:CryptoIdentificationWidget.py

示例8: OnDblClick

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def OnDblClick(self, node_id):
        address = self[node_id][3]
        if address is not None:
            idc.jumpto(address)
        return True 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:7,代码来源:bingraph.py

示例9: jump_on_click

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def jump_on_click(self):
        chunk_addr = self.get_chunk_address()
        if chunk_addr is None:
            idaapi.warning("Invalid address / expression")
            return
        idc.jumpto(chunk_addr) 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:8,代码来源:chunk.py

示例10: jmp_to_selected_chunk

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def jmp_to_selected_chunk(self):
        chunk_addr = self.get_selected_chunk_addr()
        if chunk_addr:
            idc.jumpto(chunk_addr) 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:6,代码来源:bins.py

示例11: context_menu

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def context_menu(self, position):
        sender = self.sender()
        menu = QtWidgets.QMenu()
        
        copy_action = menu.addAction("Copy value")
        copy_row = menu.addAction("Copy row")
        view_chunk = menu.addAction("View chunk")
        jump_to = menu.addAction("Jump to")
        graphview_action = menu.addAction("GraphView")

        action = menu.exec_(sender.mapToGlobal(position))
        fd_addr = int(sender.item(sender.currentRow(), 3).text(), 16)
       
        if action == copy_action:
            sender.copy_selected_value()

        if action == copy_row:
            sender.copy_selected_row()

        elif action == jump_to:
            idc.jumpto(fd_addr)

        elif action == view_chunk:
            self.show_selected_chunk()

        elif action == graphview_action:
            idx = int(sender.item(sender.currentRow(), 0).text())
            size = int(sender.item(sender.currentRow(), 1).text(), 16)
            fd = int(sender.item(sender.currentRow(), 3).text(), 16)

            graph = BinGraph(self, info={
                'type': 'tcache',
                'bin_id': idx,
                'size': size,
            })
            graph.Show() 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:38,代码来源:bins.py

示例12: OnSelectLine

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def OnSelectLine(self, n):
        idc.jumpto(int(self.items[n][0], 16)) 
开发者ID:L4ys,项目名称:LazyIDA,代码行数:4,代码来源:LazyIDA.py

示例13: OnSelectLine

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def OnSelectLine(self, n):
        self.selcount += 1
        ea = int(self.items[n][0], 16)
        idc.jumpto(ea)
        if DEBUG:
            print('[{}] jump to {addr:#010x}'.format(NAME, addr=ea))
        return n 
开发者ID:yeggor,项目名称:UEFI_RETool,代码行数:9,代码来源:prot_explorer.py

示例14: OnSelectLine

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def OnSelectLine(self, n):
        self.selcount += 1
        idc.jumpto(self.items[n][0]) 
开发者ID:polymorf,项目名称:findcrypt-yara,代码行数:5,代码来源:findcrypt3.py

示例15: context_menu

# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def context_menu(self, position):
        sender = self.sender()
        menu = QtWidgets.QMenu()

        show_warn_info = None
        
        copy_action = menu.addAction("Copy value")
        copy_row = menu.addAction("Copy row")
        view_chunk = menu.addAction("View chunk")
        jump_to = menu.addAction("Jump to chunk")
        jump_to_u = menu.addAction("Jump to user-data")
        goto_caller = menu.addAction("Jump to caller")

        current_row = self.sender().currentRow()
        if current_row in self.row_info:
            show_warn_info = menu.addAction("Show warning info")

        chunk_addr = int(sender.item(sender.currentRow(), 1).text(), 16)
        action = menu.exec_(sender.mapToGlobal(position))
       
        if action == copy_action:
            sender.copy_selected_value()

        if action == copy_row:
            sender.copy_selected_row()

        elif action == jump_to:
            idc.jumpto(chunk_addr - (config.ptr_size*2))

        elif action == jump_to_u:
            idc.jumpto(chunk_addr)

        elif action == goto_caller:
            caller_str = str(sender.item(sender.currentRow(), 6).text())
            if caller_str:
                idc.jumpto(str2ea(caller_str))

        elif action == view_chunk:
            self.view_selected_chunk()

        elif show_warn_info and action == show_warn_info:
            self.traced_double_clicked() 
开发者ID:danigargu,项目名称:heap-viewer,代码行数:44,代码来源:tracer.py


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