使用pycharm来编写IDApythonpython
1、导入IDApython的模块api
IDA目录下有一个Python目录,将其添加到项目的跟目录下。python2.7
放到python项目目录下测试
修改文件夹属性,不然会出现引用报错spa
二、配置python2.7解释器code
使用IDA中自带的python解释器(免安装版都会打包python解释器,如今不多使用 2.x 版本了)blog
3、测试代码pycharm
能够正常编写io
from idautils import * from idaapi import * from idc import * funcs = Functions() for f in funcs: name = Name(f) end = GetFunctionAttr(f,FUNCATTR_END) locals = GetFunctionAttr(f,FUNCATTR_FRSIZE) frame = GetFrame(f) if frame is None: continue ret = GetMemberOffset(frame, " r") if ret == -1: continue firstArg = ret + 4 args = GetStrucSize(frame) - firstArg Message("Function: %s,starts at %x, ends at %x\n" % (name,f,end)) Message(" Local variable area is %d bytes\n" % locals) Message(" Arguments occupy %d bytes (%d args)\n" % (args, args/4))