Correct an issue where launched exploits only used saved configurations
This commit is contained in:
@@ -44,7 +44,7 @@ module Auxiliary
|
||||
|
||||
# Clone the module to prevent changes to the original instance
|
||||
mod = omod.replicant
|
||||
Msf::Simple::Framework.simplify_module(mod)
|
||||
Msf::Simple::Framework.simplify_module( mod, false )
|
||||
|
||||
# Import options from the OptionStr or Option hash.
|
||||
mod._import_extra_options(opts)
|
||||
|
||||
@@ -60,7 +60,7 @@ module Exploit
|
||||
|
||||
# Clone the module to prevent changes to the original instance
|
||||
exploit = oexploit.replicant
|
||||
Msf::Simple::Framework.simplify_module( exploit )
|
||||
Msf::Simple::Framework.simplify_module( exploit, false )
|
||||
|
||||
|
||||
# Import options from the OptionStr or Option hash.
|
||||
|
||||
@@ -136,12 +136,12 @@ module Framework
|
||||
# Simplifies a module instance if the type is supported by extending it
|
||||
# with the simplified module interface.
|
||||
#
|
||||
def self.simplify_module(instance)
|
||||
def self.simplify_module(instance, load_saved_config = true)
|
||||
if ((ModuleSimplifiers[instance.type]) and
|
||||
(instance.class.include?(ModuleSimplifiers[instance.type]) == false))
|
||||
instance.extend(ModuleSimplifiers[instance.type])
|
||||
|
||||
instance.init_simplified
|
||||
instance.init_simplified(load_saved_config)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -32,8 +32,8 @@ module Module
|
||||
#
|
||||
# Initializes the simplified interface.
|
||||
#
|
||||
def init_simplified
|
||||
load_config
|
||||
def init_simplified(load_saved_config=true)
|
||||
load_config if load_saved_config
|
||||
end
|
||||
|
||||
#
|
||||
|
||||
@@ -40,7 +40,7 @@ module Post
|
||||
|
||||
# Clone the module to prevent changes to the original instance
|
||||
mod = omod.replicant
|
||||
Msf::Simple::Framework.simplify_module( mod )
|
||||
Msf::Simple::Framework.simplify_module( mod, false )
|
||||
|
||||
# Import options from the OptionStr or Option hash.
|
||||
mod._import_extra_options(opts)
|
||||
|
||||
Reference in New Issue
Block a user