From eb9c4de0e63070bdf6c3cf802b4445ea55fee3ae Mon Sep 17 00:00:00 2001 From: Aaron Sedlacek Date: Thu, 3 Aug 2017 19:47:21 -0400 Subject: [PATCH] update for ida_script.py to handle ida 7.0 (#308) * fix for ida 7.0 * using idaapi.save_database instead, change version cmp from == to >= --- ida_script.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ida_script.py b/ida_script.py index 07de59525..1e9e4c40c 100644 --- a/ida_script.py +++ b/ida_script.py @@ -20,7 +20,10 @@ idaapi.autoWait() dt = datetime.datetime.now().isoformat().replace(':', '-') # Save the database so nothing gets lost. -idc.SaveBase(idc.GetIdbPath() + '.' + dt) +if idaapi.IDA_SDK_VERSION >= 700: + idaapi.save_database(idc.GetIdbPath() + '.' + dt) +else: + idc.SaveBase(idc.GetIdbPath() + '.' + dt) xmlrpclib.Marshaller.dispatch[type(0L)] = lambda _, v, w: w("%d" % v) xmlrpclib.Marshaller.dispatch[type(0)] = lambda _, v, w: w("%d" % v)