Module: VulnServlet

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

Constant Summary collapse

JSON_INCLUDES =
[:host, :refs, :module_refs]

Class Method Summary collapse

Class Method Details

.api_pathObject


5
6
7
# File 'lib/msf/core/web_services/servlet/vuln_servlet.rb', line 5

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

.api_path_with_idObject


9
10
11
# File 'lib/msf/core/web_services/servlet/vuln_servlet.rb', line 9

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

.registered(app) ⇒ Object


13
14
15
16
17
18
19
# File 'lib/msf/core/web_services/servlet/vuln_servlet.rb', line 13

def self.registered(app)
  app.get VulnServlet.api_path, &get_vuln
  app.get VulnServlet.api_path_with_id, &get_vuln
  app.post VulnServlet.api_path, &report_vuln
  app.put VulnServlet.api_path_with_id, &update_vuln
  app.delete VulnServlet.api_path, &delete_vuln
end