puts override reactivated

This commit is contained in:
erwanlr
2013-01-17 13:11:21 +01:00
parent d9fd20c6fe
commit 5d19bdf83d

View File

@@ -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(?<text>.*)?\e\[0m/, '\k<text>')
#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