summaryrefslogtreecommitdiff
path: root/python/examples/arch_hook.py
diff options
context:
space:
mode:
authorJordan Wiens <jordan@psifertex.com>2018-03-04 18:08:04 -0500
committerRyan Snyder <ryan@vector35.com>2018-07-10 18:11:08 -0400
commit8849fb2b2b8dc824bd3f17ce1026a04856477a94 (patch)
treee85f3db97d6d6b5fa2a21162c684fd08d47e4ab0 /python/examples/arch_hook.py
parent8028bd325bc94a385f99122d87ac906ba717ecbf (diff)
working division, prints, and metaclasses, but imports broken, still needs work
Diffstat (limited to 'python/examples/arch_hook.py')
-rw-r--r--python/examples/arch_hook.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/python/examples/arch_hook.py b/python/examples/arch_hook.py
deleted file mode 100644
index 452bd2b6..00000000
--- a/python/examples/arch_hook.py
+++ /dev/null
@@ -1,16 +0,0 @@
-from binaryninja.architecture import Architecture, ArchitectureHook
-
-class X86ReturnHook(ArchitectureHook):
- def get_instruction_text(self, data, addr):
- # Call the original implementation's method by calling the superclass
- result, length = super(X86ReturnHook, self).get_instruction_text(data, addr)
-
- # Patch the name of the 'retn' instruction to 'ret'
- if len(result) > 0 and result[0].text == 'retn':
- result[0].text = 'ret'
-
- return result, length
-
-# Install the hook by constructing it with the desired architecture to hook, then registering it
-X86ReturnHook(Architecture['x86']).register()
-