Skip to content

Commit 74b3a00

Browse files
David MaloneyDavid Maloney
authored andcommitted
fix payload datastore merge
fix the way we merge the payload datastore in so the options actually take
1 parent 6062328 commit 74b3a00

File tree

1 file changed

+5
-5
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+5
-5
lines changed

lib/msf/ui/console/command_dispatcher/jobs.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -288,19 +288,19 @@ def cmd_handler(*args)
288288
payload_datastore = payload_module.datastore
289289

290290
# Set The RHOST or LHOST for the payload
291-
if payload_datastore.key? "LHOST"
291+
if payload_datastore.has_key? "LHOST"
292292
payload_datastore['LHOST'] = host
293-
elsif payload_datastore.key? "RHOST"
293+
elsif payload_datastore.has_key? "RHOST"
294294
payload_datastore['RHOST'] = host
295295
else
296296
print_error "Could not determine how to set Host on this payload..."
297297
return
298298
end
299299

300300
# Set the RPORT or LPORT for the payload
301-
if payload_datastore.key? "LPORT"
301+
if payload_datastore.has_key? "LPORT"
302302
payload_datastore['LPORT'] = port
303-
elsif payload_datastore.key? "RPORT"
303+
elsif payload_datastore.has_key? "RPORT"
304304
payload_datastore['RPORT'] = port
305305
else
306306
print_error "Could not determine how to set Port on this payload..."
@@ -321,7 +321,7 @@ def cmd_handler(*args)
321321
'ExitOnSession' => exit_on_session,
322322
'RunAsJob' => true
323323
}
324-
handler_opts.reverse_merge!(payload_datastore)
324+
handler.datastore.reverse_merge!(payload_datastore)
325325

326326
# Launch our Handler and get the Job ID
327327
handler.exploit_simple(handler_opts)

0 commit comments

Comments
 (0)