Skip to content

Commit

Permalink
Fixing delay/jitter adjustment in python agent (#764) (#765)
Browse files Browse the repository at this point in the history
  • Loading branch information
janit0rjoe authored Jan 12, 2025
1 parent ed7fcf6 commit b9a2d98
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

- Fix delay/jitter adjustment in python agent (@janit0rjoe)

## [5.12.1] - 2025-01-08

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion empire/server/core/agent_task_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def create_task_update_sleep(
db,
agent,
"TASK_CMD_WAIT",
f"global delay; global jitter; delay={delay}; jitter={jitter}; print('delay/jitter set to {delay}/{jitter}')",
f"global agent; agent.delay={delay}; agent.jitter={jitter}; print('delay/jitter set to {delay}/{jitter}')",
user_id=user_id,
)
if agent.language == "csharp":
Expand Down
1 change: 1 addition & 0 deletions empire/server/data/agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@ def dynamic_code_execute_wait_nosave(self, data, result_id):
Task 100
"""
try:
globals().update({'agent':self})
buffer = StringIO()
sys.stdout = buffer
code_obj = compile(data, "<string>", "exec")
Expand Down

0 comments on commit b9a2d98

Please sign in to comment.