Module: Rex::Ui::Text::Shell::InputShell

Defined in:
lib/rex/ui/text/shell.rb

Overview

This module is meant to be mixed into an input medium class instance as a means of extending it to display a prompt before each call to gets.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#outputObject

Returns the value of attribute output.



22
23
24
# File 'lib/rex/ui/text/shell.rb', line 22

def output
  @output
end

#promptObject

Returns the value of attribute prompt.



22
23
24
# File 'lib/rex/ui/text/shell.rb', line 22

def prompt
  @prompt
end

Instance Method Details

#pgetsObject



24
25
26
27
28
29
30
31
32
33
# File 'lib/rex/ui/text/shell.rb', line 24

def pgets
	output.print(prompt)
	output.flush

	output.prompting
	buf = gets
	output.prompting(false)

	buf
end