def do_export():
db = {}
module = idaapi.get_root_filename().lower()
base = idaapi.get_imagebase()
file = AskFile(1, "x64dbg database|%s" % get_file_mask(),
"Export database")
if not file:
return
print "Exporting database %s" % file
db["labels"] = [{
"text": name,
"manual": False,
"module": module,
"address": "0x%X" % (ea - base)
} for (ea, name) in Names()]
print "%d label(s) exported" % len(db["labels"])
db["comments"] = [{
"text": comment.replace("{", "{{").replace("}", "}}"),
"manual": False,
"module": module,
"address": "0x%X" % (ea - base)
} for (ea, comment) in Comments()]
print "%d comment(s) exported" % len(db["comments"])
db["breakpoints"] = [{
"address": "0x%X" % (ea - base),
"enabled": True,
"type": bptype,
"titantype": "0x%X" % titantype,
"oldbytes": "0x%X" % oldbytes,
"module": module,
} for (ea, bptype, titantype, oldbytes) in Breakpoints()]
print "%d breakpoint(s) exported" % len(db["breakpoints"])
with open(file, "w") as outfile:
json.dump(db, outfile, indent=1)
print "Exported database. Done!"
# 1) Create the handler class
评论列表
文章目录