Module: Msf::WebServices::HostServlet
- Defined in:
- lib/msf/core/web_services/servlet/host_servlet.rb
Class Method Summary collapse
- .api_path ⇒ Object
- .api_path_with_id ⇒ Object
- .api_path_with_id_and_tags ⇒ Object
- .api_search_path ⇒ Object
- .registered(app) ⇒ Object
Class Method Details
.api_path ⇒ Object
3 4 5 |
# File 'lib/msf/core/web_services/servlet/host_servlet.rb', line 3 def self.api_path '/api/v1/hosts' end |
.api_path_with_id ⇒ Object
7 8 9 |
# File 'lib/msf/core/web_services/servlet/host_servlet.rb', line 7 def self.api_path_with_id "#{self.api_path}/?:id?" end |
.api_path_with_id_and_tags ⇒ Object
11 12 13 |
# File 'lib/msf/core/web_services/servlet/host_servlet.rb', line 11 def self. "#{self.api_path_with_id}/tags" end |
.api_search_path ⇒ Object
15 16 17 |
# File 'lib/msf/core/web_services/servlet/host_servlet.rb', line 15 def self.api_search_path "#{self.api_path}/search" end |
.registered(app) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/msf/core/web_services/servlet/host_servlet.rb', line 19 def self.registered(app) app.get self.api_path, &get_host app.get self.api_path_with_id, &get_host app.post self.api_path, &report_host app.put self.api_path_with_id, &update_host app.delete self.api_path, &delete_host app.post self.api_search_path, &search app.get self., & app.post self., &add_host_tag app.delete self., &delete_host_tag end |