Sha256: 8e7bef7e635acdd4e7d9c59fce580614c0dc4d64c97ba1d05680ce9f6d2ac047

Contents?: true

Size: 531 Bytes

Versions: 2

Compression:

Stored size: 531 Bytes

Contents

# -*- coding: binary -*-
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

2 entries across 2 versions & 1 rubygems

Version Path
librex-0.0.68 lib/rex/ui/text/output/socket.rb
librex-0.0.66 lib/rex/ui/text/output/socket.rb