Module: Msf::Session::Provider::MultiCommandShell
- Includes:
- SingleCommandShell
- Defined in:
- lib/msf/core/session/provider/multi_command_shell.rb
Overview
This interface is to be implemented by a session that is capable of providing multiple command shell interfaces simultaneously. Inherently, MultiCommandShell classes must also provide a mechanism by which they can implement the SingleCommandShell interface.
Instance Method Summary collapse
-
#shell_close(shell = nil) ⇒ Object
Closes the provided command shell or the default one if none is given.
-
#shell_init ⇒ Object
Initializes the default command shell as expected from SingleCommandShell.
-
#shell_open ⇒ Object
Opens a new command shell context and returns the handle.
-
#shell_read(length = nil, shell = nil) ⇒ Object
Reads data from a command shell.
-
#shell_write(buf, shell = nil) ⇒ Object
Writes data to a command shell.
Methods included from SingleCommandShell
#command_termination, #set_is_echo_shell, #shell_command_token, #shell_command_token_base, #shell_command_token_unix, #shell_command_token_win32, #shell_read_until_token, #to_cmd
Instance Method Details
#shell_close(shell = nil) ⇒ Object
Closes the provided command shell or the default one if none is given.
53 54 55 |
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 53 def shell_close(shell = nil) raise NotImplementedError end |
#shell_init ⇒ Object
Initializes the default command shell as expected from SingleCommandShell.
22 23 24 |
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 22 def shell_init() raise NotImplementedError end |
#shell_open ⇒ Object
Opens a new command shell context and returns the handle.
29 30 31 |
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 29 def shell_open() raise NotImplementedError end |
#shell_read(length = nil, shell = nil) ⇒ Object
Reads data from a command shell. If shell is nil, the default command shell from shell_init is used.
37 38 39 |
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 37 def shell_read(length = nil, shell = nil) raise NotImplementedError end |
#shell_write(buf, shell = nil) ⇒ Object
Writes data to a command shell. If shell is nil, the default command shell from shell_init is used.
45 46 47 |
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 45 def shell_write(buf, shell = nil) raise NotImplementedError end |