Land #10818, Disable ERB templating for Metasploit::Framework::Compiler::Utils
commit
786629afc9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue