[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))


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM