diff --git a/lib/msf/util/exe.rb b/lib/msf/util/exe.rb index 5df5ba5098..3c738261d1 100644 --- a/lib/msf/util/exe.rb +++ b/lib/msf/util/exe.rb @@ -992,6 +992,11 @@ require 'msf/core/exe/segment_appender' if default elf = to_exe_elf(framework, opts, "template_x86_linux.bin", code) else + # Use set_template_default to normalize the :template key. It will just end up doing + # opts[:template] = File.join(opts[:template_path], opts[:template]) + # for us, check if the file exists. + set_template_default(opts) + # If this isn't our normal template, we have to do some fancy # header patching to mark the .text section rwx before putting our # payload into the entry point.