forked from p15670423/monkey
fix
This commit is contained in:
parent
0d4e28b55b
commit
29fac1a960
|
@ -763,13 +763,16 @@ class PassTheHashMap(object):
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def GetAttackersByVictim(self, victim):
|
def GetAttackersByVictim(self, victim):
|
||||||
|
if type(victim) != unicode:
|
||||||
|
victim = victim.monkey_guid
|
||||||
|
|
||||||
attackers = set()
|
attackers = set()
|
||||||
|
|
||||||
for atck, vic, _ in self.edges:
|
for atck, vic, _ in self.edges:
|
||||||
if vic == victim:
|
if vic == victim:
|
||||||
attackers.add(atck)
|
attackers.add(atck)
|
||||||
|
|
||||||
return attackers
|
return set(map(Machine, attackers))
|
||||||
|
|
||||||
@cache
|
@cache
|
||||||
def GetVictimsByAttacker(self, attacker):
|
def GetVictimsByAttacker(self, attacker):
|
||||||
|
|
Loading…
Reference in New Issue