2005-07-14 22:45:10 +00:00
|
|
|
require 'rex/ui'
|
|
|
|
|
|
|
|
module Rex
|
|
|
|
module Ui
|
|
|
|
|
|
|
|
###
|
|
|
|
#
|
|
|
|
# This class acts as a generic base class for outputing data. It
|
|
|
|
# only provides stubs for the simplest form of outputing information.
|
|
|
|
#
|
|
|
|
###
|
|
|
|
class Output
|
|
|
|
|
2005-07-17 02:04:39 +00:00
|
|
|
# General output
|
|
|
|
require 'rex/ui/output/none'
|
|
|
|
|
|
|
|
# Text-based output
|
2005-07-14 22:45:10 +00:00
|
|
|
require 'rex/ui/text/output'
|
|
|
|
|
2006-09-12 05:34:58 +00:00
|
|
|
attr_accessor :on_print_proc
|
|
|
|
|
2005-07-14 22:45:10 +00:00
|
|
|
#
|
|
|
|
# Prints an error message.
|
|
|
|
#
|
2007-02-11 19:40:33 +00:00
|
|
|
def print_error(msg='')
|
2005-07-14 22:45:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Prints a 'good' message.
|
|
|
|
#
|
2007-02-11 19:40:33 +00:00
|
|
|
def print_good(msg='')
|
2005-07-14 22:45:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Prints a status line.
|
|
|
|
#
|
2007-02-11 19:40:33 +00:00
|
|
|
def print_status(msg='')
|
2005-07-14 22:45:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
#
|
|
|
|
# Prints an undecorated line of information.
|
|
|
|
#
|
2007-02-11 19:40:33 +00:00
|
|
|
def print_line(msg='')
|
2005-07-14 22:45:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
#
|
2005-07-17 02:04:39 +00:00
|
|
|
# Prints a message with no decoration.
|
2005-07-14 22:45:10 +00:00
|
|
|
#
|
2007-02-11 19:40:33 +00:00
|
|
|
def print(msg='')
|
2005-07-14 22:45:10 +00:00
|
|
|
end
|
|
|
|
|
2005-07-17 02:04:39 +00:00
|
|
|
#
|
|
|
|
# Flushes any buffered output.
|
|
|
|
#
|
|
|
|
def flush
|
|
|
|
end
|
|
|
|
|
2005-07-14 22:45:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|