您的位置:首页 > 编程语言 > Python开发

idaPython编写插件

2015-09-21 20:55 1471 查看
最基本插件内容如下:(将其保存为*.py放到ida的plugins目录下即可)

from idaapi import *
class myIdaPlugin(plugin_t):
flags=0
wanted_name="my ida plugin"
wanted_hotkey="F1"
comment="my ida plugin"
help="Something helpful"
def init(self):
msg("Ida plugin init called.\n")
return PLUGIN_OK
def term(self):
msg("Ida plugin term called.\n")
def run(self,arg):
warning("Ida plugin run(%d) called.\n"%arg)
def PLUGIN_ENTRY():
return myIdaPlugin()


其中你只需要丰富run函数的功能即可。

idaPython函数包括三类:idaapi、idautils、idc。其中idaapi为ida sdk中的所有函数,你可以用这些开发强大的插件;idc为全部的idc函数,一般一个idc可能有几个idaapi函数构成,可以编写强大的脚本;idautils是idaPython功能高度集成的一套最常用函数。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: