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

Remove old Agent registration logic #2542

Merged
merged 12 commits into from
Nov 3, 2022

Conversation

shreyamalviya
Copy link
Contributor

@shreyamalviya shreyamalviya commented Nov 3, 2022

What does this PR do?

Fixes #2272
And removes other related, now unused, code

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by running an Agent and the Island and making sure nothing breaks

  • If applicable, add screenshots or log transcripts of the feature working

from common.network.network_utils import get_my_ip_addresses_legacy
from monkey_island.cc.models.monkey_ttl import MonkeyTtl, create_monkey_ttl_document
from monkey_island.cc.server_utils.consts import DEFAULT_MONKEY_TTL_EXPIRY_DURATION_IN_SECONDS


class Monkey(Document):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole file also should go. Instead of get_latest_modifytime we can just fetch the timestamp of the latest event

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am working on to see do we actually need the modifytime.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, maybe not. Removing Monkey would require more work, but we can certainly replace the get_latest_modifytime

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not touch that code in this PR since Ilija is working on it as part of #2507.

Copy link
Contributor

@VakarisZ VakarisZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove monkey/infection_monkey/control.py as well

Copy link
Contributor

@VakarisZ VakarisZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but fix vulture

@shreyamalviya shreyamalviya mentioned this pull request Nov 3, 2022
8 tasks
@shreyamalviya shreyamalviya merged commit 1ae6fd7 into develop Nov 3, 2022
@shreyamalviya shreyamalviya deleted the 2272-remove-old-agent-registration-logic branch November 3, 2022 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove old Monkey/Agent registration logic
3 participants