用python编写第一个IDA插件的实例
作者:笛在月明 时间:2022-01-09 13:05:14
IDA插件是经过编译的、功能更强大的IDC脚本,与仅仅使用脚本相比,插件能够执行更加复杂的任务。与编写IDC脚本相比,python显得更为轻巧和强大,IDAPython作为IDA的一个插件,具有IDA SDK的大部分功能,能够帮助我们编写实现IDC脚本语言所有功能的python脚本。
本文将以一个简单的例子开始展示如何使用python编写并安装一个IDA插件。
1、编写插件文件msg.py
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()
2、将msg.py文件置于IDADIR/plugins目录,修改IDADIR/plugins/plugins.cfg文件,将plug_name 值设置为IDA菜单栏显示的菜单,plugin_file值设为msg.py文件全称,记得带上扩展名,否则是系统默认的.plw或.p64,保存后重启IDA即可。
来源:https://blog.csdn.net/iqqiqqiqqiqq/article/details/52243659
标签:python,IDA,插件
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
聊聊golang的defer的使用
2023-07-21 13:15:02
SQL事务用法begin tran,commit tran和rollback tran的用法
2012-01-05 18:58:51
网站的视觉路径和版式设计
2008-04-15 14:35:00
![](https://img.aspxhome.com/file/UploadPic/20084/15/2008415144523556s.jpg)
关于WARNING:Ignoring invalid distribution -pencv-python....警告信息的处理方法(已解决!)
2021-01-14 18:14:28
![](https://img.aspxhome.com/file/2023/7/65517_0s.png)
PHP PDOStatement::bindValue讲解
2023-06-14 11:16:02
Windows下对MySQL安装的故障诊断与排除
2008-12-17 16:50:00
利用MySQL加密函数保护Web网站敏感数据
2008-12-17 16:11:00
Oracle8i和Microsoft SQL Server比较
2010-07-26 13:05:00
python机器学习MATLAB最小二乘法的两种解读
2022-02-19 08:00:11
![](https://img.aspxhome.com/file/2023/1/66001_0s.png)
Python实现方便使用的级联进度信息实例
2021-04-22 12:31:18
php中Ctype函数用法详解
2023-06-19 01:43:13
Go语言string,int,int64 ,float之间类型转换方法
2023-06-28 15:20:30
Python图像处理之图像的灰度线性变换
2021-12-16 22:30:58
![](https://img.aspxhome.com/file/2023/7/65977_0s.png)
Python爬虫自动化爬取b站实时弹幕实例方法
2023-03-21 04:45:42
使用MySQL数据库的23个注意事项
2010-03-18 15:46:00
数据库查询的分页优化技巧
2009-05-17 10:31:00
python 中yaml文件用法大全
2021-11-30 08:02:29
![](https://img.aspxhome.com/file/2023/4/65964_0s.png)
浅析DW4中的站点管理
2007-02-03 11:40:00
![](https://img.aspxhome.com/file/uploadpic/20072/20072311403769.gif)
基于OpenCV(python)的实现文本分割之垂直投影法
2023-11-17 08:45:39
![](https://img.aspxhome.com/file/2023/9/64319_0s.png)
教你如何利用SQL Server保护数据
2010-06-07 14:18:00