Class/Module Index [+]

Quicksearch

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

This class implements output against standard out.

Public Instance Methods

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)/) != nil)
        end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.