Skip to content

Commit

Permalink
Enable Metasploit Payloads file warning messages by default
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanusz-r7 committed Dec 14, 2023
1 parent a4ffd03 commit ff6db7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/msf/core/feature_manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FeatureManager
name: METASPLOIT_PAYLOAD_WARNINGS,
description: 'When enabled Metasploit will output warnings about missing Metasploit payloads, for instance if they were removed by antivirus etc',
requires_restart: true,
default_value: false,
default_value: true,
developer_notes: 'Planned for default enablement in: Metasploit 6.4.x'
}.freeze,
{
Expand Down
8 changes: 7 additions & 1 deletion lib/msf/ui/console/driver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,13 @@ def on_startup(opts = {})

run_single("banner") unless opts['DisableBanner']

payloads_manifest_errors = framework.features.enabled?(::Msf::FeatureManager::METASPLOIT_PAYLOAD_WARNINGS) ? ::MetasploitPayloads.manifest_errors : []
payloads_manifest_errors = []
begin
payloads_manifest_errors = ::MetasploitPayloads.manifest_errors if framework.features.enabled?(::Msf::FeatureManager::METASPLOIT_PAYLOAD_WARNINGS)
rescue ::StandardError => e
$stderr.print('Could not verify the integrity of the Metasploit Payloads manifest')
elog(e)
end

av_warning_message if (framework.eicar_corrupted? || payloads_manifest_errors.any?)

Expand Down

0 comments on commit ff6db7f

Please sign in to comment.