Skip to content

Commit

Permalink
Merge pull request #220 from Limmen/dev4
Browse files Browse the repository at this point in the history
emulation_attacker_action.py
  • Loading branch information
Limmen authored Aug 17, 2023
2 parents a5da184 + 61af3f7 commit d714325
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,9 @@ def __init__(self, id: EmulationAttackerActionId, name: str, cmds: List[str],
self.id = id
self.name = name
self.cmds = cmds
if self.cmds is None:
self.cmds = []
self.descr = descr
self.index = index
self.ips = ips
if self.ips is None:
self.ips = []
self.vulnerability = vulnerability
self.action_outcome = action_outcome
self.backdoor = backdoor
Expand Down Expand Up @@ -136,7 +132,7 @@ def to_dict(self) -> Dict[str, Any]:
:return: a dict representation of the object
"""
d = {}
d: Dict[str, Any] = {}
d["id"] = self.id
d["name"] = self.name
d["cmds"] = list(self.cmds)
Expand All @@ -146,7 +142,7 @@ def to_dict(self) -> Dict[str, Any]:
d["index"] = self.index
d["action_outcome"] = self.action_outcome
d["vulnerability"] = self.vulnerability
d["alt_cmds"] = list(self.alt_cmds)
d["alt_cmds"] = list(self.alt_cmds) if self.alt_cmds is not None else self.alt_cmds
d["backdoor"] = self.backdoor
d["execution_time"] = self.execution_time
d["ts"] = self.ts
Expand Down

0 comments on commit d714325

Please sign in to comment.