Module: RemoteSessionEventDataService

Includes:
ResponseDataHelper
Included in:
DataServiceAutoLoader
Defined in:
lib/metasploit/framework/data_service/remote/http/remote_session_event_data_service.rb

Constant Summary collapse

SESSION_EVENT_API_PATH =
'/api/v1/session-events'
SESSION_EVENT_MDM_CLASS =
'Mdm::SessionEvent'

Instance Method Summary collapse

Methods included from ResponseDataHelper

#json_to_hash, #json_to_mdm_object, #process_file, #to_ar

Instance Method Details

#report_session_event(opts) ⇒ Object



14
15
16
17
# File 'lib/metasploit/framework/data_service/remote/http/remote_session_event_data_service.rb', line 14

def report_session_event(opts)
  opts[:session] = opts[:session].db_record
  self.post_data_async(SESSION_EVENT_API_PATH, opts)
end

#session_events(opts) ⇒ Object



9
10
11
12
# File 'lib/metasploit/framework/data_service/remote/http/remote_session_event_data_service.rb', line 9

def session_events(opts)
  path = get_path_select(opts, SESSION_EVENT_API_PATH)
  json_to_mdm_object(self.get_data(path, nil, opts), SESSION_EVENT_MDM_CLASS)
end