Python idc.jumpto() Examples
The following are 16
code examples of idc.jumpto().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
idc
, or try the search function
.
Example #1
Source File: LazyIDA.py From LazyIDA with MIT License | 6 votes |
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
Example #2
Source File: LazyIDA.py From LazyIDA with MIT License | 6 votes |
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
Example #3
Source File: main_gui.py From IDAngr with BSD 2-Clause "Simplified" License | 5 votes |
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))
Example #4
Source File: main_gui.py From IDAngr with BSD 2-Clause "Simplified" License | 5 votes |
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))
Example #5
Source File: main_gui.py From IDAngr with BSD 2-Clause "Simplified" License | 5 votes |
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))
Example #6
Source File: main_gui.py From IDAngr with BSD 2-Clause "Simplified" License | 5 votes |
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))
Example #7
Source File: CryptoIdentificationWidget.py From grap with MIT License | 5 votes |
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)
Example #8
Source File: bingraph.py From heap-viewer with GNU General Public License v3.0 | 5 votes |
def OnDblClick(self, node_id): address = self[node_id][3] if address is not None: idc.jumpto(address) return True
Example #9
Source File: chunk.py From heap-viewer with GNU General Public License v3.0 | 5 votes |
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)
Example #10
Source File: bins.py From heap-viewer with GNU General Public License v3.0 | 5 votes |
def jmp_to_selected_chunk(self): chunk_addr = self.get_selected_chunk_addr() if chunk_addr: idc.jumpto(chunk_addr)
Example #11
Source File: bins.py From heap-viewer with GNU General Public License v3.0 | 5 votes |
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()
Example #12
Source File: LazyIDA.py From LazyIDA with MIT License | 5 votes |
def OnSelectLine(self, n): idc.jumpto(int(self.items[n][0], 16))
Example #13
Source File: LazyIDA.py From LazyIDA with MIT License | 5 votes |
def activate(self, ctx): if self.action == ACTION_COPYEA: ea = idc.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_GOTOCLIP: loc = parse_location(clip_text()) if loc != idaapi.BADADDR: print("Goto location 0x%x" % loc) idc.jumpto(loc) return 1
Example #14
Source File: prot_explorer.py From UEFI_RETool with MIT License | 5 votes |
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
Example #15
Source File: findcrypt3.py From findcrypt-yara with BSD 3-Clause "New" or "Revised" License | 5 votes |
def OnSelectLine(self, n): self.selcount += 1 idc.jumpto(self.items[n][0])
Example #16
Source File: tracer.py From heap-viewer with GNU General Public License v3.0 | 4 votes |
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()