Module: Msf::Handler::FindTty

Includes:
FindPort
Defined in:
lib/msf/core/handler/find_tty.rb

Overview

This handler expects an interactive TTY on the supplied socket/io object

Constant Summary

Constants included from Msf::Handler

Claimed, Unused

Instance Attribute Summary

Attributes included from FindPort

#_handler_return_value

Attributes included from Msf::Handler

#exploit_config, #parent_payload, #pending_connections, #session_waiter_event, #sessions

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FindPort

#_find_prefix, #_send_id, #create_session, #handler

Methods included from Msf::Handler

#add_handler, #cleanup_handler, #create_session, #handle_connection, #handler, #handler_name, #interrupt_wait_for_session, #register_session, #setup_handler, #start_handler, #stop_handler, #wait_for_session, #wfs_delay

Class Method Details

.general_handler_typeObject

Returns the connection oriented general handler type, in this case 'none'


28
29
30
# File 'lib/msf/core/handler/find_tty.rb', line 28

def self.general_handler_type
  "none"
end

.handler_typeObject

Returns the string representation of the handler type, in this case 'none', which is kind of a lie, but we don't have a better way to handle this yet


20
21
22
# File 'lib/msf/core/handler/find_tty.rb', line 20

def self.handler_type
  return "none"
end

Instance Method Details

#_check_shell(sock) ⇒ Object (protected)


42
43
44
45
46
47
48
# File 'lib/msf/core/handler/find_tty.rb', line 42

def _check_shell(sock)
  # Verify that the modem is online
  if(sock.respond_to?('commandstate'))
    return (sock.commandstate ? false : true)
  end
  return true
end

#initialize(info = {}) ⇒ Object

Remove the CPORT option from our included FindPort class


35
36
37
38
# File 'lib/msf/core/handler/find_tty.rb', line 35

def initialize(info = {})
  super
  options.remove_option('CPORT')
end