class Rex::Ui::Text::Output::Stdio

This class implements output against standard out.

Public Instance Methods

print_raw(msg = '') click to toggle source

Prints the supplied message to standard output.

supports_color?() click to toggle source
# 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)/i) != nil)
  end
end