Module: Msf::Handler::Generic

Includes:
Msf::Handler
Defined in:
lib/msf/core/handler/generic.rb

Constant Summary

Constants included from Msf::Handler

Claimed, Unused

Instance Attribute Summary

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 Msf::Handler

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

Class Method Details

.general_handler_typeObject

Returns none to indicate no connection.



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

def self.general_handler_type
  'none'
end

.handler_typeObject

Returns the handler type of none since payloads that use this handler have no connection.



13
14
15
# File 'lib/msf/core/handler/generic.rb', line 13

def self.handler_type
  'none'
end

Instance Method Details

#handler(*args) ⇒ Object

This is necessary for find-sock style payloads.



26
27
28
29
30
# File 'lib/msf/core/handler/generic.rb', line 26

def handler(*args)
  create_session(*args)

  Claimed
end

#wfs_delayObject

Always wait at least 5 seconds for this payload (due to channel delays)



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

def wfs_delay
  datastore['WfsDelay'] > 4 ? datastore['WfsDelay'] : 5
end