Land #10367, Pass a framework instance to external module shims
commit
6d878a9bb6
|
@ -12,7 +12,7 @@ module Metasploit
|
|||
#
|
||||
|
||||
# Number of allowed threads when threads are counted in `after(:suite)` or `before(:suite)`
|
||||
EXPECTED_THREAD_COUNT_AROUND_SUITE = if ENV['REMOTE_DB'] then 2 else 1 end
|
||||
EXPECTED_THREAD_COUNT_AROUND_SUITE = 2
|
||||
|
||||
# `caller` for all Thread.new calls
|
||||
LOG_PATHNAME = Pathname.new('log/metasploit/framework/spec/threads/suite.log')
|
||||
|
@ -213,4 +213,4 @@ module Metasploit
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
require 'msf/core/modules/external'
|
||||
|
||||
class Msf::Modules::External::Shim
|
||||
def self.generate(module_path)
|
||||
mod = Msf::Modules::External.new(module_path)
|
||||
def self.generate(module_path, framework)
|
||||
mod = Msf::Modules::External.new(module_path, framework: framework)
|
||||
return '' unless mod.meta
|
||||
case mod.meta['type']
|
||||
when 'remote_exploit'
|
||||
|
|
|
@ -85,7 +85,7 @@ class Msf::Modules::Loader::Executable < Msf::Modules::Loader::Base
|
|||
return ''
|
||||
end
|
||||
begin
|
||||
content = Msf::Modules::External::Shim.generate(full_path)
|
||||
content = Msf::Modules::External::Shim.generate(full_path, @module_manager.framework)
|
||||
if content
|
||||
return content
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue