from idaapi import *
from idc import *
import os
#get data begin and end
dump_data_begin= AskAddr(0,'dump data begin')
dump_data_end = AskAddr(0,'dump data end')
#get data len
len = dump_data_end - dump_data_begin
#get dex data
dump_data = DbgRead(dump_data_begin,len)
#write the data to file
fd = open("c:\\dump_data",'wb')
fd.write(dump_data)
fd.close()
print "end"
一个在调试状态下dump内存的idapython小脚本