diff --git a/msfvenom b/msfvenom index bfa3420471..87c02e31ff 100755 --- a/msfvenom +++ b/msfvenom @@ -340,14 +340,8 @@ if opts[:encode] end end -if opts[:template] - idx = opts[:template].rindex("/") - len = opts[:template].length - path = opts[:template][0..idx] - altexe = opts[:template][idx..len] -end -exeopts = { :inject => opts[:inject], :template_path => path, :template => altexe } +exeopts = { :inject => opts[:inject], :template_path => File.dirname(opts[:template]), :template => File.basename(opts[:template]) } if opts[:nopsled] puts opts[:arch].class @@ -408,4 +402,4 @@ when /war/i else print_error("Unsupported format") exit -end \ No newline at end of file +end