This class implements output against standard out.
Prints the supplied message to standard output.
# File lib/rex/ui/text/output/stdio.rb, line 37 def print_raw(msg = '') if (Rex::Compat.is_windows and supports_color?) WindowsConsoleColorSupport.new($stdout).write(msg) else $stdout.print(msg) end $stdout.flush msg end
# File lib/rex/ui/text/output/stdio.rb, line 19 def supports_color? case config[:color] when true return true when false return false else # auto if (Rex::Compat.is_windows) return true end term = Rex::Compat.getenv('TERM') return (term and term.match(/(?:vt10[03]|xterm(?:-color)?|linux|screen|rxvt)/) != nil) end end
Generated with the Darkfish Rdoc Generator 2.