#include <loader.hpp>
#include <dbg.hpp>
#include <kernwin.hpp>
#include <name.hpp>
int idaapi IDAP_init(void)
{
if(inf.filetype != f_MACHO){ //检测文件类型
warning("Executable format must be MACHO,sorry.");
return PLUGIN_SKIP;
}
return PLUGIN_KEEP;
}
bool idaapi run(size_t arg)
{
msg("start run\n");
const char* funcs[] = {"_strcmp","_strlen",0};
for(int i = 0; i < get_segm_qty(); ++i){
segment_t* seg = getnseg(i);
if(seg->type == SEG_XTRN){
for(int n =0;funcs[n]!=0;n++){
ea_t bor = get_name_ea(seg->start_ea, funcs[n]); //根据名字查找地址
if(bor!=BADADDR){
xrefblk_t xb;
for(bool ok = xb.first_to(bor, XREF_FAR);
ok;
ida 插件学习(8) 查找某函数交叉引用
最新推荐文章于 2023-12-18 12:26:26 发布