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

Consolidate datastore with fallbacks logic #19869

Conversation

adfoster-r7
Copy link
Contributor

@adfoster-r7 adfoster-r7 commented Feb 9, 2025

Consolidate datastore with fallbacks logic now that it has been enabled for multiple months it is safe to remove the previous implementation.

Verification

  • Ensure CI passes

@adfoster-r7 adfoster-r7 force-pushed the consolidate-datastore-with-fallbacks-logic branch from 7d724b8 to 783742e Compare February 9, 2025 16:46
@adfoster-r7 adfoster-r7 force-pushed the consolidate-datastore-with-fallbacks-logic branch from 783742e to 8e9c144 Compare February 9, 2025 20:26
@sjanusz-r7 sjanusz-r7 self-assigned this Feb 10, 2025
@@ -24,7 +24,7 @@ class MetasploitModule < Msf::Auxiliary
def run_host(ip)
print_status("Running for #{ip}...")
rhost = datastore.delete('RHOST')
datastore.remove_option('RHOST') if self.datastore.is_a?(Msf::DataStoreWithFallbacks)
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these necessary? Or would it be OK to remove these remove_option calls as the line below will overwrite potential RHOST values?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Options are different to values; this was added for this bug fix where the datastore wasn't a Msf::DataStoreWithFallbacks instance: #17792

Let me know if I've misunderstood though

Copy link
Contributor

@sjanusz-r7 sjanusz-r7 left a comment

Choose a reason for hiding this comment

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

Works as expected locally, passing CI and works when used in Pro 👍

@adfoster-r7 adfoster-r7 merged commit 9396e1c into rapid7:master Feb 10, 2025
61 checks passed
@adfoster-r7 adfoster-r7 deleted the consolidate-datastore-with-fallbacks-logic branch February 10, 2025 19:10
@adfoster-r7 adfoster-r7 added rn-fix release notes fix rn-enhancement release notes enhancement and removed rn-fix release notes fix labels Feb 10, 2025
@adfoster-r7
Copy link
Contributor Author

Release Notes

Removes the datastore_fallbacks feature flag and the corresponding code now that it is enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn-enhancement release notes enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants