@@ -288,19 +288,19 @@ def cmd_handler(*args)
288
288
payload_datastore = payload_module . datastore
289
289
290
290
# Set The RHOST or LHOST for the payload
291
- if payload_datastore . key ? "LHOST"
291
+ if payload_datastore . has_key ? "LHOST"
292
292
payload_datastore [ 'LHOST' ] = host
293
- elsif payload_datastore . key ? "RHOST"
293
+ elsif payload_datastore . has_key ? "RHOST"
294
294
payload_datastore [ 'RHOST' ] = host
295
295
else
296
296
print_error "Could not determine how to set Host on this payload..."
297
297
return
298
298
end
299
299
300
300
# Set the RPORT or LPORT for the payload
301
- if payload_datastore . key ? "LPORT"
301
+ if payload_datastore . has_key ? "LPORT"
302
302
payload_datastore [ 'LPORT' ] = port
303
- elsif payload_datastore . key ? "RPORT"
303
+ elsif payload_datastore . has_key ? "RPORT"
304
304
payload_datastore [ 'RPORT' ] = port
305
305
else
306
306
print_error "Could not determine how to set Port on this payload..."
@@ -321,7 +321,7 @@ def cmd_handler(*args)
321
321
'ExitOnSession' => exit_on_session ,
322
322
'RunAsJob' => true
323
323
}
324
- handler_opts . reverse_merge! ( payload_datastore )
324
+ handler . datastore . reverse_merge! ( payload_datastore )
325
325
326
326
# Launch our Handler and get the Job ID
327
327
handler . exploit_simple ( handler_opts )
0 commit comments