首页
社区
课程
招聘
[求助]大家能跑通hex-rays的示例插件吗?
发表于: 2010-1-29 10:11 7152

[求助]大家能跑通hex-rays的示例插件吗?

2010-1-29 10:11
7152
第一个示例在IDA 5.2 下,hexrays.hpp修改下能编译通过,但是运行时报错:could not open output file ?A 。

然后我重新安装IDA 5.5 和相应的 hex-rays v1.1,hexrays.hpp用的是官网manual提供的sdk;上面写的版本号是v1.0,但我觉得它跟之前的hpp好大不同,应该是版本号忘了改了。

没报任何错就编译通过,让我惊喜若狂,但运行时发现有非法内存读取的错误。
google搜也没搜到相关内容,开发插件的人那么多,怎么可能就我发生错误呢?

[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课

收藏
免费 0
支持
分享
最新回复 (2)
雪    币: 200
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
2
i hope this helps - posted by me on exetools 2010-01-14:
the sdk published on the hex-rays website matches the last "official" release of the decompiler, which is v1.1.090612 at the time of this post.
the "warezd" training version features a newer decompiler build v1.1.090909 and unfortunately there were api-changes leading to crashes when calling "hx"-api-functions.

but there's still hope:
looking at the api-dispatcher switch-table in the disassembly of hexrays.plw the following trivial fix can be proposed:
/* snip */
/// Pointer to Hex-Rays decompiler dispatcher.
/// This variable must be instantiated by the plugin. It is initialized by init_hexrays_plugin().
extern hexdsp_t *hexdsp;

/// API call numbers
enum hexcall_t
{
unknown_begin,
unknown_end,
unknown_next,
unknown_prev,
unknown_first,
unknown_second,
unknown_find,
unknown_insert,
unknown_erase,
unknown_clear,
unknown_size,
unknown_free,
hx_user_cmts_begin,
hx_user_cmts_end,
hx_user_cmts_next,
hx_user_cmts_prev,
/* snip */

i didn't have the time to check all 202 api-calls but above fix seems to work well - atleast the example plugins load and do work as far as my quick testing goes ...

cheers,

dirkmill
2010-2-3 00:20
0
雪    币: 17
活跃值: (10)
能力值: ( LV2,RANK:10 )
在线值:
发帖
回帖
粉丝
3
多谢,例子已经跑通了
2010-2-12 21:03
0
游客
登录 | 注册 方可回帖
返回
//