Skip to content

Instantly share code, notes, and snippets.

@psifertex
Last active April 7, 2022 15:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save psifertex/fed7be71db9ec29b052c6ebd8c15d68a to your computer and use it in GitHub Desktop.
Save psifertex/fed7be71db9ec29b052c6ebd8c15d68a to your computer and use it in GitHub Desktop.
copy types from one open binary ninja tab to another
#copy types -- cannot be run as a snippet. Copy into console switch tabs, run again
if 'saved_types' in globals() or 'saved_types' in locals():
log_info("Adding types...")
for t in saved_types:
bv.define_user_type(t[0], t[1])
del saved_types
else:
log_info("Copying types...")
saved_types = [ (x, bv.types[x]) for x in bv.type_names if not bv.is_type_auto_defined(x) ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment