Enable exec_report_job to handle includes

GSoC/Meterpreter_Web_Console
James Barnett 2018-03-13 11:34:44 -05:00
parent e480b7dd2c
commit 9099ef0bf1
No known key found for this signature in database
GPG Key ID: 647983861A4EC5EA
2 changed files with 4 additions and 3 deletions

View File

@ -35,7 +35,8 @@ module ServiceServlet
def self.report_service
lambda {
job = lambda { |opts| get_db.report_service(opts) }
exec_report_job(request, &job)
includes = [:host]
exec_report_job(request, includes, &job)
}
end

View File

@ -32,7 +32,7 @@ module ServletHelper
hash.deep_symbolize_keys
end
def exec_report_job(request, &job)
def exec_report_job(request, includes = nil, &job)
begin
# report jobs always need data
@ -44,7 +44,7 @@ module ServletHelper
return set_empty_response()
else
data = job.call(opts)
return set_json_response(data)
return set_json_response(data, includes)
end
rescue Exception => e