Land #10818, Disable ERB templating for Metasploit::Framework::Compiler::Utils

GSoC/Meterpreter_Web_Console
Jacob Robles 2018-10-16 14:18:50 -05:00
commit 786629afc9
No known key found for this signature in database
GPG Key ID: 3EC9F18F2B12401C
1 changed files with 4 additions and 3 deletions

View File

@ -11,16 +11,17 @@ module Metasploit
def self.normalize_code(code, headers)
code = code.lines.map { |line|
if line =~ /^#include <([[:print:]]+)>$/
%Q|<%= headers.include('#{$1}') %>\n|
h = headers.include("#{$1}")
%Q|#{h}\n|
else
line
end
}.join
ERB.new(code).result(binding)
code
end
end
end
end
end
end