diff --git a/lib/msf/base/sessions/scriptable.rb b/lib/msf/base/sessions/scriptable.rb index 1a468f84af..d54f2634c5 100644 --- a/lib/msf/base/sessions/scriptable.rb +++ b/lib/msf/base/sessions/scriptable.rb @@ -84,7 +84,7 @@ module Scriptable original_exploit_datastore = self.exploit.datastore || {} copy_of_orig_exploit_datastore = original_exploit_datastore.clone # we don't want to inherit a couple things, like AutoRunScript's - to_neuter = ['AutoRunScript', 'InitialAutoRunScript', 'LPORT'] + to_neuter = %w{AutoRunScript InitialAutoRunScript LPORT TARGET} to_neuter.each do |setting| copy_of_orig_exploit_datastore.delete(setting) end