Correct an issue where launched exploits only used saved configurations

This commit is contained in:
HD Moore
2012-03-26 22:43:33 -05:00
committed by James Lee
parent f797bb5d1b
commit f4f8187eee
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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.
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
#
+1 -1
View File
@@ -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)