Sha256: 1b469067ea77a809147dbd26edd077145cc892b83e1db6ee1d27189a76990c24

Contents?: true

Size: 562 Bytes

Versions: 43

Compression:

Stored size: 562 Bytes

Contents

require 'rex/ui'

module Rex
module Ui
module Text

###
#
# This class implements input against standard in.
#
###
class Input::Stdio < Rex::Ui::Text::Input

	#
	# Reads text from standard input.
	#
	def sysread(len = 1)
		$stdin.sysread(len)
	end

	#
	# Wait for a line of input to be read from standard input.
	#
	def gets
		return $stdin.gets
	end

	#
	# Returns whether or not EOF has been reached on stdin.
	#
	def eof?
		$stdin.closed?
	end

	#
	# Returns the file descriptor associated with standard input.
	#
	def fd
		return $stdin
	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/input/stdio.rb
librex-0.0.63 lib/rex/ui/text/input/stdio.rb
librex-0.0.54 lib/rex/ui/text/input/stdio.rb
librex-0.0.53 lib/rex/ui/text/input/stdio.rb
librex-0.0.52 lib/rex/ui/text/input/stdio.rb
librex-0.0.51 lib/rex/ui/text/input/stdio.rb
librex-0.0.50 lib/rex/ui/text/input/stdio.rb
librex-0.0.49 lib/rex/ui/text/input/stdio.rb
librex-0.0.48 lib/rex/ui/text/input/stdio.rb
librex-0.0.47 lib/rex/ui/text/input/stdio.rb
librex-0.0.46 lib/rex/ui/text/input/stdio.rb
librex-0.0.44 lib/rex/ui/text/input/stdio.rb
librex-0.0.43 lib/rex/ui/text/input/stdio.rb
librex-0.0.42 lib/rex/ui/text/input/stdio.rb
librex-0.0.41 lib/rex/ui/text/input/stdio.rb
librex-0.0.40 lib/rex/ui/text/input/stdio.rb
librex-0.0.39 lib/rex/ui/text/input/stdio.rb
librex-0.0.38 lib/rex/ui/text/input/stdio.rb
librex-0.0.37 lib/rex/ui/text/input/stdio.rb
librex-0.0.36 lib/rex/ui/text/input/stdio.rb