Created
April 10, 2020 21:52
-
-
Save RobinDavid/f5a90846dd39e8366a7282408269d097 to your computer and use it in GitHub Desktop.
IDA Pro iteratively restore all snapshots
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ida_kernwin | |
import ida_loader | |
ss = ida_loader.snapshot_t() | |
ida_loader.build_snapshot_tree(ss) | |
ccs = list(ss.children) | |
def callback(param1, param2): | |
if param2 is not None: | |
print("Restoration done for:", param2) | |
if ccs: # there is still snapshot to iter | |
c = ccs.pop(0) | |
print("Start restoration of: ", c.id) | |
ida_kernwin.restore_database_snapshot(c, callback, c.id) | |
callback(None, None) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment