Skip to content

Commit d0c9280

Browse files
committed
2 parents 4401c6f + 0e121df commit d0c9280

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/msf/util/exe.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -992,6 +992,11 @@ def self.to_linux_x86_elf(framework, code, opts = {})
992992
if default
993993
elf = to_exe_elf(framework, opts, "template_x86_linux.bin", code)
994994
else
995+
# Use set_template_default to normalize the :template key. It will just end up doing
996+
# opts[:template] = File.join(opts[:template_path], opts[:template])
997+
# for us, check if the file exists.
998+
set_template_default(opts, 'template_x86_linux.bin')
999+
9951000
# If this isn't our normal template, we have to do some fancy
9961001
# header patching to mark the .text section rwx before putting our
9971002
# payload into the entry point.

0 commit comments

Comments
 (0)