本文整理匯總了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
)