Sha256: dcbe3fddec77626fd85bc4b5e16760bd0be340f86f8a312070a8c6714b99322f

Contents?: true

Size: 506 Bytes

Versions: 43

Compression:

Stored size: 506 Bytes

Contents

require 'rex/ui'

module Rex
module Ui
module Text

###
#
# This class implements the output interface against a socket.
#
###
class Output::Socket < Rex::Ui::Text::Output

	def initialize(sock)
		@sock = sock
		super()
	end

	def supports_color?
		case config[:color]
		when true
			# Allow color if the user forces it on
			return true
		else
			false
		end
	end

	#
	# Prints the supplied message to the socket.
	#
	def print_raw(msg = '')
		@sock.write(msg)
		@sock.flush

		msg
	end
end

end
end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
librex-0.0.65 lib/rex/ui/text/output/socket.rb
librex-0.0.63 lib/rex/ui/text/output/socket.rb
librex-0.0.54 lib/rex/ui/text/output/socket.rb
librex-0.0.53 lib/rex/ui/text/output/socket.rb
librex-0.0.52 lib/rex/ui/text/output/socket.rb
librex-0.0.51 lib/rex/ui/text/output/socket.rb
librex-0.0.50 lib/rex/ui/text/output/socket.rb
librex-0.0.49 lib/rex/ui/text/output/socket.rb
librex-0.0.48 lib/rex/ui/text/output/socket.rb
librex-0.0.47 lib/rex/ui/text/output/socket.rb
librex-0.0.46 lib/rex/ui/text/output/socket.rb
librex-0.0.44 lib/rex/ui/text/output/socket.rb
librex-0.0.43 lib/rex/ui/text/output/socket.rb
librex-0.0.42 lib/rex/ui/text/output/socket.rb
librex-0.0.41 lib/rex/ui/text/output/socket.rb
librex-0.0.40 lib/rex/ui/text/output/socket.rb
librex-0.0.39 lib/rex/ui/text/output/socket.rb
librex-0.0.38 lib/rex/ui/text/output/socket.rb
librex-0.0.37 lib/rex/ui/text/output/socket.rb
librex-0.0.36 lib/rex/ui/text/output/socket.rb