Module: RemoteLoginDataService
Constant Summary
collapse
- LOGIN_API_PATH =
'/api/v1/logins'
- LOGIN_MDM_CLASS =
“MDM_CLASS” is a little misleading since it is not in that repo but trying to keep naming consistent across DataServices
'Metasploit::Credential::Login'
Instance Method Summary
collapse
#json_to_hash, #json_to_mdm_object, #process_file, #to_ar
Instance Method Details
#create_credential_login(opts) ⇒ Object
15
16
17
|
# File 'lib/metasploit/framework/data_service/remote/http/remote_login_data_service.rb', line 15
def create_credential_login(opts)
json_to_mdm_object(self.post_data(LOGIN_API_PATH, opts), LOGIN_MDM_CLASS).first
end
|
#logins(opts) ⇒ Object
10
11
12
13
|
# File 'lib/metasploit/framework/data_service/remote/http/remote_login_data_service.rb', line 10
def logins(opts)
path = get_path_select(opts, LOGIN_API_PATH)
json_to_mdm_object(self.get_data(path, nil, opts), LOGIN_MDM_CLASS)
end
|
#update_login(opts) ⇒ Object
19
20
21
22
23
24
25
26
|
# File 'lib/metasploit/framework/data_service/remote/http/remote_login_data_service.rb', line 19
def update_login(opts)
path = LOGIN_API_PATH
if opts && opts[:id]
id = opts.delete(:id)
path = "#{LOGIN_API_PATH}/#{id}"
end
json_to_mdm_object(self.put_data(path, opts), LOGIN_MDM_CLASS).first
end
|