本文整理汇总了Python中idaapi.UI_Hooks方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.UI_Hooks方法的具体用法?Python idaapi.UI_Hooks怎么用?Python idaapi.UI_Hooks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idaapi
的用法示例。
在下文中一共展示了idaapi.UI_Hooks方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __start_ida__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [as 别名]
def __start_ida__(cls):
api = [
('idp', idaapi.IDP_Hooks),
('idb', idaapi.IDB_Hooks),
('ui', idaapi.UI_Hooks),
]
# Create an alias so we save typing 19 chars..
priorityhook = internal.interface.priorityhook
for attr, hookcls in api:
# Attach a priority hooking queue to an instance of IDA's hooks
instance = priorityhook(hookcls)
# Explicitly assign the priority instance into our object
if not hasattr(cls, attr):
setattr(cls, attr, instance)
# Now we can enable all the hooks so the user can use them
instance.hook()
return
示例2: __init__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [as 别名]
def __init__(self, cc):
idaapi.UI_Hooks.__init__(self)
self.cc = cc
self.selected_icon_number = idaapi.load_custom_icon(config['icons_path'] + "icons8-asterisk-24.png")
示例3: idaview_hooks
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [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
示例4: __init__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [as 别名]
def __init__(self):
idaapi.UI_Hooks.__init__(self)
示例5: __init__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [as 别名]
def __init__(self):
idaapi.UI_Hooks.__init__(self)
self.popups = []
示例6: __init__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [as 别名]
def __init__(self, plugin):
self.plugin = plugin
idaapi.UI_Hooks.__init__(self)
示例7: _create_hooks
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import UI_Hooks [as 别名]
def _create_hooks(self, install_idabuddy):
class InstallerUiHooks(idaapi.UI_Hooks):
def updating_actions(self, ctx):
if ctx.form_type == idaapi.BWN_DISASM:
ida_widget = form_to_widget(ctx.form)
idaview = ida_widget.children()[0]
install_idabuddy(idaview)
return super(InstallerUiHooks, self).updating_actions(ctx)
return InstallerUiHooks()