Fix #6213 - Method to_linux_x86_elf fails to set set :template
:template by default is just the base name of the file, not the fullname. Before we use it, we need to normalize it. Methods in this class rely on set_template_default for normalization ( which can also handle a custom path), so we'll just use that too. Fix #6213bug/bundler_fix
parent
ee25cb88b5
commit
aaea730508
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue