I want to generate call graph from Ida pro but I want to do it automatically. I wrote these two scripts but they did not work. Could you help me what is the problem?
1:
#include ida.idc;
#include idc.idc;
static main()
{
cur = MinEA()
end = MaxEA()
auto str_gdlpath;
str_gdlpath = GetIdbPath();
str_gdlpath = substr(str_gdlpath,0,strlen(str_gdlpath)-4)+".gdl";
GenCallGdl(str_gdlpath, "Call Gdl",cur, end, CHART_WINGRAPH);
Message("Gdl file have been saved to %s",str_gdlpath);
}
2:
#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);
}
The command I am using to run is:
./idal -c -A -Sgdlscript.idc test.exe
Is it possible to do this in IDAPython too?