Skip to content

Commit bab9b66

Browse files
committed
Only send back one object for host create
1 parent b2666ad commit bab9b66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/metasploit/framework/data_service/remote/http/remote_host_data_service.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ def hosts(opts)
1212
end
1313

1414
def report_host(opts)
15-
json_to_mdm_object(self.post_data(HOST_API_PATH, opts), HOST_MDM_CLASS, [])
15+
json_to_mdm_object(self.post_data(HOST_API_PATH, opts), HOST_MDM_CLASS, []).first
1616
end
1717

1818
def find_or_create_host(opts)
19-
json_to_mdm_object(self.post_data(HOST_API_PATH, opts), HOST_MDM_CLASS, [])
19+
json_to_mdm_object(self.post_data(HOST_API_PATH, opts), HOST_MDM_CLASS, []).first
2020
end
2121

2222
def report_hosts(hosts)

0 commit comments

Comments
 (0)