From 8a4ac562adc99f02e4e5d8b2698c59d8a236d446 Mon Sep 17 00:00:00 2001 From: Rijnard van Tonder Date: Mon, 16 Oct 2017 10:25:47 -0400 Subject: [PATCH] Fix many bugs in brancher service --- plugins/bap/utils/ida.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/bap/utils/ida.py b/plugins/bap/utils/ida.py index 97e3c59..bb710d0 100644 --- a/plugins/bap/utils/ida.py +++ b/plugins/bap/utils/ida.py @@ -89,7 +89,7 @@ def output_branches(out): for addr in addresses(): succs = Succs(addr) if succs.jmps: - out.write('{}\n'.format(succs.dumps)) + out.write('{}\n'.format(succs.dumps())) def set_color(addr, color): @@ -125,13 +125,13 @@ def prototypes(): return list(types) -def Succs(object): +class Succs(object): def __init__(self, addr): self.addr = addr self.dests = set(idautils.CodeRefsFrom(addr, True)) self.jmps = set(idautils.CodeRefsFrom(addr, False)) - falls = self.succs - self.dests - self.fall = falls[0] if falls else None + falls = self.dests - self.jmps + self.fall = list(falls)[0] if falls else None def dumps(self): return ''.join([