diff --git a/lib/msf/util/exe.rb b/lib/msf/util/exe.rb index 15864d2f2e..dd0c3d819e 100644 --- a/lib/msf/util/exe.rb +++ b/lib/msf/util/exe.rb @@ -641,6 +641,9 @@ require 'msf/core/exe/segment_appender' opts[:payload] = 'stdin' 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) code_service = venom_generator.multiple_encode_payload(code) return to_winpe_only(framework, code_service, opts) @@ -2342,7 +2345,7 @@ require 'msf/core/exe/segment_appender' end 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