本文整理汇总了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
示例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
示例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))
示例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))
示例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))
示例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))
示例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)
示例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
示例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)
示例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)
示例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()
示例12: OnSelectLine
# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def OnSelectLine(self, n):
idc.jumpto(int(self.items[n][0], 16))
示例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
示例14: OnSelectLine
# 需要导入模块: import idc [as 别名]
# 或者: from idc import jumpto [as 别名]
def OnSelectLine(self, n):
self.selcount += 1
idc.jumpto(self.items[n][0])
示例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()