Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing delay/jitter adjustment in python agent (#764) #765

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.0] - 2024-12-14

- Reduce the check-in tests that were adding an unncessary amount of time to the CI
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
Loading