Always clone modules before running them via the simplified wrappers.
This prevents changes to the datastore or instance variables from being carried over into a second rununstable
parent
d9788db7bb
commit
9975d5a220
|
@ -42,6 +42,9 @@ module Auxiliary
|
||||||
#
|
#
|
||||||
def self.run_simple(mod, opts = {})
|
def self.run_simple(mod, opts = {})
|
||||||
|
|
||||||
|
# Clone the module to prevent changes to the original instance
|
||||||
|
mod = mod.replicant
|
||||||
|
|
||||||
# Import options from the OptionStr or Option hash.
|
# Import options from the OptionStr or Option hash.
|
||||||
mod._import_extra_options(opts)
|
mod._import_extra_options(opts)
|
||||||
|
|
||||||
|
|
|
@ -58,6 +58,9 @@ module Exploit
|
||||||
# Trap and print errors here (makes them UI-independent)
|
# Trap and print errors here (makes them UI-independent)
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
# Clone the module to prevent changes to the original instance
|
||||||
|
exploit = exploit.replicant
|
||||||
|
|
||||||
# Import options from the OptionStr or Option hash.
|
# Import options from the OptionStr or Option hash.
|
||||||
exploit._import_extra_options(opts)
|
exploit._import_extra_options(opts)
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@ module Payload
|
||||||
#
|
#
|
||||||
def self.generate_simple(payload, opts)
|
def self.generate_simple(payload, opts)
|
||||||
|
|
||||||
|
# Clone the module to prevent changes to the original instance
|
||||||
|
payload = payload.replicant
|
||||||
|
|
||||||
# Import any options we may need
|
# Import any options we may need
|
||||||
payload._import_extra_options(opts)
|
payload._import_extra_options(opts)
|
||||||
framework = payload.framework
|
framework = payload.framework
|
||||||
|
|
|
@ -38,6 +38,9 @@ module Post
|
||||||
#
|
#
|
||||||
def self.run_simple(mod, opts = {})
|
def self.run_simple(mod, opts = {})
|
||||||
|
|
||||||
|
# Clone the module to prevent changes to the original instance
|
||||||
|
mod = mod.replicant
|
||||||
|
|
||||||
# Import options from the OptionStr or Option hash.
|
# Import options from the OptionStr or Option hash.
|
||||||
mod._import_extra_options(opts)
|
mod._import_extra_options(opts)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue