Module: Msf::WebServices::ExploitServlet
- Defined in:
- lib/msf/core/web_services/servlet/exploit_servlet.rb
Class Method Summary collapse
Class Method Details
.api_path ⇒ Object
3 4 5 |
# File 'lib/msf/core/web_services/servlet/exploit_servlet.rb', line 3 def self.api_path '/api/v1/exploits' end |
.registered(app) ⇒ Object
7 8 9 |
# File 'lib/msf/core/web_services/servlet/exploit_servlet.rb', line 7 def self.registered(app) app.post self.api_path, &report_exploit end |
.report_exploit ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/msf/core/web_services/servlet/exploit_servlet.rb', line 15 def self.report_exploit lambda { warden.authenticate! job = lambda { |opts| case opts[:exploit_report_type] when "attempt" get_db.report_exploit_attempt(opts[:host], opts) when "failure" get_db.report_exploit_failure(opts) when "success" get_db.report_exploit_success(opts) end get_db.report_host(opts) } exec_report_job(request, &job) } end |