forked from p34709852/monkey
Island: Simplify _get_exploit_counts()
This commit is contained in:
parent
06439d92f9
commit
9e7e58658c
|
@ -18,11 +18,7 @@ def _get_exploit_counts(exploited: List[Dict]) -> Dict:
|
|||
exploit_counts = {}
|
||||
|
||||
for node in exploited:
|
||||
exploits = node["exploits"]
|
||||
for exploit in exploits:
|
||||
if exploit in exploit_counts:
|
||||
exploit_counts[exploit] += 1
|
||||
else:
|
||||
exploit_counts[exploit] = 1
|
||||
for exploit in node["exploits"]:
|
||||
exploit_counts[exploit] = exploit_counts.get(exploit, 0) + 1
|
||||
|
||||
return exploit_counts
|
||||
|
|
Loading…
Reference in New Issue