Land #18610, Enables Payloads File Warning
This PR enables the Metasploit Payload Warnings feature by default. When enabled Metasploit will output warnings about missing Metasploit payloads, for instance if they were removed by antivirus etc.
This commit is contained in:
@@ -53,7 +53,7 @@ module Msf
|
||||
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,
|
||||
{
|
||||
|
||||
@@ -377,7 +377,13 @@ class Driver < Msf::Ui::Driver
|
||||
|
||||
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?)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user