diff --git a/lib/msf/core/feature_manager.rb b/lib/msf/core/feature_manager.rb index 3ab3865ae771..872087c35049 100644 --- a/lib/msf/core/feature_manager.rb +++ b/lib/msf/core/feature_manager.rb @@ -28,6 +28,7 @@ class FeatureManager MSSQL_SESSION_TYPE = 'mssql_session_type' LDAP_SESSION_TYPE = 'ldap_session_type' SHOW_SUCCESSFUL_LOGINS = 'show_successful_logins' + DISPLAY_MODULE_ACTION = 'display_module_action' DEFAULTS = [ { @@ -124,6 +125,13 @@ class FeatureManager requires_restart: false, default_value: true, developer_notes: 'Enabled in Metasploit 6.4.x' + }.freeze, + { + name: DISPLAY_MODULE_ACTION, + description: 'When enabled after using a module the current action and number of actions will be displayed', + requires_restart: false, + default_value: true, + developer_notes: 'Added as a feature so users can turn it off if they wish to reduce clutter in their terminal' }.freeze ].freeze diff --git a/lib/msf/ui/console/command_dispatcher/modules.rb b/lib/msf/ui/console/command_dispatcher/modules.rb index 29623abce971..e9b56120019d 100644 --- a/lib/msf/ui/console/command_dispatcher/modules.rb +++ b/lib/msf/ui/console/command_dispatcher/modules.rb @@ -905,6 +905,10 @@ def cmd_use(*args) print_status("No payload configured, defaulting to #{chosen_payload}") if chosen_payload end + if framework.features.enabled?(Msf::FeatureManager::DISPLAY_MODULE_ACTION) && mod.actions.size > 1 + print_status "Using action %grn#{mod.action.name}%clr - view all #{mod.actions.size} actions with the %grnshow actions%clr command" + end + mod.init_ui(driver.input, driver.output) end