From 69cd0a5ddccee3f436fd4792e55e575eb30e512b Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Tue, 16 Oct 2018 14:02:13 -0500 Subject: [PATCH] Disable ERB templating for Metasploit::Framework::Compiler::Utils --- lib/metasploit/framework/compiler/utils.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/metasploit/framework/compiler/utils.rb b/lib/metasploit/framework/compiler/utils.rb index 27c912b2dd..3b4ae8fd25 100644 --- a/lib/metasploit/framework/compiler/utils.rb +++ b/lib/metasploit/framework/compiler/utils.rb @@ -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 \ No newline at end of file +end