Module: PayloadServlet

Defined in:
lib/msf/core/web_services/servlet/payload_servlet.rb

Class Method Summary collapse

Class Method Details

.api_pathObject


3
4
5
# File 'lib/msf/core/web_services/servlet/payload_servlet.rb', line 3

def self.api_path
  '/api/v1/payloads'
end

.api_path_with_idObject


7
8
9
# File 'lib/msf/core/web_services/servlet/payload_servlet.rb', line 7

def self.api_path_with_id
  "#{PayloadServlet.api_path}/?:id?"
end

.registered(app) ⇒ Object


11
12
13
14
15
16
17
# File 'lib/msf/core/web_services/servlet/payload_servlet.rb', line 11

def self.registered(app)
  app.get PayloadServlet.api_path, &get_payload
  app.get PayloadServlet.api_path_with_id, &get_payload
  app.post PayloadServlet.api_path, &create_payload
  app.put PayloadServlet.api_path_with_id, &update_payload
  app.delete PayloadServlet.api_path, &delete_payload
end