2014-08-17 17:31:53 -05:00
|
|
|
# -*- coding: binary -*-
|
2013-04-01 20:16:28 -05:00
|
|
|
# make sure the classes are defined before opening it to define submodule
|
|
|
|
|
require 'rex/ui/text/output'
|
2013-03-30 16:05:12 -05:00
|
|
|
require 'rex/ui/text/output/buffer'
|
|
|
|
|
|
|
|
|
|
module Rex
|
2013-08-30 16:28:33 -05:00
|
|
|
module Ui
|
|
|
|
|
module Text
|
|
|
|
|
class Output
|
|
|
|
|
class Buffer
|
|
|
|
|
# Adds {#write} method to {Rex::Ui::Text::Output::Buffer} so it can
|
|
|
|
|
# function as a stand-in for `$stdout`
|
|
|
|
|
module Stdout
|
|
|
|
|
# Prints raw message.
|
|
|
|
|
#
|
|
|
|
|
# @param (see Rex::Ui::Text::Output::Buffer#write)
|
|
|
|
|
# @return (see Rex::Ui::Text::Output::Buffer#write)
|
|
|
|
|
def write(msg = '')
|
|
|
|
|
print_raw(msg)
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-03-30 16:05:12 -05:00
|
|
|
end
|