本文整理汇总了Python中idaapi.attach_action_to_popup方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.attach_action_to_popup方法的具体用法?Python idaapi.attach_action_to_popup怎么用?Python idaapi.attach_action_to_popup使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idaapi
的用法示例。
在下文中一共展示了idaapi.attach_action_to_popup方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _inject_ctx_actions
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def _inject_ctx_actions(self, view, popup, view_type):
"""
Inject context menu entries into IDA's right click menus.
NOTE: This is only being used for coverage xref at this time, but
may host additional actions in the future.
"""
if view_type == idaapi.BWN_DISASMS:
idaapi.attach_action_to_popup(
view,
popup,
self.ACTION_COVERAGE_XREF, # The action ID (see above)
"Xrefs graph from...", # Relative path of where to add the action
idaapi.SETMENU_APP # We want to append the action after ^
)
示例2: callback
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [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: register_menu_actions
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def register_menu_actions(form):
widget = form.GetWidget()
for action in form.menu_actions:
act_name = action.name
if act_name != '-':
act_name = "%s:%s" % (PLUGIN_NAME, action.name)
idaapi.register_action(
idaapi.action_desc_t(
act_name,
action.title,
ActionHandler(form, action),
action.shortcut,
action.tooltip,
action.icon
)
)
if action.checkable is not None:
idaapi.update_action_checkable(act_name, True)
idaapi.update_action_checked(act_name, action.checkable)
idaapi.attach_action_to_popup(widget, None, act_name)
# -----------------------------------------------------------------------
示例4: finish_populating_widget_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_widget_popup(form, popup):
if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
idaapi.attach_action_to_popup(
form,
popup,
VTGrepBytes.get_name(),
'VirusTotal/'
)
idaapi.attach_action_to_popup(
form,
popup,
VTGrepWildcards.get_name(),
'VirusTotal/',
)
idaapi.attach_action_to_popup(
form,
popup,
VTGrepWildCardsStrict.get_name(),
'VirusTotal/',
)
idaapi.attach_action_to_popup(
form,
popup,
VTGrepWildCardsFunction.get_name(),
'VirusTotal/',
)
elif idaapi.get_widget_type(form) == idaapi.BWN_STRINGS:
idaapi.attach_action_to_popup(
form,
popup,
VTGrepStrings.get_name(),
'VirusTotal/')
示例5: finish_populating_tform_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_tform_popup(form, popup):
idaapi.attach_action_to_popup(form, popup, "Find", "IDAngr/")
idaapi.attach_action_to_popup(form, popup, "Avoid", "IDAngr/")
idaapi.attach_action_to_popup(form, popup, "Symbolic", "IDAngr/")
示例6: finish_populating_tform_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_tform_popup(self, form, popup):
# TODO - Attach to the functions view.
# if idaapi.get_tform_type(form) == idaapi.BWN_FUNCS:
# idaapi.attach_action_to_popup(
# form, popup, "my:disasmsaction", None)
# Attach to the disassembler view only
if idaapi.get_tform_type(form) == idaapi.BWN_DISASMS:
idaapi.attach_action_to_popup(
form, popup, "my:disasmsaction", None)
idaapi.attach_action_to_popup(
form, popup, "my:disasmtracker", None)
idaapi.attach_action_to_popup(
form, popup, "my:invalidatecache", None)
示例7: _attach_to_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def _attach_to_popup(self, action_name):
idaapi.attach_action_to_popup(self.GetTCustomControl(), None, action_name)
示例8: idaview_hooks
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def idaview_hooks(idaview_handler):
class Hooks(idaapi.UI_Hooks):
def finish_populating_widget_popup(self, form, popup):
if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
idaapi.attach_action_to_popup(form, popup, idaview_handler.get_name(), "")
return Hooks
示例9: finish_populating_widget_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_widget_popup(self, form, popup):
# Or here, after the popup is done being populated by its owner.
if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
idaapi.attach_action_to_popup(form, popup, ShowXrefsGraphFrom.get_name(), '')
idaapi.attach_action_to_popup(form, popup, ShowXrefsGraphTo.get_name(), '')
示例10: finish_populating_widget_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_widget_popup(self, form, popup):
# Or here, after the popup is done being populated by its owner.
if idaapi.get_widget_type(form) == idaapi.BWN_DISASM:
idaapi.attach_action_to_popup(form, popup, MarkReachableNodesHandler.get_name(), "Mark/")
idaapi.attach_action_to_popup(form, popup, MarkUnReachableNodesHandler.get_name(), "Mark/")
idaapi.attach_action_to_popup(form, popup, MarkReachingNodesHandler.get_name(), "Mark/")
idaapi.attach_action_to_popup(form, popup, MarkNotReachingNodesHandler.get_name(), "Mark/")
idaapi.attach_action_to_popup(form, popup, MarkExits.get_name(), "Mark/")
idaapi.attach_action_to_popup(form, popup, MarkClearHandler.get_name(), "Mark/")
示例11: finish_populating_widget_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_widget_popup(self, form, popup):
idaapi.attach_action_to_popup(form, popup, 'my:expand', None)
idaapi.attach_action_to_popup(form, popup, 'my:translate', None)
示例12: finish_populating_widget_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_widget_popup(self, form, popup):
idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_loose_yara", "mkYARA/")
idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_normal_yara", "mkYARA/")
idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_strict_yara", "mkYARA/")
idaapi.attach_action_to_popup(form, popup, "mkYARA:generate_data_yara", "mkYARA/")
示例13: finish_populating_widget_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [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)
示例14: finish_populating_tform_popup
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def finish_populating_tform_popup(self, form, popup):
#formtype = idaapi.get_tform_type(form)
#if formtype == idaapi.BWN_DISASM or idaapi.BWN_DUMP:
for action, position, condition in self.popups:
if condition(form):
idaapi.attach_action_to_popup(form, popup, action, position)
示例15: cb
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import attach_action_to_popup [as 别名]
def cb(event, *args):
if event == ida_hexrays.hxe_populating_popup:
widget, phandle, vu = args
res = idaapi.attach_action_to_popup(vu.ct, None, ACTION_NAME)
return 0