Skip to content

Commit 8b56286

Browse files
committed
Try to require 'metasploit/credential' when including Metasploit::Credential::Creation
MSP-12529 By convention, the top-level require of any gem should always be required before trying to use any inner require.
1 parent 7442aa1 commit 8b56286

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/metasploit/framework/require.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,15 @@ def self.optionally_active_record_railtie
5959
end
6060
end
6161

62-
# Tries to `require 'metasploit/credential/creation'` and include it in the `including_module`.
62+
# Tries to `require 'metasploit/credential'` and include `Metasploit::Credential::Creation` in the
63+
# `including_module`.
6364
#
6465
# @param including_module [Module] `Class` or `Module` that wants to `include Metasploit::Credential::Creation`.
6566
# @return [void]
6667
def self.optionally_include_metasploit_credential_creation(including_module)
6768
optionally(
68-
'metasploit/credential/creation',
69-
"metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for #{including_module.name}",
69+
'metasploit/credential',
70+
"metasploit-credential not in the bundle, so Metasploit::Credential creation will fail for #{including_module.name}"
7071
) do
7172
including_module.send(:include, Metasploit::Credential::Creation)
7273
end

0 commit comments

Comments
 (0)