fix payload datastore merge

fix the way we merge the payload datastore in so
the options actually take
bug/bundler_fix
David Maloney 2016-12-07 14:04:42 -06:00
parent 606232828f
commit 74b3a00035
No known key found for this signature in database
GPG Key ID: DEDBA9DC3A913DB2
1 changed files with 5 additions and 5 deletions

View File

@ -288,9 +288,9 @@ module Msf
payload_datastore = payload_module.datastore
# Set The RHOST or LHOST for the payload
if payload_datastore.key? "LHOST"
if payload_datastore.has_key? "LHOST"
payload_datastore['LHOST'] = host
elsif payload_datastore.key? "RHOST"
elsif payload_datastore.has_key? "RHOST"
payload_datastore['RHOST'] = host
else
print_error "Could not determine how to set Host on this payload..."
@ -298,9 +298,9 @@ module Msf
end
# Set the RPORT or LPORT for the payload
if payload_datastore.key? "LPORT"
if payload_datastore.has_key? "LPORT"
payload_datastore['LPORT'] = port
elsif payload_datastore.key? "RPORT"
elsif payload_datastore.has_key? "RPORT"
payload_datastore['RPORT'] = port
else
print_error "Could not determine how to set Port on this payload..."
@ -321,7 +321,7 @@ module Msf
'ExitOnSession' => exit_on_session,
'RunAsJob' => true
}
handler_opts.reverse_merge!(payload_datastore)
handler.datastore.reverse_merge!(payload_datastore)
# Launch our Handler and get the Job ID
handler.exploit_simple(handler_opts)