Skip to content

Commit 9396e1c

Browse files
authored
Merge pull request rapid7#19869 from adfoster-r7/consolidate-datastore-with-fallbacks-logic
Consolidate datastore with fallbacks logic
2 parents d96d980 + 8e9c144 commit 9396e1c

File tree

27 files changed

+373
-890
lines changed

27 files changed

+373
-890
lines changed

docs/metasploit-framework.wiki/How-to-use-datastore-options.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ OptSomething.new(option_name, [boolean, description, value, *enums*], aliases: *
8686
options](#Filtering-datastore-options) section for more information.
8787
* **fallbacks** *optional*, *key-word only* An array of names that will be used as a fallback if the main option name is
8888
defined by the user. This is useful in the scenario of wanting specialised option names such as `SMBUser`, but to also
89-
support gracefully checking a list of more generic fallbacks option names such as `Username`. This functionality is
90-
currently behind a feature flag, set with `features set datastore_fallbacks true` in msfconsole
89+
support gracefully checking a list of more generic fallbacks option names such as `Username`.
9190

9291
Now let's talk about what classes are available:
9392

lib/msf/base/serializer/readable_text.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ def self.options_table(missing, mod, options, indent)
623623
)
624624
options.sort_by(&:name).each do |opt|
625625
name = opt.name
626-
if mod.datastore.is_a?(Msf::DataStoreWithFallbacks)
626+
if mod.datastore.is_a?(Msf::DataStore)
627627
val = mod.datastore[name]
628628
else
629629
val = mod.datastore[name].nil? ? opt.default : mod.datastore[name]

0 commit comments

Comments
 (0)