Module: RemoteVulnAttemptDataService
Constant Summary
collapse
- VULN_ATTEMPT_API_PATH =
'/api/v1/vuln-attempts'
- VULN_ATTEMPT_MDM_CLASS =
'Mdm::VulnAttempt'
Instance Method Summary
collapse
#json_to_hash, #json_to_mdm_object, #process_file, #to_ar
Instance Method Details
#report_vuln_attempt(vuln, opts) ⇒ Object
14
15
16
17
|
# File 'lib/metasploit/framework/data_service/remote/http/remote_vuln_attempt_data_service.rb', line 14
def report_vuln_attempt(vuln, opts)
opts[:vuln_id] = vuln.id
json_to_mdm_object(self.post_data(VULN_ATTEMPT_API_PATH, opts), VULN_ATTEMPT_MDM_CLASS).first
end
|
#vuln_attempts(opts) ⇒ Object
9
10
11
12
|
# File 'lib/metasploit/framework/data_service/remote/http/remote_vuln_attempt_data_service.rb', line 9
def vuln_attempts(opts)
path = get_path_select(opts, VULN_ATTEMPT_API_PATH)
json_to_mdm_object(self.get_data(path, nil, opts), VULN_ATTEMPT_MDM_CLASS)
end
|