GenGdl File via IDC

要生成gdl文件可以使用idc脚本,也可以使用sdk的相关函数,但是函数使用比较复杂,其实是俺自己都没搞清楚那个东东该咋玩。丢银啊。 sad

相关的函数有两个:

// Generate a flow chart GDL file
// outfile - output file name. GDL extension will be used
// title - graph title
// ea1 - beginning of the area to flow chart
// ea2 - end of the area to flow chart. if ea2 == BADADDR
// then ea1 is treated as an address within a function.
// That function will be flow charted.
// flags - combination of CHART_... constants

success GenFuncGdl(string outfile, string title, long ea1, long ea2, long flags);

// Generate a function call graph GDL file
// outfile - output file name. GDL extension will be used
// title - graph title
// ea1 - beginning of the area to flow chart
// ea2 - end of the area to flow chart. if ea2 == BADADDR
// then ea1 is treated as an address within a function.
// That function will be flow charted.
// flags - combination of CHART_GEN_GDL, CHART_WINGRAPH, CHART_NOLIBFUNCS

success GenCallGdl(string outfile, string title, long flags);

简单测试代码:

#include <ida.idc>
#include <idc.idc>

static main()
{
auto str_gdlpath;
str_gdlpath = GetIdbPath();
str_gdlpath = substr(str_gdlpath,0,strlen(str_gdlpath)-4)+".gdl";
GenCallGdl(str_gdlpath, "Call Gdl", CHART_WINGRAPH);
Message("Gdl file have been saved to %s",str_gdlpath);
}

 

☆版权☆

* 网站名称:obaby@mars
* 网址:https://h4ck.org.cn/
* 个性:https://oba.by/
* 本文标题: 《GenGdl File via IDC》
* 本文链接:https://image.h4ck.org.cn/2012/03/3842
* 短链接:https://oba.by/?p=3842
* 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


You may also like

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注