Land #11778, cmd_psh_payload options hash fix

nil and false are not equivalent here.
master
William Vu 2019-04-26 16:26:01 -05:00
commit 561b1ce86d
No known key found for this signature in database
GPG Key ID: 68BD00CE25866743
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ module Exploit::Powershell
def cmd_psh_payload(pay, payload_arch, opts = {})
%i[persist prepend_sleep exec_in_place encode_final_payload encode_inner_payload
remove_comspec noninteractive wrap_double_quotes no_equals method].map do |opt|
opts[opt] ||= datastore["Powershell::#{opt}"]
opts[opt] = opts[opt].nil? ? datastore["Powershell::#{opt}"] : opts[opt]
end
unless opts.key? :shorten