diff --git a/lib/common_helper.rb b/lib/common_helper.rb index 31335186..a849f181 100644 --- a/lib/common_helper.rb +++ b/lib/common_helper.rb @@ -156,9 +156,9 @@ def get_metasploit_url(module_path) end # Override for puts to enable logging -#def puts(o = "") +def puts(o = "") # remove color for logging - #temp = o.gsub(/\e\[\d+m(?.*)?\e\[0m/, '\k') - #File.open(LOG_FILE, "a+") { |f| f.puts(temp) } - #super(o) -#end + temp = o.gsub(/\e\[\d+m(.*)?\e\[0m/, '\1') + File.open(LOG_FILE, "a+") { |f| f.puts(temp) } + super(o) +end