[ida]使用pycharm编写IDApython
使用pycharm来编写IDApython
一、导入IDApython的模块
IDA目录下有一个Python目录,将其添加到项目的跟目录下。
放到python项目目录下
修改文件夹属性,否则会出现引用报错
二、配置python2.7解释器
使用IDA中自带的python解释器(免安装版都会打包python解释器,现在很少使用 2.x 版本了)
三、测试代码
可以正常编写
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))
相关推荐
NANGEBOKE 2020-11-23
wuguangbin0 2020-11-17
shuhaojie 2020-11-17
skyplay0 2020-11-17
BigYellow 2020-11-16
shuhaojie 2020-08-16
NANGEBOKE 2020-08-15
mmwalker 2020-08-11
wuguangbin0 2020-07-18
vshacker 2020-07-05
jameslaughing 2020-07-04
jameslaughing 2020-07-04
maoyongfan 2020-06-28
hanxia 2020-06-27
无缘公子 2020-06-18
NANGEBOKE 2020-06-15