Land #9851, add workaround require for non-powershell psexec

4.x
Brent Cook 2018-04-24 08:22:58 -05:00 committed by Metasploit
parent efc9c1724f
commit 6ea0e734f9
No known key found for this signature in database
GPG Key ID: CDFB5FA52007B954
1 changed files with 4 additions and 1 deletions

View File

@ -641,6 +641,9 @@ require 'msf/core/exe/segment_appender'
opts[:payload] = 'stdin' opts[:payload] = 'stdin'
opts[:encoder] = '@x86/service,'+(opts[:serviceencoder] || '') opts[:encoder] = '@x86/service,'+(opts[:serviceencoder] || '')
# XXX This should not be required, it appears there is a dependency inversion
# See https://github.com/rapid7/metasploit-framework/pull/9851
require 'msf/core/payload_generator'
venom_generator = Msf::PayloadGenerator.new(opts) venom_generator = Msf::PayloadGenerator.new(opts)
code_service = venom_generator.multiple_encode_payload(code) code_service = venom_generator.multiple_encode_payload(code)
return to_winpe_only(framework, code_service, opts) return to_winpe_only(framework, code_service, opts)
@ -2342,7 +2345,7 @@ require 'msf/core/exe/segment_appender'
end end
def self.macho?(code) def self.macho?(code)
code[0..3] == "\xCF\xFA\xED\xFE" || code[0..3] == "\xCE\xFA\xED\xFE" || code[0..3] == "\xCA\xFE\xBA\xBE" code[0..3] == "\xCF\xFA\xED\xFE" || code[0..3] == "\xCE\xFA\xED\xFE" || code[0..3] == "\xCA\xFE\xBA\xBE"
end end
end end