Module: Msf::Handler::FindTag

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

Overview

This handlers implements tag-based findsock handling.

Constant Summary

Constants included from Msf::Handler

Claimed, Unused

Instance Attribute Summary

Attributes included from Msf::Handler

#exploit_config, #parent_payload

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FindPort

#handler

Methods included from Msf::Handler

#add_handler, #cleanup_handler, #handle_connection, #handler, #handler_name, #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 'find'.


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

def self.general_handler_type
  "find"
end

.handler_typeObject

Returns the string representation of the handler type, in this case 'find_tag'.


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

def self.handler_type
  return "find_tag"
end

Instance Method Details

#initialize(info = {}) ⇒ Object

Initializes the find tag handler with the option that is required for all find-tag based payloads, such as the TAG that will be searched for.


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/msf/core/handler/find_tag.rb', line 36

def initialize(info = {})
  super

  register_advanced_options(
    [
      OptString.new('TAG',
        [
          true,
          "The four byte tag to signify the connection.",
          Rex::Text.rand_text_alphanumeric(4),
        ])
    ], Msf::Handler::FindTag)

  # Eliminate the CPORT option.
  options.remove_option('CPORT')
end