标签:blog http io for ar 2014 art div
//枚举函数调用 // #include <idc.idc> static main() { auto func,end,target,inst,name,flags,xref; flags = SEARCH_DOWN | SEARCH_NEXT; func = GetFunctionAttr(ScreenEA(),FUNCATTR_START); if(func != -1) { name = Name(func); end = GetFunctionAttr(func,FUNCATTR_END); for(inst = func; inst < end; inst = FindCode(inst,flags)) { for(target = Rfirst(inst) ; target != BADADDR; target = Rnext(inst,target)) //Rfirst取得第一个对它的代码的调用 { xref = XrefType(); //这个程序中只是对调用其它函数的交叉引用感兴趣,所以只关注fl_CN和fl_CF类型的交叉引用 if(xref == fl_CN || xref == fl_CF) { Message("%s calls %s from 0x%x\n",name,Name(target),inst); } } } } else { Warning("No function found at location %x",ScreenEA()); } }
结果如下:
标签:blog http io for ar 2014 art div
原文地址:http://www.cnblogs.com/M-Mr/p/3926372.html