Skip to content

Commit

Permalink
Fix command modal for manual commands (#2668)
Browse files Browse the repository at this point in the history
* Fix command display modal for manual commands

Co-authored-by: Chris Lenk <[email protected]>
  • Loading branch information
argaudreau and clenk authored Oct 10, 2022
1 parent 62a22f2 commit 7873cad
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion app/api/v2/managers/operation_api_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ async def create_potential_link(self, operation_id: str, data: dict, access: Bas
file_svc=self.services['file_svc']))
executor = self.build_executor(data=data.pop('executor', {}), agent=agent)
ability = self.build_ability(data=data.pop('ability', {}), executor=executor)
link = Link.load(dict(command=encoded_command, paw=agent.paw, ability=ability, executor=executor,
link = Link.load(dict(command=encoded_command, plaintext_command=encoded_command, paw=agent.paw, ability=ability, executor=executor,
status=operation.link_status(), score=data.get('score', 0), jitter=data.get('jitter', 0),
cleanup=data.get('cleanup', 0), pin=data.get('pin', 0),
host=agent.host, deadman=data.get('deadman', False), used=data.get('used', []),
Expand Down
1 change: 0 additions & 1 deletion app/objects/secondclass/c_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ def is_valid_status(self, status):
def replace_origin_link_id(self):
decoded_cmd = self.decode_bytes(self.command)
self.command = self.encode_string(decoded_cmd.replace(self.RESERVED['origin_link_id'], self.id))
self.plaintext_command = decoded_cmd

def _emit_status_change_event(self, from_status, to_status):
event_svc = BaseService.get_service('event_svc')
Expand Down

0 comments on commit 7873cad

Please sign in to comment.