diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2016-09-13 18:24:02 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2016-09-13 18:25:04 -0400 |
| commit | 11d6f78e43e0f305be43aeb8fc75d9d6733e508a (patch) | |
| tree | ab47f3aefcbc295971adef788e27fe50ce466cb9 /python/examples/instruction-iterator.py | |
| parent | b398b6a0a8683ae844e6b61389d02317f53a252e (diff) | |
rename files to allow them to be imported
Diffstat (limited to 'python/examples/instruction-iterator.py')
| -rw-r--r-- | python/examples/instruction-iterator.py | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/python/examples/instruction-iterator.py b/python/examples/instruction-iterator.py deleted file mode 100644 index 43bc000e..00000000 --- a/python/examples/instruction-iterator.py +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env python - -import sys -try: - import binaryninja -except ImportError: - sys.path.append("/Applications/Binary Ninja.app/Contents/Resources/python/") - import binaryninja -import time - -if sys.platform.lower().startswith("linux"): - bintype="ELF" -elif sys.platform.lower() == "darwin": - bintype="Mach-O" -else: - raise Exception, "%s is not supported on this plugin" % sys.platform - -if len(sys.argv) > 1: - target = sys.argv[1] -else: - target = "/bin/ls" - -bv = binaryninja.BinaryViewType[bintype].open(target) -bv.update_analysis_and_wait() - -print "-------- %s --------" % target -print "START: 0x%x" % bv.start -print "ENTRY: 0x%x" % bv.entry_point -print "ARCH: %s" % bv.arch.name -print "\n-------- Function List --------" - -""" print all the functions, their basic blocks, and their il instructions """ -for func in bv.functions: - print repr(func) - for block in func.low_level_il: - print "\t{0}".format(block) - - for insn in block: - print "\t\t{0}".format(insn) - - -""" print all the functions, their basic blocks, and their mc instructions """ -for func in bv.functions: - print repr(func) - for block in func: - print "\t{0}".format(block) - - for insn in block: - print "\t\t{0}".format(insn) |
