Skip to content

Commit 6ffae7f

Browse files
authored
Merge pull request #9 from clee-r7/correct-api-url
Update API URLs
2 parents 207adfc + 2211459 commit 6ffae7f

28 files changed

+31
-30
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class RemoteHTTPDataService
1515
include Metasploit::Framework::DataService
1616
include DataServiceAutoLoader
1717

18-
ONLINE_TEST_URL = "/api/1/msf/online"
18+
ONLINE_TEST_URL = "/api/v1/online"
1919
EXEC_ASYNC = { :exec_async => true }
2020
GET_REQUEST = 'GET'
2121
POST_REQUEST = 'POST'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RemoteCredentialDataService
44
include ResponseDataHelper
55

6-
CREDENTIAL_API_PATH = '/api/1/msf/credential'
6+
CREDENTIAL_API_PATH = '/api/v1/credentials'
77
# "MDM_CLASS" is a little misleading since it is not in that repo but trying to keep naming consistent across DataServices
88
CREDENTIAL_MDM_CLASS = 'Metasploit::Credential::Core'
99

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RemoteEventDataService
2-
EVENT_API_PATH = '/api/1/msf/event'
2+
EVENT_API_PATH = '/api/v1/events'
33

44
def report_event(opts)
55
self.post_data_async(EVENT_API_PATH, opts)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RemoteExploitDataService
2-
EXPLOIT_API_PATH = '/api/1/msf/exploit'
2+
EXPLOIT_API_PATH = '/api/v1/exploits'
33

44
def report_exploit_attempt(host, opts)
55
opts[:host] = host

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RemoteHostDataService
44
include ResponseDataHelper
55

6-
HOST_API_PATH = '/api/1/msf/host'
6+
HOST_API_PATH = '/api/v1/hosts'
77
HOST_SEARCH_PATH = HOST_API_PATH + "/search"
88
HOST_MDM_CLASS = 'Mdm::Host'
99

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RemoteLootDataService
44
include ResponseDataHelper
55

6-
LOOT_API_PATH = '/api/1/msf/loot'
6+
LOOT_API_PATH = '/api/v1/loots'
77
LOOT_MDM_CLASS = 'Mdm::Loot'
88

99
def loot(opts = {})

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RemoteNmapDataService
44
include ResponseDataHelper
55

6-
NMAP_PATH = '/api/1/msf/nmap'
6+
NMAP_PATH = '/api/v1/nmaps'
77

88
def import_nmap_xml_file(opts)
99
filename = opts[:filename]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module RemoteNoteDataService
44
include ResponseDataHelper
55

6-
NOTE_API_PATH = '/api/1/msf/note'
6+
NOTE_API_PATH = '/api/v1/notes'
77

88
def report_note(opts)
99
self.post_data_async(NOTE_API_PATH, opts)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module RemoteServiceDataService
2-
SERVICE_API_PATH = '/api/1/msf/service'
2+
SERVICE_API_PATH = '/api/v1/services'
33

44
def report_service(opts)
55
self.post_data_async(SERVICE_API_PATH, opts)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module RemoteSessionDataService
22

3-
SESSION_API_PATH = '/api/1/msf/session'
3+
SESSION_API_PATH = '/api/v1/sessions'
44
SESSION_MDM_CLASS = 'Mdm::Session'
55

66
def report_session(opts)

0 commit comments

Comments
 (0)