Land #9851, add workaround require for non-powershell psexec
parent
efc9c1724f
commit
6ea0e734f9
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue