From c6cc26af85cf4b1cede5833f61299da429ba76e2 Mon Sep 17 00:00:00 2001 From: Peter LaFosse Date: Tue, 29 Jan 2019 23:33:25 -0500 Subject: Add short alises for low_level_il (llil) and medium_level_il (mlil) --- python/lowlevelil.py | 16 ++++++++++++++++ python/mediumlevelil.py | 10 ++++++++++ 2 files changed, 26 insertions(+) (limited to 'python') diff --git a/python/lowlevelil.py b/python/lowlevelil.py index 6cc2c642..c3f6963a 100644 --- a/python/lowlevelil.py +++ b/python/lowlevelil.py @@ -553,6 +553,10 @@ class LowLevelILInstruction(object): return None return binaryninja.mediumlevelil.MediumLevelILInstruction(self.function.medium_level_il, expr) + @property + def mlil(self): + return self.medium_level_il + @property def mapped_medium_level_il(self): """Gets the mapped medium level IL expression corresponding to this expression""" @@ -561,6 +565,10 @@ class LowLevelILInstruction(object): return None return binaryninja.mediumlevelil.MediumLevelILInstruction(self.function.mapped_medium_level_il, expr) + @property + def mmlil(self): + return self.mapped_medium_level_il + @property def value(self): """Value of expression if constant or a known value (read-only)""" @@ -812,6 +820,10 @@ class LowLevelILFunction(object): return None return binaryninja.mediumlevelil.MediumLevelILFunction(self.arch, result, self.source_function) + @property + def mlil(self): + return self.medium_level_il + @property def mapped_medium_level_il(self): """Medium level IL with mappings between low level IL and medium level IL. Unused stores are not removed. @@ -822,6 +834,10 @@ class LowLevelILFunction(object): return None return binaryninja.mediumlevelil.MediumLevelILFunction(self.arch, result, self.source_function) + @property + def mmlil(self): + return self.mapped_medium_level_il + def __setattr__(self, name, value): try: object.__setattr__(self, name, value) diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py index 90b73e7f..a6867c60 100644 --- a/python/mediumlevelil.py +++ b/python/mediumlevelil.py @@ -386,6 +386,11 @@ class MediumLevelILInstruction(object): return None return lowlevelil.LowLevelILInstruction(self.function.low_level_il.ssa_form, expr) + @property + def llil(self): + """Alias for low_level_il""" + return self.low_level_il + @property def ssa_memory_version(self): """Version of active memory contents in SSA form for this instruction""" @@ -693,6 +698,11 @@ class MediumLevelILFunction(object): return None return lowlevelil.LowLevelILFunction(self.arch, result, self.source_function) + @property + def llil(self): + """Alias for low_level_il""" + return self.low_level_il + def __setattr__(self, name, value): try: object.__setattr__(self, name, value) -- cgit v1.3.1