本文整理汇总了Python中idaapi.plugin_t方法的典型用法代码示例。如果您正苦于以下问题:Python idaapi.plugin_t方法的具体用法?Python idaapi.plugin_t怎么用?Python idaapi.plugin_t使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类idaapi
的用法示例。
在下文中一共展示了idaapi.plugin_t方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import plugin_t [as 别名]
def __init__(self, path, **attrs):
# FIXME: go through all files in plugin/ and call PLUGIN_ENTRY() on each module
# this should return an idaapi.plugin_t.
# idaapi.plugin_t will contain an init, run, and term method.
# also, are some attributes to process:
# 'wanted_name' which is for idc.
# 'wanted_hotkey', which should be mapped to a keypress.
# 'comment' self-explanatory
# 'help' self-explanatory
# hotkey can be done by:
# idaapi.CompileLine('static myname() { RunPythonStateMent("CallSomePython()") }')
# idc.AddHotKey(module.wanted_hotkey, "myname")
# idaapi.require
pass
## ida's native api
示例2: __init__
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import plugin_t [as 别名]
def __init__(self, *args, **kwargs):
print("[IDASkins] {} by athre0z (zyantific.com) loaded!".format(
VERSION
))
QObject.__init__(self, *args, **kwargs)
idaapi.plugin_t.__init__(self)
# First start dialog.
self._settings = Settings()
if self._settings.first_start:
selection = QMessageBox.information(
qApp.activeWindow(),
"IDASkins: First start",
"IDASkins has detected that this is the first time you've started IDA with "
"the plugin installed. Select a theme now?",
QMessageBox.Yes | QMessageBox.No,
)
if selection == QMessageBox.Yes:
self.open_theme_selector()
self._settings.first_start = False
else:
# v2.0.0 used absolute pathes due to a bug.
# Fix settings from this particular version here.
theme_dir = self._settings.selected_theme_dir
if theme_dir and os.path.isabs(theme_dir):
print('[IDASkins] Updating buggy v2.0.0 theme path')
self._settings.selected_theme_dir = os.path.split(theme_dir)[-1]
self._theme_selector = None
self.apply_stylesheet_from_settings()
# Subscribe UI notifications.
self._ui_hooks = UiHooks()
self._ui_hooks.hook()
示例3: add_menus
# 需要导入模块: import idaapi [as 别名]
# 或者: from idaapi import plugin_t [as 别名]
def add_menus(self):
# To avoid creating multiple plugin_t instances
this = self
class StartHandler(idaapi.action_handler_t):
def __init__(self):
idaapi.action_handler_t.__init__(self)
def activate(self, ctx):
this.run()
return 1
def update(self, ctx):
return idaapi.AST_ENABLE_ALWAYS
act_name = '%s:start' % PLUGNAME
act_desc = idaapi.action_desc_t(
act_name, # The action name. Must be unique
PLUGNAME, # Action Text
StartHandler(), # Action handler
None, # Optional shortcut
'Start plugin', # Action tooltip
122 # Icon
)
idaapi.register_action(act_desc)
idaapi.attach_action_to_menu(
'Debugger/Debugger windows/',
act_name,
idaapi.SETMENU_APP
)