Pass the framework instance to exec module shims
parent
d2ed78570a
commit
230e36f5f0
|
@ -2,8 +2,8 @@
|
||||||
require 'msf/core/modules/external'
|
require 'msf/core/modules/external'
|
||||||
|
|
||||||
class Msf::Modules::External::Shim
|
class Msf::Modules::External::Shim
|
||||||
def self.generate(module_path)
|
def self.generate(module_path, framework)
|
||||||
mod = Msf::Modules::External.new(module_path)
|
mod = Msf::Modules::External.new(module_path, framework: framework)
|
||||||
return '' unless mod.meta
|
return '' unless mod.meta
|
||||||
case mod.meta['type']
|
case mod.meta['type']
|
||||||
when 'remote_exploit'
|
when 'remote_exploit'
|
||||||
|
|
|
@ -85,7 +85,7 @@ class Msf::Modules::Loader::Executable < Msf::Modules::Loader::Base
|
||||||
return ''
|
return ''
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
content = Msf::Modules::External::Shim.generate(full_path)
|
content = Msf::Modules::External::Shim.generate(full_path, @module_manager.framework)
|
||||||
if content
|
if content
|
||||||
return content
|
return content
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue