Skip to content

Commit

Permalink
Fix many bugs in brancher service
Browse files Browse the repository at this point in the history
  • Loading branch information
rvantonder authored Oct 16, 2017
1 parent 65af9f3 commit 8a4ac56
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plugins/bap/utils/ida.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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([
Expand Down

0 comments on commit 8a4ac56

Please sign in to comment.