From d15d5acf01ded806bea77963c816587e9fca5ed8 Mon Sep 17 00:00:00 2001 From: Bambu Date: Sat, 20 Aug 2016 09:46:46 -0400 Subject: Fixed small python bugs Found a couple of simple bugs with the __init__.py * mangledName is returned when it should be mangled_name * perform_decode() should return self.perform_encode() * indirect_branches() is redefined with the exact same code --- python/__init__.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'python') diff --git a/python/__init__.py b/python/__init__.py index b88c5beb..0f57f651 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -4342,16 +4342,6 @@ class Function(object): core.BNFreeAddressList(addrs) return result - @property - def indirect_branches(self): - count = ctypes.c_ulonglong() - branches = core.BNGetIndirectBranches(self.handle, count) - result = [] - for i in xrange(0, count.value): - result.append(IndirectBranchInfo(Architecture(branches[i].sourceArch), branches[i].sourceAddr, Architecture(branches[i].destArch), branches[i].destAddr, branches[i].autoDefined)) - core.BNFreeIndirectBranchList(branches) - return result - @property def low_level_il(self): """Function low level IL (read-only)""" @@ -8201,7 +8191,7 @@ class Transform: def perform_decode(self, data, params): if self.type == "InvertingTransform": - return perform_encode(data, params) + return self.perform_encode(data, params) return None def perform_encode(self, data, params): @@ -9852,7 +9842,7 @@ def demangle_ms(arch, mangled_name): for i in xrange(outSize.value): names.append(outName[i]) return (Type(handle), names) - return (None, mangledName) + return (None, mangled_name) _output_to_log = False def redirect_output_to_log(): -- cgit v1.3.1