fix payload datastore merge
fix the way we merge the payload datastore in so the options actually takebug/bundler_fix
parent
606232828f
commit
74b3a00035
|
@ -288,9 +288,9 @@ module Msf
|
||||||
payload_datastore = payload_module.datastore
|
payload_datastore = payload_module.datastore
|
||||||
|
|
||||||
# Set The RHOST or LHOST for the payload
|
# Set The RHOST or LHOST for the payload
|
||||||
if payload_datastore.key? "LHOST"
|
if payload_datastore.has_key? "LHOST"
|
||||||
payload_datastore['LHOST'] = host
|
payload_datastore['LHOST'] = host
|
||||||
elsif payload_datastore.key? "RHOST"
|
elsif payload_datastore.has_key? "RHOST"
|
||||||
payload_datastore['RHOST'] = host
|
payload_datastore['RHOST'] = host
|
||||||
else
|
else
|
||||||
print_error "Could not determine how to set Host on this payload..."
|
print_error "Could not determine how to set Host on this payload..."
|
||||||
|
@ -298,9 +298,9 @@ module Msf
|
||||||
end
|
end
|
||||||
|
|
||||||
# Set the RPORT or LPORT for the payload
|
# Set the RPORT or LPORT for the payload
|
||||||
if payload_datastore.key? "LPORT"
|
if payload_datastore.has_key? "LPORT"
|
||||||
payload_datastore['LPORT'] = port
|
payload_datastore['LPORT'] = port
|
||||||
elsif payload_datastore.key? "RPORT"
|
elsif payload_datastore.has_key? "RPORT"
|
||||||
payload_datastore['RPORT'] = port
|
payload_datastore['RPORT'] = port
|
||||||
else
|
else
|
||||||
print_error "Could not determine how to set Port on this payload..."
|
print_error "Could not determine how to set Port on this payload..."
|
||||||
|
@ -321,7 +321,7 @@ module Msf
|
||||||
'ExitOnSession' => exit_on_session,
|
'ExitOnSession' => exit_on_session,
|
||||||
'RunAsJob' => true
|
'RunAsJob' => true
|
||||||
}
|
}
|
||||||
handler_opts.reverse_merge!(payload_datastore)
|
handler.datastore.reverse_merge!(payload_datastore)
|
||||||
|
|
||||||
# Launch our Handler and get the Job ID
|
# Launch our Handler and get the Job ID
|
||||||
handler.exploit_simple(handler_opts)
|
handler.exploit_simple(handler_opts)
|
||||||
|
|
Loading…
Reference in New Issue