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

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.

Raises:

  • (NotImplementedError)


53
54
55
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 53

def shell_close(shell = nil)
  raise NotImplementedError
end

#shell_initObject

Initializes the default command shell as expected from SingleCommandShell.

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 22

def shell_init()
  raise NotImplementedError
end

#shell_openObject

Opens a new command shell context and returns the handle.

Raises:

  • (NotImplementedError)


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.

Raises:

  • (NotImplementedError)


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.

Raises:

  • (NotImplementedError)


45
46
47
# File 'lib/msf/core/session/provider/multi_command_shell.rb', line 45

def shell_write(buf, shell = nil)
  raise NotImplementedError
end