diff --git a/app/api/v2/managers/operation_api_manager.py b/app/api/v2/managers/operation_api_manager.py index 73d8beda9..e08ee9a8d 100644 --- a/app/api/v2/managers/operation_api_manager.py +++ b/app/api/v2/managers/operation_api_manager.py @@ -102,7 +102,7 @@ async def create_potential_link(self, operation_id: str, data: dict, access: Bas ability = self.build_ability(data=data.pop('ability', {}), executor=executor) for hook, fcall in executor.HOOKS.items(): await fcall(ability, executor) - encoded_command = self._encode_string(agent.replace(self._encode_string(executor.command), + encoded_command = self._encode_string(agent.replace(self._encode_string(data['executor']['command']), file_svc=self.services['file_svc'])) 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),